Merge "Check if VoIP API is supported in SipManager." into gingerbread
diff --git a/api/current.xml b/api/current.xml
index 893f2d2..e987335 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -147094,6 +147094,92 @@
>
</field>
</class>
+<class name="RecognizerResultsIntent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="ACTION_VOICE_SEARCH_RESULTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.speech.action.VOICE_SEARCH_RESULTS""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOICE_SEARCH_RESULT_HTML"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.speech.extras.VOICE_SEARCH_RESULT_HTML""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOICE_SEARCH_RESULT_HTML_BASE_URLS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.speech.extras.VOICE_SEARCH_RESULT_HTML_BASE_URLS""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOICE_SEARCH_RESULT_HTTP_HEADERS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.speech.extras.EXTRA_VOICE_SEARCH_RESULT_HTTP_HEADERS""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOICE_SEARCH_RESULT_STRINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.speech.extras.VOICE_SEARCH_RESULT_STRINGS""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOICE_SEARCH_RESULT_URLS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.speech.extras.VOICE_SEARCH_RESULT_URLS""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URI_SCHEME_INLINE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""inline""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
<class name="SpeechRecognizer"
extends="java.lang.Object"
abstract="false"
@@ -224617,7 +224703,7 @@
deprecated="not deprecated"
visibility="public"
>
-<parameter name="arg0" type="T">
+<parameter name="t" type="T">
</parameter>
</method>
</interface>
diff --git a/core/java/android/speech/RecognizerResultsIntent.java b/core/java/android/speech/RecognizerResultsIntent.java
index b45e4b1..15ac57c 100644
--- a/core/java/android/speech/RecognizerResultsIntent.java
+++ b/core/java/android/speech/RecognizerResultsIntent.java
@@ -34,8 +34,6 @@
* the search results. If that is not available, then the corresponding url for that result in
* {@link #EXTRA_VOICE_SEARCH_RESULT_URLS} should be used. And if even that is not available,
* then a search url should be constructed from the actual recognition result string.
- *
- * @hide for making public in a later release
*/
public class RecognizerResultsIntent {
private RecognizerResultsIntent() {
@@ -58,8 +56,6 @@
* and, possibly, the full html to display for that result at index N of
* {@link #EXTRA_VOICE_SEARCH_RESULT_HTML}. If full html is provided, a base url (or
* list of base urls) should be provided with {@link #EXTRA_VOICE_SEARCH_RESULT_HTML_BASE_URLS}.
- *
- * @hide for making public in a later release
*/
public static final String ACTION_VOICE_SEARCH_RESULTS =
"android.speech.action.VOICE_SEARCH_RESULTS";
@@ -67,8 +63,6 @@
/**
* The key to an extra {@link ArrayList} of {@link String}s that contains the list of
* recognition alternates from voice search, in order from highest to lowest confidence.
- *
- * @hide for making public in a later release
*/
public static final String EXTRA_VOICE_SEARCH_RESULT_STRINGS =
"android.speech.extras.VOICE_SEARCH_RESULT_STRINGS";
@@ -81,8 +75,6 @@
* search url, that entry in this ArrayList should be <code>null</code>, and the implementor of
* {@link #ACTION_VOICE_SEARCH_RESULTS} should execute a search of its own choosing,
* based on the recognition result string.
- *
- * @hide for making public in a later release
*/
public static final String EXTRA_VOICE_SEARCH_RESULT_URLS =
"android.speech.extras.VOICE_SEARCH_RESULT_URLS";
@@ -102,8 +94,6 @@
* uri or some other identifier. Anyone who reads this extra should confirm that a result is
* in fact an "inline:" uri and back off to the urls or strings gracefully if it is not, thus
* maintaining future backwards compatibility if this changes.
- *
- * @hide not to be exposed immediately as the implementation details may change
*/
public static final String EXTRA_VOICE_SEARCH_RESULT_HTML =
"android.speech.extras.VOICE_SEARCH_RESULT_HTML";
@@ -116,8 +106,6 @@
* A list of the same size as {@link #EXTRA_VOICE_SEARCH_RESULT_STRINGS} may be provided
* to apply different base urls to each different html result in the
* {@link #EXTRA_VOICE_SEARCH_RESULT_HTML} list.
- *
- * @hide not to be exposed immediately as the implementation details may change
*/
public static final String EXTRA_VOICE_SEARCH_RESULT_HTML_BASE_URLS =
"android.speech.extras.VOICE_SEARCH_RESULT_HTML_BASE_URLS";
@@ -132,16 +120,14 @@
* apply different HTTP headers to each different web result in the list. These headers will
* only be used in the case that the url for a particular web result (from
* {@link #EXTRA_VOICE_SEARCH_RESULT_URLS}) is loaded.
- *
- * @hide not to be exposed immediately as the implementation details may change
*/
public static final String EXTRA_VOICE_SEARCH_RESULT_HTTP_HEADERS =
"android.speech.extras.EXTRA_VOICE_SEARCH_RESULT_HTTP_HEADERS";
/**
* The scheme used currently for html content in {@link #EXTRA_VOICE_SEARCH_RESULT_HTML}.
- *
- * @hide not to be exposed immediately as the implementation details may change
+ * Note that this should only be used in tandem with this particular extra; it should
+ * NOT be used for generic URIs such as those found in the data field of an Intent.
*/
public static final String URI_SCHEME_INLINE = "inline";
}
diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java
index 60ca384..85ce5e1 100644
--- a/core/java/android/util/TimeUtils.java
+++ b/core/java/android/util/TimeUtils.java
@@ -158,18 +158,17 @@
static private int printField(char[] formatStr, int amt, char suffix, int pos,
boolean always, int zeropad) {
if (always || amt > 0) {
+ final int startPos = pos;
if ((always && zeropad >= 3) || amt > 99) {
int dig = amt/100;
formatStr[pos] = (char)(dig + '0');
pos++;
- always = true;
amt -= (dig*100);
}
- if ((always && zeropad >= 2) || amt > 9) {
+ if ((always && zeropad >= 2) || amt > 9 || startPos != pos) {
int dig = amt/10;
formatStr[pos] = (char)(dig + '0');
pos++;
- always = true;
amt -= (dig*10);
}
formatStr[pos] = (char)(amt + '0');
diff --git a/core/tests/coretests/src/android/util/TimeUtilsTest.java b/core/tests/coretests/src/android/util/TimeUtilsTest.java
index 65a6078..8d9f8e5 100644
--- a/core/tests/coretests/src/android/util/TimeUtilsTest.java
+++ b/core/tests/coretests/src/android/util/TimeUtilsTest.java
@@ -429,4 +429,22 @@
c.getTimeInMillis(),
country);
}
+
+ public void testFormatDuration() {
+ assertFormatDuration("0", 0);
+ assertFormatDuration("-1ms", -1);
+ assertFormatDuration("+1ms", 1);
+ assertFormatDuration("+10ms", 10);
+ assertFormatDuration("+100ms", 100);
+ assertFormatDuration("+101ms", 101);
+ assertFormatDuration("+330ms", 330);
+ assertFormatDuration("+1s330ms", 1330);
+ assertFormatDuration("+10s24ms", 10024);
+ }
+
+ private void assertFormatDuration(String expected, long duration) {
+ StringBuilder sb = new StringBuilder();
+ TimeUtils.formatDuration(duration, sb);
+ assertEquals("formatDuration(" + duration + ")", expected, sb.toString());
+ }
}
diff --git a/docs/html/sdk/android-2.3.jd b/docs/html/sdk/android-2.3.jd
index 33affcb..c9d5c9b0 100644
--- a/docs/html/sdk/android-2.3.jd
+++ b/docs/html/sdk/android-2.3.jd
@@ -238,9 +238,8 @@
<ul>
<li>New {@link android.hardware.Camera.CameraInfo} class stores a camera's
positional characteristics (orientation, front-facing or back-facing).</li>
-<li>New {@link android.hardware.Camera#getNumberOfCameras()}, {@link
-android.hardware.Camera#getCameraInfo(int,CameraInfo) getCameraInfo()}, and
-{@link android.hardware.Camera#getNumberOfCameras()} methods in the {@link
+<li>New {@link android.hardware.Camera#getNumberOfCameras()} and {@link
+android.hardware.Camera#getCameraInfo(int,CameraInfo) getCameraInfo()} methods in the {@link
android.hardware.Camera} class let applications query for the cameras available
and open the camera that they need.</li>
<li>New {@link android.media.CamcorderProfile get(int,int) method lets
@@ -691,7 +690,7 @@
<li><code>"reverseLandscape"</code> — The Activity would like to have the
screen in landscape orientation, turned in the opposite direction from normal
landscape.</li>
-<li><code>"reversePortait"</code> — The Activity would like to have the
+<li><code>"reversePortrait"</code> — The Activity would like to have the
screen in portrait orientation, turned in the opposite direction from normal
portrait.</li>
<li><code>"sensorLandscape"</code> — The Activity would like to have the
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 92c6619..90a2c79 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -572,6 +572,7 @@
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, &mGL.mMaxFragmentUniformVectors);
mGL.OES_texture_npot = NULL != strstr((const char *)mGL.mExtensions, "GL_OES_texture_npot");
+ mGL.GL_IMG_texture_npot = NULL != strstr((const char *)mGL.mExtensions, "GL_IMG_texture_npot");
}
}
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 709730e..e24fd09 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -166,6 +166,7 @@
mutable const ObjectBase * mObjHead;
bool ext_OES_texture_npot() const {return mGL.OES_texture_npot;}
+ bool ext_GL_IMG_texture_npot() const {return mGL.GL_IMG_texture_npot;}
protected:
Device *mDev;
@@ -202,6 +203,7 @@
int32_t mMaxVertexTextureUnits;
bool OES_texture_npot;
+ bool GL_IMG_texture_npot;
} mGL;
uint32_t mWidth;
diff --git a/libs/rs/rsSampler.cpp b/libs/rs/rsSampler.cpp
index 71f508f..5693c8a 100644
--- a/libs/rs/rsSampler.cpp
+++ b/libs/rs/rsSampler.cpp
@@ -70,7 +70,11 @@
}
if ((mMinFilter == RS_SAMPLER_LINEAR_MIP_LINEAR) && forceNonMip) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ if (rsc->ext_GL_IMG_texture_npot()) {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
+ } else {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ }
} else {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
}
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index a663c3a..bc102e4 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -997,6 +997,7 @@
// a positive report we don't want to overwrite, but if not we need to clear this now
// to turn our cellular sig strength white
mDefaultInetConditionPublished = 0;
+ intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true);
}
intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo);
} else {