Merge change 11093
* changes:
If FLAGS_2D_PROJECTION is set, the MVP matrices need updating when changing the viewport.
diff --git a/core/java/android/text/InputType.java b/core/java/android/text/InputType.java
index d50684a..41d5b84 100644
--- a/core/java/android/text/InputType.java
+++ b/core/java/android/text/InputType.java
@@ -20,7 +20,25 @@
/**
* Bit definitions for an integer defining the basic content type of text
- * held in an {@link Editable} object.
+ * held in an {@link Editable} object. Supported classes may be combined
+ * with variations and flags to indicate desired behaviors.
+ *
+ * <h3>Examples</h3>
+ *
+ * <dl>
+ * <dt>A password field with with the password visible to the user:
+ * <dd>inputType = TYPE_CLASS_TEXT |
+ * TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
+ *
+ * <dt>A multi-line postal address with automatic capitalization:
+ * <dd>inputType = TYPE_CLASS_TEXT |
+ * TYPE_TEXT_VARIATION_POSTAL_ADDRESS |
+ * TYPE_TEXT_FLAG_MULTI_LINE
+ *
+ * <dt>A time field:
+ * <dd>inputType = TYPE_CLASS_DATETIME |
+ * TYPE_DATETIME_VARIATION_TIME
+ * </dl>
*/
public interface InputType {
/**
diff --git a/docs/html/guide/topics/fundamentals.jd b/docs/html/guide/topics/fundamentals.jd
index 71705d3..640e44b 100644
--- a/docs/html/guide/topics/fundamentals.jd
+++ b/docs/html/guide/topics/fundamentals.jd
@@ -72,8 +72,8 @@
runs in isolation from the code of all other applications.</li>
<li>By default, each application is assigned a unique Linux user ID.
-Permissions are set so that the application's files are visible only
-that user, only to the application itself — although there are ways
+Permissions are set so that the application's files are visible only to
+that user and only to the application itself — although there are ways
to export them to other applications as well.</li>
</ul>
diff --git a/docs/html/guide/tutorials/views/hello-mapview.jd b/docs/html/guide/tutorials/views/hello-mapview.jd
index 868bfaa..50cb0303 100644
--- a/docs/html/guide/tutorials/views/hello-mapview.jd
+++ b/docs/html/guide/tutorials/views/hello-mapview.jd
@@ -93,28 +93,6 @@
}
</pre>
<p>You can actually run this now, but all it does is allow you to pan around the map.</p>
-<p>Android provides a handy {@link android.widget.ZoomControls} widget for zooming in and out of a View.
-MapView can automatically hook one for us by requesting it with the <code>getZoomControls()</code>
-method. Let's do this.</p>
-
-<li>Go back to the layout file. We need a new ViewGroup element, in which we'll
- place the ZoomControls. Just below the MapView element (but inside the RelativeLayout), add this element:
-<pre>
-<LinearLayout
- android:id="@+id/zoomview"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBottom="@id/mapview"
- android:layout_centerHorizontal="true"
-/></pre>
-
- <p>It doesn't really matter what kind of ViewGroup we use, because we just want a
- container that we can position within our root RelativeLayout.</p>
-
- <p>The last two attributes are available only to an element that's a child of a
- RelativeLayout. <code>layout_alignBottom</code> aligns the bottom of this element to the bottom of
- the element identified with a resource tag (which must be a sibling to this element).
- <code>layout_centerHorizontal</code> centers this on the horizontal plane.</p></li>
<li>Now go back to the HelloMapView class. We'll now retrieve the ZoomControls object from
the MapView and add it to our new layout element. First, at the top of the HelloMapView,
@@ -122,24 +100,18 @@
<pre>
LinearLayout linearLayout;
MapView mapView;
-ZoomControls mZoom;</pre></li>
+</pre>
<li>Then initialize each of these in <code>onCreate()</code>. We'll capture the LinearLayout and
MapView through their layout resources. Then get the ZoomControls from the MapView::
<pre>
-linearLayout = (LinearLayout) findViewById(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
-mZoom = (ZoomControls) mapView.getZoomControls();</pre>
+mapView.setBuiltInZoomControls(true);
+</pre>
- <p>By using the ZoomControls object provided by MapView, we don't have to do any of the work
- required to actually perform the zoom operations. The ZoomControls widget that MapView
- returns for us is already hooked into the MapView and works as soon as we add it to the
- layout. The controls will appear whenever the user touches the map, then dissapear after
- a few moments of inactivity.</p></li>
-
- <li>Now just plug our ZoomControls into the LinearLayout we added:
-
- <pre>linearLayout.addView(mZoom);</pre></li>
+ <p>By using the built-in zoom control provided by MapView, we don't have to do any of the work
+ required to actually perform the zoom operations. The controls will appear whenever the user
+ touches the map, then disappear after a few moments of inactivity.</p></li>
<li>Run it.</li>
</ol>
diff --git a/include/media/PVPlayer.h b/include/media/PVPlayer.h
index 8122df6..de7a041 100644
--- a/include/media/PVPlayer.h
+++ b/include/media/PVPlayer.h
@@ -62,6 +62,7 @@
static void run_set_video_surface(status_t s, void *cookie, bool cancelled);
static void run_set_audio_output(status_t s, void *cookie, bool cancelled);
static void run_prepare(status_t s, void *cookie, bool cancelled);
+ static void check_for_live_streaming(status_t s, void *cookie, bool cancelled);
PlayerDriver* mPlayerDriver;
char * mDataSourcePath;
diff --git a/include/private/opengles/gl_context.h b/include/private/opengles/gl_context.h
index a85f275..e32e332 100644
--- a/include/private/opengles/gl_context.h
+++ b/include/private/opengles/gl_context.h
@@ -285,6 +285,7 @@
vec4_t normalizedObjPosition;
vec4_t spotDir;
vec4_t normalizedSpotDir;
+ vec4_t objViewer;
GLfixed spotExp;
GLfixed spotCutoff;
GLfixed spotCutoffCosine;
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index 3b46d69..fe768be 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -644,7 +644,8 @@
}
/**
- * Sets the data source (FileDescriptor) to use. It is the caller's responsibility
+ * Sets the data source (FileDescriptor) to use. The FileDescriptor must be
+ * seekable (N.B. a LocalSocket is not seekable). It is the caller's responsibility
* to close the file descriptor. It is safe to do so as soon as this call returns.
*
* @param fd the FileDescriptor for the file you want to play
diff --git a/opengl/libagl/light.cpp b/opengl/libagl/light.cpp
index 8ae32cc0f..f211bca 100644
--- a/opengl/libagl/light.cpp
+++ b/opengl/libagl/light.cpp
@@ -216,6 +216,8 @@
static inline void validate_light_mvi(ogles_context_t* c)
{
uint32_t en = c->lighting.enabledLights;
+ // Vector from object to viewer, in eye coordinates
+ const vec4_t eyeViewer = { 0, 0, 0x1000, 0 };
while (en) {
const int i = 31 - gglClz(en);
en &= ~(1<<i);
@@ -223,6 +225,9 @@
c->transforms.mvui.point4(&c->transforms.mvui,
&l.objPosition, &l.position);
vnorm3(l.normalizedObjPosition.v, l.objPosition.v);
+ c->transforms.mvui.point4(&c->transforms.mvui,
+ &l.objViewer, &eyeViewer);
+ vnorm3(l.objViewer.v, l.objViewer.v);
}
}
@@ -379,9 +384,9 @@
// specular
if (ggl_unlikely(s && l.implicitSpecular.v[3])) {
vec4_t h;
- h.x = d.x;
- h.y = d.y;
- h.z = d.z + 0x10000;
+ h.x = d.x + l.objViewer.x;
+ h.y = d.y + l.objViewer.y;
+ h.z = d.z + l.objViewer.z;
vnorm3(h.v, h.v);
s = dot3(n.v, h.v);
s = (s<0) ? (twoSide?(-s):0) : s;
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 51ee41a..2e2cdb2 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -3997,7 +3997,7 @@
* @param resultCode Result code, if any, from this Activity.
* @param resultData Result data (Intent), if any, from this Activity.
*
- * @result Returns true if the activity successfully finished, or false if it is still running.
+ * @return Returns true if the activity successfully finished, or false if it is still running.
*/
public final boolean finishActivity(IBinder token, int resultCode, Intent resultData) {
// Refuse possible leaked file descriptors
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 878d3b1..715170a 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -228,7 +228,7 @@
}
dat += (preSize+strPos)/sizeof(uint16_t);
if (lenSize > sizeof(uint16_t)) {
- *dat = htods(0x8000 | ((strSize>>16)&0x7ffff));
+ *dat = htods(0x8000 | ((strSize>>16)&0x7fff));
dat++;
}
*dat++ = htods(strSize);
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 74f4284..e862a7a 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -959,7 +959,7 @@
*
* If this MulticastLock is not reference-counted, the first call to
* {@code release} (after the radio was multicast locked using
- * {@linke #acquire}) will unlock the multicast, and subsequent calls
+ * {@link #acquire}) will unlock the multicast, and subsequent calls
* will be ignored.
*
* Note that if any other Wifi Multicast Locks are still outstanding