summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2013-11-15 20:01:26 +0530
committerAmit Pundir <amit.pundir@linaro.org>2013-11-15 20:01:26 +0530
commit23d5846b263f8d9294d78abc106bd5d808d7aa6b (patch)
tree4c6a2f5b2ad45788047e6c957d55479aa3fe7c49
parentefd6819f01f5bddc65f831b357c7545b7f5f8757 (diff)
parent5bcd758d6ba6a46bd35a04518f4ba0c3c7bb2242 (diff)
downloadbase-linaro_android_4.4_juice.tar.gz
Merge android-4.4_r1.1linaro_android_4.4_juice
Android 4.4 Release 1.1 # gpg: Signature made Thursday 14 November 2013 05:28:14 AM IST using DSA key ID 9AB10E78 # gpg: Can't check signature: public key not found * tag 'android-4.4_r1.1': Move set of persist.sys.dalvik.vm.lib to SystemServer only Set persist.sys.dalvik.vm.lib at system server startup
-rw-r--r--api/current.txt17
-rw-r--r--core/java/android/app/AlarmManager.java189
-rw-r--r--core/java/android/transition/TransitionManager.java12
-rw-r--r--core/res/AndroidManifest.xml3
-rw-r--r--core/tests/coretests/apks/version_nosys/Android.mk9
-rw-r--r--core/tests/coretests/apks/version_nosys/AndroidManifest.xml27
-rw-r--r--core/tests/coretests/apks/version_nosys/res/values/strings.xml6
-rw-r--r--core/tests/coretests/apks/version_nosys/src/com/android/frameworks/coretests/version_test/NullProvider.java39
-rw-r--r--media/java/android/media/audiofx/AudioEffect.java2
-rw-r--r--media/java/android/media/audiofx/LoudnessEnhancer.java1
-rw-r--r--services/java/com/android/server/SystemServer.java13
11 files changed, 252 insertions, 66 deletions
diff --git a/api/current.txt b/api/current.txt
index 054f1cdd8b71..8e69592ecabc 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -22,6 +22,7 @@ package android {
field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
field public static final java.lang.String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
+ field public static final java.lang.String BIND_NFC_SERVICE = "android.permission.BIND_NFC_SERVICE";
field public static final java.lang.String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
field public static final java.lang.String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
@@ -3083,18 +3084,18 @@ package android.app {
method public void cancel(android.app.PendingIntent);
method public void set(int, long, android.app.PendingIntent);
method public void setExact(int, long, android.app.PendingIntent);
- method public deprecated void setInexactRepeating(int, long, long, android.app.PendingIntent);
+ method public void setInexactRepeating(int, long, long, android.app.PendingIntent);
method public void setRepeating(int, long, long, android.app.PendingIntent);
method public void setTime(long);
method public void setTimeZone(java.lang.String);
method public void setWindow(int, long, long, android.app.PendingIntent);
field public static final int ELAPSED_REALTIME = 3; // 0x3
field public static final int ELAPSED_REALTIME_WAKEUP = 2; // 0x2
- field public static final deprecated long INTERVAL_DAY = 86400000L; // 0x5265c00L
- field public static final deprecated long INTERVAL_FIFTEEN_MINUTES = 900000L; // 0xdbba0L
- field public static final deprecated long INTERVAL_HALF_DAY = 43200000L; // 0x2932e00L
- field public static final deprecated long INTERVAL_HALF_HOUR = 1800000L; // 0x1b7740L
- field public static final deprecated long INTERVAL_HOUR = 3600000L; // 0x36ee80L
+ field public static final long INTERVAL_DAY = 86400000L; // 0x5265c00L
+ field public static final long INTERVAL_FIFTEEN_MINUTES = 900000L; // 0xdbba0L
+ field public static final long INTERVAL_HALF_DAY = 43200000L; // 0x2932e00L
+ field public static final long INTERVAL_HALF_HOUR = 1800000L; // 0x1b7740L
+ field public static final long INTERVAL_HOUR = 3600000L; // 0x36ee80L
field public static final int RTC = 1; // 0x1
field public static final int RTC_WAKEUP = 0; // 0x0
}
@@ -13227,6 +13228,7 @@ package android.media.audiofx {
field public static final java.util.UUID EFFECT_TYPE_BASS_BOOST;
field public static final java.util.UUID EFFECT_TYPE_ENV_REVERB;
field public static final java.util.UUID EFFECT_TYPE_EQUALIZER;
+ field public static final java.util.UUID EFFECT_TYPE_LOUDNESS_ENHANCER;
field public static final java.util.UUID EFFECT_TYPE_NS;
field public static final java.util.UUID EFFECT_TYPE_PRESET_REVERB;
field public static final java.util.UUID EFFECT_TYPE_VIRTUALIZER;
@@ -13384,6 +13386,7 @@ package android.media.audiofx {
}
public class LoudnessEnhancer extends android.media.audiofx.AudioEffect {
+ ctor public LoudnessEnhancer(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
method public float getTargetGain() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
method public void setTargetGain(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
field public static final int PARAM_TARGET_GAIN_MB = 0; // 0x0
@@ -25632,10 +25635,8 @@ package android.transition {
ctor public TransitionManager();
method public static void beginDelayedTransition(android.view.ViewGroup);
method public static void beginDelayedTransition(android.view.ViewGroup, android.transition.Transition);
- method public static android.transition.Transition getDefaultTransition();
method public static void go(android.transition.Scene);
method public static void go(android.transition.Scene, android.transition.Transition);
- method public void setDefaultTransition(android.transition.Transition);
method public void setTransition(android.transition.Scene, android.transition.Transition);
method public void setTransition(android.transition.Scene, android.transition.Scene, android.transition.Transition);
method public void transitionTo(android.transition.Scene);
diff --git a/core/java/android/app/AlarmManager.java b/core/java/android/app/AlarmManager.java
index 5c3a3e5cde6c..0cf7ad06a291 100644
--- a/core/java/android/app/AlarmManager.java
+++ b/core/java/android/app/AlarmManager.java
@@ -48,6 +48,15 @@ import android.os.WorkSource;
* etc) it is easier and much more efficient to use
* {@link android.os.Handler}.</b>
*
+ * <p class="caution"><strong>Note:</strong> Beginning with API 19
+ * ({@link android.os.Build.VERSION_CODES#KITKAT}) alarm delivery is inexact:
+ * the OS will shift alarms in order to minimize wakeups and battery use. There are
+ * new APIs to support applications which need strict delivery guarantees; see
+ * {@link #setWindow(int, long, long, PendingIntent)} and
+ * {@link #setExact(int, long, PendingIntent)}. Applications whose {@code targetSdkVersion}
+ * is earlier than API 19 will continue to see the previous behavior in which all
+ * alarms are delivered exactly when requested.
+ *
* <p>You do not
* instantiate this class directly; instead, retrieve it through
* {@link android.content.Context#getSystemService
@@ -109,21 +118,19 @@ public class AlarmManager
}
/**
- * TBW: discussion of fuzzy nature of alarms in KLP+.
- *
* <p>Schedule an alarm. <b>Note: for timing operations (ticks, timeouts,
- * etc) it is easier and much more efficient to use
- * {@link android.os.Handler}.</b> If there is already an alarm scheduled
- * for the same IntentSender, it will first be canceled.
+ * etc) it is easier and much more efficient to use {@link android.os.Handler}.</b>
+ * If there is already an alarm scheduled for the same IntentSender, that previous
+ * alarm will first be canceled.
*
- * <p>If the time occurs in the past, the alarm will be triggered
+ * <p>If the stated trigger time is in the past, the alarm will be triggered
* immediately. If there is already an alarm for this Intent
* scheduled (with the equality of two intents being defined by
* {@link Intent#filterEquals}), then it will be removed and replaced by
* this one.
*
* <p>
- * The alarm is an intent broadcast that goes to a broadcast receiver that
+ * The alarm is an Intent broadcast that goes to a broadcast receiver that
* you registered with {@link android.content.Context#registerReceiver}
* or through the &lt;receiver&gt; tag in an AndroidManifest.xml file.
*
@@ -133,9 +140,34 @@ public class AlarmManager
* how many past alarm events have been accumulated into this intent
* broadcast. Recurring alarms that have gone undelivered because the
* phone was asleep may have a count greater than one when delivered.
- *
- * @param type One of ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP, RTC or
- * RTC_WAKEUP.
+ *
+ * <div class="note">
+ * <p>
+ * <b>Note:</b> Beginning in API 19, the trigger time passed to this method
+ * is treated as inexact: the alarm will not be delivered before this time, but
+ * may be deferred and delivered some time later. The OS will use
+ * this policy in order to "batch" alarms together across the entire system,
+ * minimizing the number of times the device needs to "wake up" and minimizing
+ * battery use. In general, alarms scheduled in the near future will not
+ * be deferred as long as alarms scheduled far in the future.
+ *
+ * <p>
+ * With the new batching policy, delivery ordering guarantees are not as
+ * strong as they were previously. If the application sets multiple alarms,
+ * it is possible that these alarms' <em>actual</em> delivery ordering may not match
+ * the order of their <em>requested</em> delivery times. If your application has
+ * strong ordering requirements there are other APIs that you can use to get
+ * the necessary behavior; see {@link #setWindow(int, long, long, PendingIntent)}
+ * and {@link #setExact(int, long, PendingIntent)}.
+ *
+ * <p>
+ * Applications whose {@code targetSdkVersion} is before API 19 will
+ * continue to get the previous alarm behavior: all of their scheduled alarms
+ * will be treated as exact.
+ * </div>
+ *
+ * @param type One of {@link #ELAPSED_REALTIME}, {@link #ELAPSED_REALTIME_WAKEUP},
+ * {@link #RTC}, or {@link #RTC_WAKEUP}.
* @param triggerAtMillis time in milliseconds that the alarm should go
* off, using the appropriate clock (depending on the alarm type).
* @param operation Action to perform when the alarm goes off;
@@ -165,10 +197,10 @@ public class AlarmManager
* {@link android.os.Handler}.</b> If there is already an alarm scheduled
* for the same IntentSender, it will first be canceled.
*
- * <p>Like {@link #set}, except you can also
- * supply a rate at which the alarm will repeat. This alarm continues
- * repeating until explicitly removed with {@link #cancel}. If the time
- * occurs in the past, the alarm will be triggered immediately, with an
+ * <p>Like {@link #set}, except you can also supply a period at which
+ * the alarm will automatically repeat. This alarm continues
+ * repeating until explicitly removed with {@link #cancel}. If the stated
+ * trigger time is in the past, the alarm will be triggered immediately, with an
* alarm count depending on how far in the past the trigger time is relative
* to the repeat interval.
*
@@ -185,8 +217,15 @@ public class AlarmManager
* between alarms, then the approach to take is to use one-time alarms,
* scheduling the next one yourself when handling each alarm delivery.
*
- * @param type One of ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP}, RTC or
- * RTC_WAKEUP.
+ * <p class="note">
+ * <b>Note:</b> as of API 19, all repeating alarms are inexact. If your
+ * application needs precise delivery times then it must use one-time
+ * exact alarms, rescheduling each time as described above. Legacy applications
+ * whose {@code targetSdkVersion} is earlier than API 19 will continue to have all
+ * of their alarms, including repeating alarms, treated as exact.
+ *
+ * @param type One of {@link #ELAPSED_REALTIME}, {@link #ELAPSED_REALTIME_WAKEUP},
+ * {@link #RTC}, or {@link #RTC_WAKEUP}.
* @param triggerAtMillis time in milliseconds that the alarm should first
* go off, using the appropriate clock (depending on the alarm type).
* @param intervalMillis interval in milliseconds between subsequent repeats
@@ -214,18 +253,33 @@ public class AlarmManager
}
/**
- * Schedule an alarm to be delivered within a given window of time.
+ * Schedule an alarm to be delivered within a given window of time. This method
+ * is similar to {@link #set(int, long, PendingIntent)}, but allows the
+ * application to precisely control the degree to which its delivery might be
+ * adjusted by the OS. This method allows an application to take advantage of the
+ * battery optimizations that arise from delivery batching even when it has
+ * modest timeliness requirements for its alarms.
*
- * TBW: clean up these docs
+ * <p>
+ * This method can also be used to achieve strict ordering guarantees among
+ * multiple alarms by ensuring that the windows requested for each alarm do
+ * not intersect.
+ *
+ * <p>
+ * When precise delivery is not required, applications should use the standard
+ * {@link #set(int, long, PendingIntent)} method. This will give the OS the most
+ * flexibility to minimize wakeups and battery use. For alarms that must be delivered
+ * at precisely-specified times with no acceptable variation, applications can use
+ * {@link #setExact(int, long, PendingIntent)}.
*
- * @param type One of ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP, RTC or
- * RTC_WAKEUP.
+ * @param type One of {@link #ELAPSED_REALTIME}, {@link #ELAPSED_REALTIME_WAKEUP},
+ * {@link #RTC}, or {@link #RTC_WAKEUP}.
* @param windowStartMillis The earliest time, in milliseconds, that the alarm should
* be delivered, expressed in the appropriate clock's units (depending on the alarm
* type).
* @param windowLengthMillis The length of the requested delivery window,
* in milliseconds. The alarm will be delivered no later than this many
- * milliseconds after the windowStartMillis time. Note that this parameter
+ * milliseconds after {@code windowStartMillis}. Note that this parameter
* is a <i>duration,</i> not the timestamp of the end of the window.
* @param operation Action to perform when the alarm goes off;
* typically comes from {@link PendingIntent#getBroadcast
@@ -249,8 +303,38 @@ public class AlarmManager
}
/**
- * TBW: new 'exact' alarm that must be delivered as nearly as possible
- * to the precise time specified.
+ * Schedule an alarm to be delivered precisely at the stated time.
+ *
+ * <p>
+ * This method is like {@link #set(int, long, PendingIntent)}, but does not permit
+ * the OS to adjust the delivery time. The alarm will be delivered as nearly as
+ * possible to the requested trigger time.
+ *
+ * <p>
+ * <b>Note:</b> only alarms for which there is a strong demand for exact-time
+ * delivery (such as an alarm clock ringing at the requested time) should be
+ * scheduled as exact. Applications are strongly discouraged from using exact
+ * alarms unnecessarily as they reduce the OS's ability to minimize battery use.
+ *
+ * @param type One of {@link #ELAPSED_REALTIME}, {@link #ELAPSED_REALTIME_WAKEUP},
+ * {@link #RTC}, or {@link #RTC_WAKEUP}.
+ * @param triggerAtMillis time in milliseconds that the alarm should go
+ * off, using the appropriate clock (depending on the alarm type).
+ * @param operation Action to perform when the alarm goes off;
+ * typically comes from {@link PendingIntent#getBroadcast
+ * IntentSender.getBroadcast()}.
+ *
+ * @see #set
+ * @see #setRepeating
+ * @see #setWindow
+ * @see #cancel
+ * @see android.content.Context#sendBroadcast
+ * @see android.content.Context#registerReceiver
+ * @see android.content.Intent#filterEquals
+ * @see #ELAPSED_REALTIME
+ * @see #ELAPSED_REALTIME_WAKEUP
+ * @see #RTC
+ * @see #RTC_WAKEUP
*/
public void setExact(int type, long triggerAtMillis, PendingIntent operation) {
setImpl(type, triggerAtMillis, WINDOW_EXACT, 0, operation, null);
@@ -283,74 +367,82 @@ public class AlarmManager
}
/**
- * @deprecated setInexactRepeating() is deprecated; as of API 19 all
- * repeating alarms are inexact.
+ * Available inexact recurrence interval recognized by
+ * {@link #setInexactRepeating(int, long, long, PendingIntent)}
+ * when running on Android prior to API 19.
*/
- @Deprecated
public static final long INTERVAL_FIFTEEN_MINUTES = 15 * 60 * 1000;
/**
- * @deprecated setInexactRepeating() is deprecated; as of API 19 all
- * repeating alarms are inexact.
+ * Available inexact recurrence interval recognized by
+ * {@link #setInexactRepeating(int, long, long, PendingIntent)}
+ * when running on Android prior to API 19.
*/
- @Deprecated
public static final long INTERVAL_HALF_HOUR = 2*INTERVAL_FIFTEEN_MINUTES;
/**
- * @deprecated setInexactRepeating() is deprecated; as of API 19 all
- * repeating alarms are inexact.
+ * Available inexact recurrence interval recognized by
+ * {@link #setInexactRepeating(int, long, long, PendingIntent)}
+ * when running on Android prior to API 19.
*/
- @Deprecated
public static final long INTERVAL_HOUR = 2*INTERVAL_HALF_HOUR;
/**
- * @deprecated setInexactRepeating() is deprecated; as of API 19 all
- * repeating alarms are inexact.
+ * Available inexact recurrence interval recognized by
+ * {@link #setInexactRepeating(int, long, long, PendingIntent)}
+ * when running on Android prior to API 19.
*/
- @Deprecated
public static final long INTERVAL_HALF_DAY = 12*INTERVAL_HOUR;
/**
- * @deprecated setInexactRepeating() is deprecated; as of API 19 all
- * repeating alarms are inexact.
+ * Available inexact recurrence interval recognized by
+ * {@link #setInexactRepeating(int, long, long, PendingIntent)}
+ * when running on Android prior to API 19.
*/
- @Deprecated
public static final long INTERVAL_DAY = 2*INTERVAL_HALF_DAY;
/**
* Schedule a repeating alarm that has inexact trigger time requirements;
* for example, an alarm that repeats every hour, but not necessarily at
* the top of every hour. These alarms are more power-efficient than
- * the strict recurrences supplied by {@link #setRepeating}, since the
- * system can adjust alarms' phase to cause them to fire simultaneously,
+ * the strict recurrences traditionally supplied by {@link #setRepeating}, since the
+ * system can adjust alarms' delivery times to cause them to fire simultaneously,
* avoiding waking the device from sleep more than necessary.
- *
+ *
* <p>Your alarm's first trigger will not be before the requested time,
* but it might not occur for almost a full interval after that time. In
* addition, while the overall period of the repeating alarm will be as
* requested, the time between any two successive firings of the alarm
* may vary. If your application demands very low jitter, use
- * {@link #setRepeating} instead.
+ * one-shot alarms with an appropriate window instead; see {@link
+ * #setWindow(int, long, long, PendingIntent)} and
+ * {@link #setExact(int, long, PendingIntent)}.
*
- * @param type One of ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP}, RTC or
- * RTC_WAKEUP.
+ * <p class="note">
+ * As of API 19, all repeating alarms are inexact. Because this method has
+ * been available since API 3, your application can safely call it and be
+ * assured that it will get similar behavior on both current and older versions
+ * of Android.
+ *
+ * @param type One of {@link #ELAPSED_REALTIME}, {@link #ELAPSED_REALTIME_WAKEUP},
+ * {@link #RTC}, or {@link #RTC_WAKEUP}.
* @param triggerAtMillis time in milliseconds that the alarm should first
* go off, using the appropriate clock (depending on the alarm type). This
* is inexact: the alarm will not fire before this time, but there may be a
* delay of almost an entire alarm interval before the first invocation of
* the alarm.
* @param intervalMillis interval in milliseconds between subsequent repeats
- * of the alarm. If this is one of INTERVAL_FIFTEEN_MINUTES,
+ * of the alarm. Prior to API 19, if this is one of INTERVAL_FIFTEEN_MINUTES,
* INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_HALF_DAY, or INTERVAL_DAY
* then the alarm will be phase-aligned with other alarms to reduce the
* number of wakeups. Otherwise, the alarm will be set as though the
- * application had called {@link #setRepeating}.
+ * application had called {@link #setRepeating}. As of API 19, all repeating
+ * alarms will be inexact and subject to batching with other alarms regardless
+ * of their stated repeat interval.
* @param operation Action to perform when the alarm goes off;
* typically comes from {@link PendingIntent#getBroadcast
* IntentSender.getBroadcast()}.
*
- * @deprecated As of API 19, all repeating alarms are inexact.
- *
* @see android.os.Handler
* @see #set
* @see #cancel
@@ -367,7 +459,6 @@ public class AlarmManager
* @see #INTERVAL_HALF_DAY
* @see #INTERVAL_DAY
*/
- @Deprecated
public void setInexactRepeating(int type, long triggerAtMillis,
long intervalMillis, PendingIntent operation) {
setImpl(type, triggerAtMillis, WINDOW_HEURISTIC, intervalMillis, operation, null);
diff --git a/core/java/android/transition/TransitionManager.java b/core/java/android/transition/TransitionManager.java
index 404709c6a112..82789b862137 100644
--- a/core/java/android/transition/TransitionManager.java
+++ b/core/java/android/transition/TransitionManager.java
@@ -81,6 +81,8 @@ public class TransitionManager {
* an {@link AutoTransition} instance.
*
* @param transition The default transition to be used for scene changes.
+ *
+ * @hide pending later changes
*/
public void setDefaultTransition(Transition transition) {
sDefaultTransition = transition;
@@ -92,6 +94,8 @@ public class TransitionManager {
*
* @return The current default transition.
* @see #setDefaultTransition(Transition)
+ *
+ * @hide pending later changes
*/
public static Transition getDefaultTransition() {
return sDefaultTransition;
@@ -104,7 +108,7 @@ public class TransitionManager {
* transition to run.
* @param transition The transition that will play when the given scene is
* entered. A value of null will result in the default behavior of
- * using the {@link #getDefaultTransition() default transition} instead.
+ * using the default transition instead.
*/
public void setTransition(Scene scene, Transition transition) {
mSceneTransitions.put(scene, transition);
@@ -120,7 +124,7 @@ public class TransitionManager {
* be run
* @param transition The transition that will play when the given scene is
* entered. A value of null will result in the default behavior of
- * using the {@link #getDefaultTransition() default transition} instead.
+ * using the default transition instead.
*/
public void setTransition(Scene fromScene, Scene toScene, Transition transition) {
ArrayMap<Scene, Transition> sceneTransitionMap = mScenePairTransitions.get(toScene);
@@ -138,8 +142,8 @@ public class TransitionManager {
*
* @param scene The scene being entered
* @return The Transition to be used for the given scene change. If no
- * Transition was specified for this scene change, the {@link #getDefaultTransition()
- * default transition} will be used instead.
+ * Transition was specified for this scene change, the default transition
+ * will be used instead.
*/
private Transition getTransition(Scene scene) {
Transition transition = null;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index eba6231a0b7c..bd52f492ab7e 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1958,8 +1958,7 @@
<!-- Must be required by a {@link android.nfc.cardemulation.HostApduService}
or {@link android.nfc.cardemulation.OffHostApduService} to ensure that only
- the system can bind to it.
- @hide -->
+ the system can bind to it. -->
<permission android:name="android.permission.BIND_NFC_SERVICE"
android:label="@string/permlab_bindNfcService"
android:description="@string/permdesc_bindNfcService"
diff --git a/core/tests/coretests/apks/version_nosys/Android.mk b/core/tests/coretests/apks/version_nosys/Android.mk
new file mode 100644
index 000000000000..bbc8e12afe8d
--- /dev/null
+++ b/core/tests/coretests/apks/version_nosys/Android.mk
@@ -0,0 +1,9 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+LOCAL_PACKAGE_NAME := version_1_nosys
+LOCAL_AAPT_FLAGS := --version-code 1 --version-name 1.0
+LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test
+include $(FrameworkCoreTests_BUILD_PACKAGE)
+
diff --git a/core/tests/coretests/apks/version_nosys/AndroidManifest.xml b/core/tests/coretests/apks/version_nosys/AndroidManifest.xml
new file mode 100644
index 000000000000..46aac38cac41
--- /dev/null
+++ b/core/tests/coretests/apks/version_nosys/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.frameworks.coretests.version_test">
+
+ <!-- Do not ask for this system permission -->
+<!-- <uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
+-->
+ <!-- Which permission it uses is not important as long as it's a normal
+ permission -->
+ <uses-permission android:name="android.permission.VIBRATE" />
+
+ <application android:hasCode="false"/>
+</manifest>
diff --git a/core/tests/coretests/apks/version_nosys/res/values/strings.xml b/core/tests/coretests/apks/version_nosys/res/values/strings.xml
new file mode 100644
index 000000000000..3b8b3b1af9b5
--- /dev/null
+++ b/core/tests/coretests/apks/version_nosys/res/values/strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Just need this dummy file to have something to build. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="dummy">dummy</string>
+</resources>
diff --git a/core/tests/coretests/apks/version_nosys/src/com/android/frameworks/coretests/version_test/NullProvider.java b/core/tests/coretests/apks/version_nosys/src/com/android/frameworks/coretests/version_test/NullProvider.java
new file mode 100644
index 000000000000..f5742f0f277f
--- /dev/null
+++ b/core/tests/coretests/apks/version_nosys/src/com/android/frameworks/coretests/version_test/NullProvider.java
@@ -0,0 +1,39 @@
+package com.android.frameworks.coretests.version_test;
+
+import android.content.ContentProvider;
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.net.Uri;
+
+public class NullProvider extends ContentProvider {
+ @Override
+ public boolean onCreate() {
+ return true;
+ }
+
+ @Override
+ public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
+ String sortOrder) {
+ return null;
+ }
+
+ @Override
+ public Uri insert(Uri uri, ContentValues values) {
+ return null;
+ }
+
+ @Override
+ public int delete(Uri uri, String selection, String[] selectionArgs) {
+ return 0;
+ }
+
+ @Override
+ public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
+ return 0;
+ }
+
+ @Override
+ public String getType(Uri uri) {
+ return "text/plain";
+ }
+}
diff --git a/media/java/android/media/audiofx/AudioEffect.java b/media/java/android/media/audiofx/AudioEffect.java
index 12f7bd9a9956..1e1ef8c44768 100644
--- a/media/java/android/media/audiofx/AudioEffect.java
+++ b/media/java/android/media/audiofx/AudioEffect.java
@@ -120,8 +120,6 @@ public class AudioEffect {
.fromString("58b4b260-8e06-11e0-aa8e-0002a5d5c51b");
/**
- * @hide
- * CANDIDATE FOR PUBLIC API
* UUID for Loudness Enhancer
*/
public static final UUID EFFECT_TYPE_LOUDNESS_ENHANCER = UUID
diff --git a/media/java/android/media/audiofx/LoudnessEnhancer.java b/media/java/android/media/audiofx/LoudnessEnhancer.java
index eb2fb753e59c..7dc417534bca 100644
--- a/media/java/android/media/audiofx/LoudnessEnhancer.java
+++ b/media/java/android/media/audiofx/LoudnessEnhancer.java
@@ -65,7 +65,6 @@ public class LoudnessEnhancer extends AudioEffect {
private final Object mParamListenerLock = new Object();
/**
- * @hide
* Class constructor.
* @param audioSession system-wide unique audio session identifier. The LoudnessEnhancer
* will be attached to the MediaPlayer or AudioTrack in the same audio session.
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 0e0f15625823..bb1425952c1c 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1104,6 +1104,19 @@ public class SystemServer {
private static native void nativeInit();
public static void main(String[] args) {
+
+ /*
+ * In case the runtime switched since last boot (such as when
+ * the old runtime was removed in an OTA), set the system
+ * property so that it is in sync. We can't do this in
+ * libnativehelper's JniInvocation::Init code where we already
+ * had to fallback to a different runtime because it is
+ * running as root and we need to be the system user to set
+ * the property. http://b/11463182
+ */
+ SystemProperties.set("persist.sys.dalvik.vm.lib",
+ VMRuntime.getRuntime().vmLibrary());
+
if (System.currentTimeMillis() < EARLIEST_SUPPORTED_TIME) {
// If a device's clock is before 1970 (before 0), a lot of
// APIs crash dealing with negative numbers, notably