summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/ActivityManagerNative.java2
-rw-r--r--core/java/android/app/ActivityThread.java7
-rw-r--r--core/java/android/app/BackStackRecord.java158
-rw-r--r--core/java/android/app/FragmentManager.java40
-rw-r--r--core/java/android/content/Context.java15
-rw-r--r--core/java/android/content/SyncManager.java13
-rw-r--r--core/java/android/hardware/display/DisplayManager.java11
-rw-r--r--core/java/android/hardware/display/IDisplayManager.aidl9
-rw-r--r--core/java/android/net/SSLCertificateSocketFactory.java40
-rw-r--r--core/java/android/net/http/AndroidHttpClient.java33
-rw-r--r--core/java/android/os/IPowerManager.aidl1
-rw-r--r--core/java/android/os/PowerManager.java34
-rw-r--r--core/java/android/os/SystemClock.java4
-rw-r--r--core/java/android/provider/Settings.java699
-rw-r--r--core/java/android/service/dreams/Dream.java10
-rw-r--r--core/java/android/service/dreams/IDreamManager.aidl2
-rw-r--r--core/java/android/view/ScaleGestureDetector.java4
-rw-r--r--core/java/android/view/SurfaceView.java13
-rw-r--r--core/java/android/widget/ImageView.java2
-rw-r--r--core/java/com/android/internal/app/ResolverActivity.java5
20 files changed, 263 insertions, 839 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 9b08493..9874b0b 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -1509,9 +1509,9 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
case DUMP_HEAP_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
String process = data.readString();
+ int userId = data.readInt();
boolean managed = data.readInt() != 0;
String path = data.readString();
- int userId = data.readInt();
ParcelFileDescriptor fd = data.readInt() != 0
? data.readFileDescriptor() : null;
boolean res = dumpHeap(process, userId, managed, path, fd);
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index d4b204f..6638433 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -2711,7 +2711,7 @@ public final class ActivityThread {
r.activity.performResume();
EventLog.writeEvent(LOG_ON_RESUME_CALLED,
- r.activity.getComponentName().getClassName());
+ UserHandle.myUserId(), r.activity.getComponentName().getClassName());
r.paused = false;
r.stopped = false;
@@ -2979,7 +2979,8 @@ public final class ActivityThread {
// Now we are idle.
r.activity.mCalled = false;
mInstrumentation.callActivityOnPause(r.activity);
- EventLog.writeEvent(LOG_ON_PAUSE_CALLED, r.activity.getComponentName().getClassName());
+ EventLog.writeEvent(LOG_ON_PAUSE_CALLED, UserHandle.myUserId(),
+ r.activity.getComponentName().getClassName());
if (!r.activity.mCalled) {
throw new SuperNotCalledException(
"Activity " + r.intent.getComponent().toShortString() +
@@ -3364,7 +3365,7 @@ public final class ActivityThread {
try {
r.activity.mCalled = false;
mInstrumentation.callActivityOnPause(r.activity);
- EventLog.writeEvent(LOG_ON_PAUSE_CALLED,
+ EventLog.writeEvent(LOG_ON_PAUSE_CALLED, UserHandle.myUserId(),
r.activity.getComponentName().getClassName());
if (!r.activity.mCalled) {
throw new SuperNotCalledException(
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index 96814b7..1b1d341 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -20,6 +20,7 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.Log;
+import android.util.LogWriter;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -94,11 +95,12 @@ final class BackStackState implements Parcelable {
public BackStackRecord instantiate(FragmentManagerImpl fm) {
BackStackRecord bse = new BackStackRecord(fm);
int pos = 0;
+ int num = 0;
while (pos < mOps.length) {
BackStackRecord.Op op = new BackStackRecord.Op();
op.cmd = mOps[pos++];
if (FragmentManagerImpl.DEBUG) Log.v(FragmentManagerImpl.TAG,
- "BSE " + bse + " set base fragment #" + mOps[pos]);
+ "Instantiate " + bse + " op #" + num + " base fragment #" + mOps[pos]);
int findex = mOps[pos++];
if (findex >= 0) {
Fragment f = fm.mActive.get(findex);
@@ -115,12 +117,13 @@ final class BackStackState implements Parcelable {
op.removed = new ArrayList<Fragment>(N);
for (int i=0; i<N; i++) {
if (FragmentManagerImpl.DEBUG) Log.v(FragmentManagerImpl.TAG,
- "BSE " + bse + " set remove fragment #" + mOps[pos]);
+ "Instantiate " + bse + " set remove fragment #" + mOps[pos]);
Fragment r = fm.mActive.get(mOps[pos++]);
op.removed.add(r);
}
}
bse.addOp(op);
+ num++;
}
bse.mTransition = mTransition;
bse.mTransitionStyle = mTransitionStyle;
@@ -168,7 +171,7 @@ final class BackStackState implements Parcelable {
*/
final class BackStackRecord extends FragmentTransaction implements
FragmentManager.BackStackEntry, Runnable {
- static final String TAG = "BackStackEntry";
+ static final String TAG = FragmentManagerImpl.TAG;
final FragmentManagerImpl mManager;
@@ -206,46 +209,69 @@ final class BackStackRecord extends FragmentTransaction implements
boolean mAllowAddToBackStack = true;
String mName;
boolean mCommitted;
- int mIndex;
+ int mIndex = -1;
int mBreadCrumbTitleRes;
CharSequence mBreadCrumbTitleText;
int mBreadCrumbShortTitleRes;
CharSequence mBreadCrumbShortTitleText;
- public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
- writer.print(prefix); writer.print("mName="); writer.print(mName);
- writer.print(" mIndex="); writer.print(mIndex);
- writer.print(" mCommitted="); writer.println(mCommitted);
- if (mTransition != FragmentTransaction.TRANSIT_NONE) {
- writer.print(prefix); writer.print("mTransition=#");
- writer.print(Integer.toHexString(mTransition));
- writer.print(" mTransitionStyle=#");
- writer.println(Integer.toHexString(mTransitionStyle));
- }
- if (mEnterAnim != 0 || mExitAnim !=0) {
- writer.print(prefix); writer.print("mEnterAnim=#");
- writer.print(Integer.toHexString(mEnterAnim));
- writer.print(" mExitAnim=#");
- writer.println(Integer.toHexString(mExitAnim));
- }
- if (mPopEnterAnim != 0 || mPopExitAnim !=0) {
- writer.print(prefix); writer.print("mPopEnterAnim=#");
- writer.print(Integer.toHexString(mPopEnterAnim));
- writer.print(" mPopExitAnim=#");
- writer.println(Integer.toHexString(mPopExitAnim));
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder(128);
+ sb.append("BackStackEntry{");
+ sb.append(Integer.toHexString(System.identityHashCode(this)));
+ if (mIndex >= 0) {
+ sb.append(" #");
+ sb.append(mIndex);
}
- if (mBreadCrumbTitleRes != 0 || mBreadCrumbTitleText != null) {
- writer.print(prefix); writer.print("mBreadCrumbTitleRes=#");
- writer.print(Integer.toHexString(mBreadCrumbTitleRes));
- writer.print(" mBreadCrumbTitleText=");
- writer.println(mBreadCrumbTitleText);
+ if (mName != null) {
+ sb.append(" ");
+ sb.append(mName);
}
- if (mBreadCrumbShortTitleRes != 0 || mBreadCrumbShortTitleText != null) {
- writer.print(prefix); writer.print("mBreadCrumbShortTitleRes=#");
- writer.print(Integer.toHexString(mBreadCrumbShortTitleRes));
- writer.print(" mBreadCrumbShortTitleText=");
- writer.println(mBreadCrumbShortTitleText);
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
+ dump(prefix, writer, true);
+ }
+
+ void dump(String prefix, PrintWriter writer, boolean full) {
+ if (full) {
+ writer.print(prefix); writer.print("mName="); writer.print(mName);
+ writer.print(" mIndex="); writer.print(mIndex);
+ writer.print(" mCommitted="); writer.println(mCommitted);
+ if (mTransition != FragmentTransaction.TRANSIT_NONE) {
+ writer.print(prefix); writer.print("mTransition=#");
+ writer.print(Integer.toHexString(mTransition));
+ writer.print(" mTransitionStyle=#");
+ writer.println(Integer.toHexString(mTransitionStyle));
+ }
+ if (mEnterAnim != 0 || mExitAnim !=0) {
+ writer.print(prefix); writer.print("mEnterAnim=#");
+ writer.print(Integer.toHexString(mEnterAnim));
+ writer.print(" mExitAnim=#");
+ writer.println(Integer.toHexString(mExitAnim));
+ }
+ if (mPopEnterAnim != 0 || mPopExitAnim !=0) {
+ writer.print(prefix); writer.print("mPopEnterAnim=#");
+ writer.print(Integer.toHexString(mPopEnterAnim));
+ writer.print(" mPopExitAnim=#");
+ writer.println(Integer.toHexString(mPopExitAnim));
+ }
+ if (mBreadCrumbTitleRes != 0 || mBreadCrumbTitleText != null) {
+ writer.print(prefix); writer.print("mBreadCrumbTitleRes=#");
+ writer.print(Integer.toHexString(mBreadCrumbTitleRes));
+ writer.print(" mBreadCrumbTitleText=");
+ writer.println(mBreadCrumbTitleText);
+ }
+ if (mBreadCrumbShortTitleRes != 0 || mBreadCrumbShortTitleText != null) {
+ writer.print(prefix); writer.print("mBreadCrumbShortTitleRes=#");
+ writer.print(Integer.toHexString(mBreadCrumbShortTitleRes));
+ writer.print(" mBreadCrumbShortTitleText=");
+ writer.println(mBreadCrumbShortTitleText);
+ }
}
if (mHead != null) {
@@ -254,21 +280,34 @@ final class BackStackRecord extends FragmentTransaction implements
Op op = mHead;
int num = 0;
while (op != null) {
- writer.print(prefix); writer.print(" Op #"); writer.print(num);
- writer.println(":");
- writer.print(innerPrefix); writer.print("cmd="); writer.print(op.cmd);
- writer.print(" fragment="); writer.println(op.fragment);
- if (op.enterAnim != 0 || op.exitAnim != 0) {
- writer.print(prefix); writer.print("enterAnim=#");
- writer.print(Integer.toHexString(op.enterAnim));
- writer.print(" exitAnim=#");
- writer.println(Integer.toHexString(op.exitAnim));
+ String cmdStr;
+ switch (op.cmd) {
+ case OP_NULL: cmdStr="NULL"; break;
+ case OP_ADD: cmdStr="ADD"; break;
+ case OP_REPLACE: cmdStr="REPLACE"; break;
+ case OP_REMOVE: cmdStr="REMOVE"; break;
+ case OP_HIDE: cmdStr="HIDE"; break;
+ case OP_SHOW: cmdStr="SHOW"; break;
+ case OP_DETACH: cmdStr="DETACH"; break;
+ case OP_ATTACH: cmdStr="ATTACH"; break;
+ default: cmdStr="cmd=" + op.cmd; break;
}
- if (op.popEnterAnim != 0 || op.popExitAnim != 0) {
- writer.print(prefix); writer.print("popEnterAnim=#");
- writer.print(Integer.toHexString(op.popEnterAnim));
- writer.print(" popExitAnim=#");
- writer.println(Integer.toHexString(op.popExitAnim));
+ writer.print(prefix); writer.print(" Op #"); writer.print(num);
+ writer.print(": "); writer.print(cmdStr);
+ writer.print(" "); writer.println(op.fragment);
+ if (full) {
+ if (op.enterAnim != 0 || op.exitAnim != 0) {
+ writer.print(innerPrefix); writer.print("enterAnim=#");
+ writer.print(Integer.toHexString(op.enterAnim));
+ writer.print(" exitAnim=#");
+ writer.println(Integer.toHexString(op.exitAnim));
+ }
+ if (op.popEnterAnim != 0 || op.popExitAnim != 0) {
+ writer.print(innerPrefix); writer.print("popEnterAnim=#");
+ writer.print(Integer.toHexString(op.popEnterAnim));
+ writer.print(" popExitAnim=#");
+ writer.println(Integer.toHexString(op.popExitAnim));
+ }
}
if (op.removed != null && op.removed.size() > 0) {
for (int i=0; i<op.removed.size(); i++) {
@@ -276,14 +315,17 @@ final class BackStackRecord extends FragmentTransaction implements
if (op.removed.size() == 1) {
writer.print("Removed: ");
} else {
- writer.println("Removed:");
- writer.print(innerPrefix); writer.print(" #"); writer.print(num);
+ if (i == 0) {
+ writer.println("Removed:");
+ }
+ writer.print(innerPrefix); writer.print(" #"); writer.print(i);
writer.print(": ");
}
writer.println(op.removed.get(i));
}
}
op = op.next;
+ num++;
}
}
}
@@ -538,7 +580,12 @@ final class BackStackRecord extends FragmentTransaction implements
int commitInternal(boolean allowStateLoss) {
if (mCommitted) throw new IllegalStateException("commit already called");
- if (FragmentManagerImpl.DEBUG) Log.v(TAG, "Commit: " + this);
+ if (FragmentManagerImpl.DEBUG) {
+ Log.v(TAG, "Commit: " + this);
+ LogWriter logw = new LogWriter(Log.VERBOSE, TAG);
+ PrintWriter pw = new PrintWriter(logw);
+ dump(" ", null, pw, null);
+ }
mCommitted = true;
if (mAddToBackStack) {
mIndex = mManager.allocBackStackIndex(this);
@@ -641,7 +688,12 @@ final class BackStackRecord extends FragmentTransaction implements
}
public void popFromBackStack(boolean doStateMove) {
- if (FragmentManagerImpl.DEBUG) Log.v(TAG, "popFromBackStack: " + this);
+ if (FragmentManagerImpl.DEBUG) {
+ Log.v(TAG, "popFromBackStack: " + this);
+ LogWriter logw = new LogWriter(Log.VERBOSE, TAG);
+ PrintWriter pw = new PrintWriter(logw);
+ dump(" ", null, pw, null);
+ }
bumpBackStackNesting(-1);
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index aad5487..e983299 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -22,6 +22,7 @@ import android.animation.AnimatorListenerAdapter;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.os.Bundle;
+import android.os.Debug;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
@@ -771,9 +772,9 @@ final class FragmentManagerImpl extends FragmentManager {
void moveToState(Fragment f, int newState, int transit, int transitionStyle,
boolean keepActive) {
- //if (DEBUG) Log.v(TAG, "moveToState: " + f
- // + " oldState=" + f.mState + " newState=" + newState
- // + " mRemoving=" + f.mRemoving + " Callers=" + Debug.getCallers(5));
+ if (DEBUG && false) Log.v(TAG, "moveToState: " + f
+ + " oldState=" + f.mState + " newState=" + newState
+ + " mRemoving=" + f.mRemoving + " Callers=" + Debug.getCallers(5));
// Fragments that are not currently added will sit in the onCreate() state.
if ((!f.mAdded || f.mDetached) && newState > Fragment.CREATED) {
@@ -1112,6 +1113,9 @@ final class FragmentManagerImpl extends FragmentManager {
if (DEBUG) Log.v(TAG, "add: " + fragment);
makeActive(fragment);
if (!fragment.mDetached) {
+ if (mAdded.contains(fragment)) {
+ throw new IllegalStateException("Fragment already added: " + fragment);
+ }
mAdded.add(fragment);
fragment.mAdded = true;
fragment.mRemoving = false;
@@ -1128,6 +1132,14 @@ final class FragmentManagerImpl extends FragmentManager {
if (DEBUG) Log.v(TAG, "remove: " + fragment + " nesting=" + fragment.mBackStackNesting);
final boolean inactive = !fragment.isInBackStack();
if (!fragment.mDetached || inactive) {
+ if (false) {
+ // Would be nice to catch a bad remove here, but we need
+ // time to test this to make sure we aren't crashes cases
+ // where it is not a problem.
+ if (!mAdded.contains(fragment)) {
+ throw new IllegalStateException("Fragment not added: " + fragment);
+ }
+ }
if (mAdded != null) {
mAdded.remove(fragment);
}
@@ -1200,6 +1212,7 @@ final class FragmentManagerImpl extends FragmentManager {
if (fragment.mAdded) {
// We are not already in back stack, so need to remove the fragment.
if (mAdded != null) {
+ if (DEBUG) Log.v(TAG, "remove from detach: " + fragment);
mAdded.remove(fragment);
}
if (fragment.mHasMenu && fragment.mMenuVisible) {
@@ -1219,6 +1232,10 @@ final class FragmentManagerImpl extends FragmentManager {
if (mAdded == null) {
mAdded = new ArrayList<Fragment>();
}
+ if (mAdded.contains(fragment)) {
+ throw new IllegalStateException("Fragment already added: " + fragment);
+ }
+ if (DEBUG) Log.v(TAG, "add from attach: " + fragment);
mAdded.add(fragment);
fragment.mAdded = true;
if (fragment.mHasMenu && fragment.mMenuVisible) {
@@ -1717,19 +1734,18 @@ final class FragmentManagerImpl extends FragmentManager {
FragmentState fs = fms.mActive[i];
if (fs != null) {
Fragment f = fs.instantiate(mActivity, mParent);
- if (DEBUG) Log.v(TAG, "restoreAllState: adding #" + i + ": " + f);
+ if (DEBUG) Log.v(TAG, "restoreAllState: active #" + i + ": " + f);
mActive.add(f);
// Now that the fragment is instantiated (or came from being
// retained above), clear mInstance in case we end up re-restoring
// from this FragmentState again.
fs.mInstance = null;
} else {
- if (DEBUG) Log.v(TAG, "restoreAllState: adding #" + i + ": (null)");
mActive.add(null);
if (mAvailIndices == null) {
mAvailIndices = new ArrayList<Integer>();
}
- if (DEBUG) Log.v(TAG, "restoreAllState: adding avail #" + i);
+ if (DEBUG) Log.v(TAG, "restoreAllState: avail #" + i);
mAvailIndices.add(i);
}
}
@@ -1760,7 +1776,10 @@ final class FragmentManagerImpl extends FragmentManager {
"No instantiated fragment for index #" + fms.mAdded[i]));
}
f.mAdded = true;
- if (DEBUG) Log.v(TAG, "restoreAllState: making added #" + i + ": " + f);
+ if (DEBUG) Log.v(TAG, "restoreAllState: added #" + i + ": " + f);
+ if (mAdded.contains(f)) {
+ throw new IllegalStateException("Already added!");
+ }
mAdded.add(f);
}
} else {
@@ -1772,8 +1791,13 @@ final class FragmentManagerImpl extends FragmentManager {
mBackStack = new ArrayList<BackStackRecord>(fms.mBackStack.length);
for (int i=0; i<fms.mBackStack.length; i++) {
BackStackRecord bse = fms.mBackStack[i].instantiate(this);
- if (DEBUG) Log.v(TAG, "restoreAllState: adding bse #" + i
+ if (DEBUG) {
+ Log.v(TAG, "restoreAllState: back stack #" + i
+ " (index " + bse.mIndex + "): " + bse);
+ LogWriter logw = new LogWriter(Log.VERBOSE, TAG);
+ PrintWriter pw = new PrintWriter(logw);
+ bse.dump(" ", pw, false);
+ }
mBackStack.add(bse);
if (bse.mIndex >= 0) {
setBackStackIndex(bse.mIndex, bse);
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index ac36cf7..201b43f 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -178,7 +178,7 @@ public abstract class Context {
* Flag for {@link #bindService}: indicates that the client application
* binding to this service considers the service to be more important than
* the app itself. When set, the platform will try to have the out of
- * memory kill the app before it kills the service it is bound to, though
+ * memory killer kill the app before it kills the service it is bound to, though
* this is not guaranteed to be the case.
*/
public static final int BIND_ABOVE_CLIENT = 0x0008;
@@ -219,6 +219,19 @@ public abstract class Context {
public static final int BIND_ADJUST_WITH_ACTIVITY = 0x0080;
/**
+ * @hide An idea that is not yet implemented.
+ * Flag for {@link #bindService}: If binding from an activity, consider
+ * this service to be visible like the binding activity is. That is,
+ * it will be treated as something more important to keep around than
+ * invisible background activities. This will impact the number of
+ * recent activities the user can switch between without having them
+ * restart. There is no guarantee this will be respected, as the system
+ * tries to balance such requests from one app vs. the importantance of
+ * keeping other apps around.
+ */
+ public static final int BIND_VISIBLE = 0x0100;
+
+ /**
* Flag for {@link #bindService}: Don't consider the bound service to be
* visible, even if the caller is visible.
* @hide
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index 4257e0e..4999a2d 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -203,6 +203,12 @@ public class SyncManager implements OnAccountsUpdateListener {
}
};
+ private BroadcastReceiver mAccountsUpdatedReceiver = new BroadcastReceiver() {
+ public void onReceive(Context context, Intent intent) {
+ onAccountsUpdated(null);
+ }
+ };
+
private final PowerManager mPowerManager;
// Use this as a random offset to seed all periodic syncs
@@ -456,8 +462,11 @@ public class SyncManager implements OnAccountsUpdateListener {
});
if (!factoryTest) {
- AccountManager.get(mContext).addOnAccountsUpdatedListener(SyncManager.this,
- mSyncHandler, false /* updateImmediately */);
+ // Register for account list updates for all users
+ mContext.registerReceiverAsUser(mAccountsUpdatedReceiver,
+ UserHandle.ALL,
+ new IntentFilter(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION),
+ null, null);
// do this synchronously to ensure we have the accounts before this call returns
onAccountsUpdated(null);
}
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 58a0f13..28e320b 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -46,9 +46,7 @@ public final class DisplayManager {
* The status is provided as a {@link WifiDisplayStatus} object in the
* {@link #EXTRA_WIFI_DISPLAY_STATUS} extra.
* </p><p>
- * This broadcast is only sent to registered receivers with the
- * {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY} permission and can
- * only be sent by the system.
+ * This broadcast is only sent to registered receivers and can only be sent by the system.
* </p>
* @hide
*/
@@ -163,6 +161,9 @@ public final class DisplayManager {
* <p>
* Automatically remembers the display after a successful connection, if not
* already remembered.
+ * </p><p>
+ * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY} to connect
+ * to unknown displays. No permissions are required to connect to already known displays.
* </p>
*
* @param deviceAddress The MAC address of the device to which we should connect.
@@ -187,6 +188,8 @@ public final class DisplayManager {
* The display must already be remembered for this call to succeed. In other words,
* we must already have successfully connected to the display at least once and then
* not forgotten it.
+ * </p><p>
+ * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}.
* </p>
*
* @param deviceAddress The MAC address of the device to rename.
@@ -202,6 +205,8 @@ public final class DisplayManager {
* Forgets a previously remembered Wifi display.
* <p>
* Automatically disconnects from the display if currently connected to it.
+ * </p><p>
+ * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}.
* </p>
*
* @param deviceAddress The MAC address of the device to forget.
diff --git a/core/java/android/hardware/display/IDisplayManager.aidl b/core/java/android/hardware/display/IDisplayManager.aidl
index 4b6fb53..79aad78 100644
--- a/core/java/android/hardware/display/IDisplayManager.aidl
+++ b/core/java/android/hardware/display/IDisplayManager.aidl
@@ -28,13 +28,14 @@ interface IDisplayManager {
void registerCallback(in IDisplayManagerCallback callback);
- // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // No permissions required.
void scanWifiDisplays();
- // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // Requires CONFIGURE_WIFI_DISPLAY permission to connect to an unknown device.
+ // No permissions required to connect to a known device.
void connectWifiDisplay(String address);
- // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // No permissions required.
void disconnectWifiDisplay();
// Requires CONFIGURE_WIFI_DISPLAY permission.
@@ -43,6 +44,6 @@ interface IDisplayManager {
// Requires CONFIGURE_WIFI_DISPLAY permission.
void forgetWifiDisplay(String address);
- // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // No permissions required.
WifiDisplayStatus getWifiDisplayStatus();
}
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index 42fb5c3..846443d 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -90,7 +90,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
private byte[] mNpnProtocols = null;
private final int mHandshakeTimeoutMillis;
- private final int mWriteTimeoutMillis;
private final SSLClientSessionCache mSessionCache;
private final boolean mSecure;
@@ -101,21 +100,12 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
}
private SSLCertificateSocketFactory(
- int handshakeTimeoutMillis,
- int writeTimeoutMillis,
- SSLSessionCache cache,
- boolean secure) {
+ int handshakeTimeoutMillis, SSLSessionCache cache, boolean secure) {
mHandshakeTimeoutMillis = handshakeTimeoutMillis;
- mWriteTimeoutMillis = writeTimeoutMillis;
mSessionCache = cache == null ? null : cache.mSessionCache;
mSecure = secure;
}
- private SSLCertificateSocketFactory(
- int handshakeTimeoutMillis, SSLSessionCache cache, boolean secure) {
- this(handshakeTimeoutMillis, 0, cache, secure);
- }
-
/**
* Returns a new socket factory instance with an optional handshake timeout.
*
@@ -172,24 +162,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
}
/**
- * Returns a socket factory (also named SSLSocketFactory, but in a different
- * namespace) for use with the Apache HTTP stack.
- *
- * @param handshakeTimeoutMillis to use for SSL connection handshake, or 0
- * for none. The socket timeout is reset to 0 after the handshake.
- * @param writeTimeoutMillis the desired write timeout in milliseconds or 0 for none.
- * @param cache The {@link SSLSessionCache} to use, or null for no cache.
- * @return a new SocketFactory with the specified parameters
- */
- public static org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(
- int handshakeTimeoutMillis,
- int writeTimeoutMillis,
- SSLSessionCache cache) {
- return new org.apache.http.conn.ssl.SSLSocketFactory(new SSLCertificateSocketFactory(
- handshakeTimeoutMillis, writeTimeoutMillis, cache, true));
- }
-
- /**
* Verify the hostname of the certificate used by the other end of a
* connected socket. You MUST call this if you did not supply a hostname
* to {@link #createSocket()}. It is harmless to call this method
@@ -376,8 +348,10 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
* To take effect, this option must be set before the blocking method was called.
*
* @param socket a socket created by this factory.
- * @param writeTimeoutMilliseconds the desired write timeout in milliseconds.
+ * @param timeout the desired write timeout in milliseconds.
* @throws IllegalArgumentException if the socket was not created by this factory.
+ *
+ * @hide
*/
public void setSoWriteTimeout(Socket socket, int writeTimeoutMilliseconds)
throws SocketException {
@@ -404,7 +378,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
OpenSSLSocketImpl s = (OpenSSLSocketImpl) getDelegate().createSocket(k, host, port, close);
s.setNpnProtocols(mNpnProtocols);
s.setHandshakeTimeout(mHandshakeTimeoutMillis);
- s.setSoWriteTimeout(mWriteTimeoutMillis);
if (mSecure) {
verifyHostname(s, host);
}
@@ -424,7 +397,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
OpenSSLSocketImpl s = (OpenSSLSocketImpl) getDelegate().createSocket();
s.setNpnProtocols(mNpnProtocols);
s.setHandshakeTimeout(mHandshakeTimeoutMillis);
- s.setSoWriteTimeout(mWriteTimeoutMillis);
return s;
}
@@ -442,7 +414,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
addr, port, localAddr, localPort);
s.setNpnProtocols(mNpnProtocols);
s.setHandshakeTimeout(mHandshakeTimeoutMillis);
- s.setSoWriteTimeout(mWriteTimeoutMillis);
return s;
}
@@ -458,7 +429,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
OpenSSLSocketImpl s = (OpenSSLSocketImpl) getDelegate().createSocket(addr, port);
s.setNpnProtocols(mNpnProtocols);
s.setHandshakeTimeout(mHandshakeTimeoutMillis);
- s.setSoWriteTimeout(mWriteTimeoutMillis);
return s;
}
@@ -475,7 +445,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
host, port, localAddr, localPort);
s.setNpnProtocols(mNpnProtocols);
s.setHandshakeTimeout(mHandshakeTimeoutMillis);
- s.setSoWriteTimeout(mWriteTimeoutMillis);
if (mSecure) {
verifyHostname(s, host);
}
@@ -493,7 +462,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
OpenSSLSocketImpl s = (OpenSSLSocketImpl) getDelegate().createSocket(host, port);
s.setNpnProtocols(mNpnProtocols);
s.setHandshakeTimeout(mHandshakeTimeoutMillis);
- s.setSoWriteTimeout(mWriteTimeoutMillis);
if (mSecure) {
verifyHostname(s, host);
}
diff --git a/core/java/android/net/http/AndroidHttpClient.java b/core/java/android/net/http/AndroidHttpClient.java
index 8169a94..c534e58 100644
--- a/core/java/android/net/http/AndroidHttpClient.java
+++ b/core/java/android/net/http/AndroidHttpClient.java
@@ -16,16 +16,7 @@
package android.net.http;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.net.SSLCertificateSocketFactory;
-import android.net.SSLSessionCache;
-import android.os.Looper;
-import android.util.Base64;
-import android.util.Log;
-
import com.android.internal.http.HttpDateTime;
-
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
@@ -34,18 +25,18 @@ import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
-import org.apache.http.client.ClientProtocolException;
+import org.apache.http.entity.AbstractHttpEntity;
+import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.client.HttpClient;
import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.protocol.ClientContext;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.params.HttpClientParams;
-import org.apache.http.client.protocol.ClientContext;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.entity.AbstractHttpEntity;
-import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.RequestWrapper;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
@@ -53,17 +44,25 @@ import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
-import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.BasicHttpProcessor;
import org.apache.http.protocol.HttpContext;
+import org.apache.http.protocol.BasicHttpContext;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
-import java.net.URI;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
+import java.net.URI;
+
+import android.content.Context;
+import android.content.ContentResolver;
+import android.net.SSLCertificateSocketFactory;
+import android.net.SSLSessionCache;
+import android.os.Looper;
+import android.util.Base64;
+import android.util.Log;
/**
* Implementation of the Apache {@link DefaultHttpClient} that is configured with
@@ -135,7 +134,7 @@ public final class AndroidHttpClient implements HttpClient {
PlainSocketFactory.getSocketFactory(), 80));
schemeRegistry.register(new Scheme("https",
SSLCertificateSocketFactory.getHttpSocketFactory(
- SOCKET_OPERATION_TIMEOUT, SOCKET_OPERATION_TIMEOUT, sessionCache), 443));
+ SOCKET_OPERATION_TIMEOUT, sessionCache), 443));
ClientConnectionManager manager =
new ThreadSafeClientConnManager(params, schemeRegistry);
diff --git a/core/java/android/os/IPowerManager.aidl b/core/java/android/os/IPowerManager.aidl
index 7aee644..eec19cb 100644
--- a/core/java/android/os/IPowerManager.aidl
+++ b/core/java/android/os/IPowerManager.aidl
@@ -34,6 +34,7 @@ interface IPowerManager
void userActivity(long time, int event, int flags);
void wakeUp(long time);
void goToSleep(long time, int reason);
+ void nap(long time);
boolean isScreenOn();
void reboot(String reason);
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index cc2c002..58372f4 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -426,7 +426,7 @@ public final class PowerManager {
* </p>
*
* @param when The time of the user activity, in the {@link SystemClock#uptimeMillis()}
- * time base. This timestamp is used to correctly order the user activity with
+ * time base. This timestamp is used to correctly order the user activity request with
* other power management functions. It should be set
* to the timestamp of the input event that caused the user activity.
* @param noChangeLights If true, does not cause the keyboard backlight to turn on
@@ -457,7 +457,7 @@ public final class PowerManager {
*
* @param time The time when the request to go to sleep was issued, in the
* {@link SystemClock#uptimeMillis()} time base. This timestamp is used to correctly
- * order the user activity with other power management functions. It should be set
+ * order the go to sleep request with other power management functions. It should be set
* to the timestamp of the input event that caused the request to go to sleep.
*
* @see #userActivity
@@ -481,7 +481,7 @@ public final class PowerManager {
*
* @param time The time when the request to wake up was issued, in the
* {@link SystemClock#uptimeMillis()} time base. This timestamp is used to correctly
- * order the user activity with other power management functions. It should be set
+ * order the wake up request with other power management functions. It should be set
* to the timestamp of the input event that caused the request to wake up.
*
* @see #userActivity
@@ -495,6 +495,34 @@ public final class PowerManager {
}
/**
+ * Forces the device to start napping.
+ * <p>
+ * If the device is currently awake, starts dreaming, otherwise does nothing.
+ * When the dream ends or if the dream cannot be started, the device will
+ * either wake up or go to sleep depending on whether there has been recent
+ * user activity.
+ * </p><p>
+ * Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
+ * </p>
+ *
+ * @param time The time when the request to nap was issued, in the
+ * {@link SystemClock#uptimeMillis()} time base. This timestamp is used to correctly
+ * order the nap request with other power management functions. It should be set
+ * to the timestamp of the input event that caused the request to nap.
+ *
+ * @see #wakeUp
+ * @see #goToSleep
+ *
+ * @hide
+ */
+ public void nap(long time) {
+ try {
+ mService.nap(time);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* Sets the brightness of the backlights (screen, keyboard, button).
* <p>
* Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
diff --git a/core/java/android/os/SystemClock.java b/core/java/android/os/SystemClock.java
index a54c25b..c9adf45 100644
--- a/core/java/android/os/SystemClock.java
+++ b/core/java/android/os/SystemClock.java
@@ -50,7 +50,7 @@ package android.os;
* interval does not span device sleep. Most methods that accept a
* timestamp value currently expect the {@link #uptimeMillis} clock.
*
- * <li> <p> {@link #elapsedRealtime} and {@link #elapsedRealtimeNano}
+ * <li> <p> {@link #elapsedRealtime} and {@link #elapsedRealtimeNanos}
* return the time since the system was booted, and include deep sleep.
* This clock is guaranteed to be monotonic, and continues to tick even
* when the CPU is in power saving modes, so is the recommend basis
@@ -157,7 +157,7 @@ public final class SystemClock {
*
* @return elapsed nanoseconds since boot.
*/
- public static native long elapsedRealtimeNano();
+ public static native long elapsedRealtimeNanos();
/**
* Returns milliseconds running in the current thread.
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 965e488..0d980c0 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3054,6 +3054,7 @@ public final class Settings {
/**
* @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
*/
+ @Deprecated
public static final String DATA_ROAMING = Global.DATA_ROAMING;
/**
@@ -3215,27 +3216,6 @@ public final class Settings {
"lock_screen_owner_info_enabled";
/**
- * @deprecated Use {@link android.provider.Settings.Global#DISPLAY_SIZE_FORCED} instead
- * @hide
- */
- @Deprecated
- public static final String DISPLAY_SIZE_FORCED = Global.DISPLAY_SIZE_FORCED;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#DISPLAY_DENSITY_FORCED} instead
- * @hide
- */
- @Deprecated
- public static final String DISPLAY_DENSITY_FORCED = Global.DISPLAY_DENSITY_FORCED;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#ASSISTED_GPS_ENABLED} instead
- * @hide
- */
- @Deprecated
- public static final String ASSISTED_GPS_ENABLED = Global.ASSISTED_GPS_ENABLED;
-
- /**
* The Logging ID (a unique 64-bit value) as a hex string.
* Used as a pseudonymous identifier for logging.
* @deprecated This identifier is poorly initialized and has
@@ -3251,44 +3231,6 @@ public final class Settings {
public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
/**
- * @deprecated Use {@link android.provider.Settings.Global#TETHER_SUPPORTED} instead
- * @hide
- */
- @Deprecated
- public static final String TETHER_SUPPORTED = Global.TETHER_SUPPORTED;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#TETHER_DUN_REQUIRED} instead
- * @hide
- */
- @Deprecated
- public static final String TETHER_DUN_REQUIRED = Global.TETHER_DUN_REQUIRED;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#TETHER_DUN_REQUIRED} instead
- * @hide
- */
- @Deprecated
- public static final String TETHER_DUN_APN = Global.TETHER_DUN_APN;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#DATA_ACTIVITY_TIMEOUT_MOBILE}
- * instead
- * @hide
- */
- @Deprecated
- public static final String DATA_ACTIVITY_TIMEOUT_MOBILE =
- Global.DATA_ACTIVITY_TIMEOUT_MOBILE;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#DATA_ACTIVITY_TIMEOUT_MOBILE}
- * instead
- * @hide
- */
- @Deprecated
- public static final String DATA_ACTIVITY_TIMEOUT_WIFI = Global.DATA_ACTIVITY_TIMEOUT_WIFI;
-
- /**
* No longer supported.
*/
public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
@@ -3304,13 +3246,6 @@ public final class Settings {
public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
/**
- * @deprecated Use {@link android.provider.Settings.Global#SAMPLING_PROFILER_MS} instead
- * @hide
- */
- @Deprecated
- public static final String SAMPLING_PROFILER_MS = Global.SAMPLING_PROFILER_MS;
-
- /**
* Settings classname to launch when Settings is clicked from All
* Applications. Needed because of user testing between the old
* and new Settings apps.
@@ -3562,14 +3497,6 @@ public final class Settings {
@Deprecated
public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
- /**
- * @deprecated Use {@link android.provider.Settings.Global#WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON}
- * instead.
- * {@hide}
- */
- @Deprecated
- public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
- Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON;
/**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY}
@@ -3580,15 +3507,6 @@ public final class Settings {
Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
/**
- * @deprecated Use {@link android.provider.Settings.Global#WIFI_COUNTRY_CODE}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String WIFI_COUNTRY_CODE = Global.WIFI_COUNTRY_CODE;
-
-
- /**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
* instead.
*/
@@ -3604,39 +3522,6 @@ public final class Settings {
public static final String WIFI_ON = Global.WIFI_ON;
/**
- * Used to save the Wifi_ON state prior to tethering.
- * This state will be checked to restore Wifi after
- * the user turns off tethering.
- *
- * @hide
- * @deprecated Use {@link android.provider.Settings.Global#WIFI_SAVED_STATE}
- * instead.
- */
- @Deprecated
- public static final String WIFI_SAVED_STATE = Global.WIFI_SAVED_STATE;
-
- /**
- * AP SSID
- *
- * @hide
- */
- public static final String WIFI_AP_SSID = "wifi_ap_ssid";
-
- /**
- * AP security
- *
- * @hide
- */
- public static final String WIFI_AP_SECURITY = "wifi_ap_security";
-
- /**
- * AP passphrase
- *
- * @hide
- */
- public static final String WIFI_AP_PASSWD = "wifi_ap_passwd";
-
- /**
* The acceptable packet loss percentage (range 0 - 100) before trying
* another AP on the same network.
* @deprecated This setting is not used.
@@ -3700,8 +3585,9 @@ public final class Settings {
public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
/**
- * Whether the Wi-Fi watchdog is enabled.
+ * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
*/
+ @Deprecated
public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
/**
@@ -3733,66 +3619,6 @@ public final class Settings {
public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
/**
- * ms delay before rechecking an 'online' wifi connection when it is thought to be unstable.
- * @deprecated This setting is not used.
- * @hide
- */
- @Deprecated
- public static final String WIFI_WATCHDOG_ARP_CHECK_INTERVAL_MS =
- "wifi_watchdog_arp_interval_ms";
-
- /**
- * ms delay interval between rssi polling when the signal is known to be weak
- * @deprecated This setting is not used.
- * @hide
- */
- @Deprecated
- public static final String WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS =
- "wifi_watchdog_rssi_fetch_interval_ms";
-
- /**
- * Number of ARP pings per check.
- * @deprecated This setting is not used.
- * @hide
- */
- @Deprecated
- public static final String WIFI_WATCHDOG_NUM_ARP_PINGS = "wifi_watchdog_num_arp_pings";
-
- /**
- * Minimum number of responses to the arp pings to consider the test 'successful'.
- * @deprecated This setting is not used.
- * @hide
- */
- @Deprecated
- public static final String WIFI_WATCHDOG_MIN_ARP_RESPONSES =
- "wifi_watchdog_min_arp_responses";
-
- /**
- * Timeout on ARP pings
- * @deprecated This setting is not used.
- * @hide
- */
- @Deprecated
- public static final String WIFI_WATCHDOG_ARP_PING_TIMEOUT_MS =
- "wifi_watchdog_arp_ping_timeout_ms";
-
- /**
- * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and
- * the setting needs to be set to 0 to disable it.
- * @hide
- */
- public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED =
- "wifi_watchdog_poor_network_test_enabled";
-
- /**
- * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and
- * needs to be set to 0 to disable it.
- * @hide
- */
- public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED =
- "wifi_suspend_optimizations_enabled";
-
- /**
* @deprecated Use
* {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
*/
@@ -3800,22 +3626,6 @@ public final class Settings {
public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT;
/**
- * The operational wifi frequency band
- * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO},
- * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or
- * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ}
- *
- * @hide
- */
- public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band";
-
- /**
- * The Wi-Fi peer-to-peer device name
- * @hide
- */
- public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name";
-
- /**
* Setting to turn off captive portal detection. Feature is enabled by default and
* the setting needs to be set to 0 to disable it.
* @hide
@@ -3834,6 +3644,7 @@ public final class Settings {
* @deprecated Use
* {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
*/
+ @Deprecated
public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
@@ -3858,27 +3669,6 @@ public final class Settings {
= "allowed_geolocation_origins";
/**
- * @deprecated Use {@link android.provider.Settings.Global#MOBILE_DATA} instead
- * @hide
- */
- @Deprecated
- public static final String MOBILE_DATA = Global.MOBILE_DATA;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#CDMA_ROAMING_MODE} instead
- * @hide
- */
- @Deprecated
- public static final String CDMA_ROAMING_MODE = Global.CDMA_ROAMING_MODE;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#CDMA_ROAMING_MODE} instead
- * @hide
- */
- @Deprecated
- public static final String CDMA_SUBSCRIPTION_MODE = Global.CDMA_SUBSCRIPTION_MODE;
-
- /**
* The preferred network mode 7 = Global
* 6 = EvDo only
* 5 = CDMA w/o EvDo
@@ -3902,14 +3692,6 @@ public final class Settings {
public static final String PREFERRED_TTY_MODE =
"preferred_tty_mode";
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#CDMA_CELL_BROADCAST_SMS} instead
- * @hide
- */
- @Deprecated
- public static final String CDMA_CELL_BROADCAST_SMS = Global.CDMA_CELL_BROADCAST_SMS;
-
/**
* The cdma subscription 0 = Subscription from RUIM, when available
* 1 = Subscription from NV
@@ -3982,133 +3764,6 @@ public final class Settings {
public static final String LAST_SETUP_SHOWN = "last_setup_shown";
/**
- * How frequently (in seconds) to check the memory status of the
- * device.
- * @hide
- */
- public static final String MEMCHECK_INTERVAL = "memcheck_interval";
-
- /**
- * Max frequency (in seconds) to log memory check stats, in realtime
- * seconds. This allows for throttling of logs when the device is
- * running for large amounts of time.
- * @hide
- */
- public static final String MEMCHECK_LOG_REALTIME_INTERVAL =
- "memcheck_log_realtime_interval";
-
- /**
- * Boolean indicating whether rebooting due to system memory checks
- * is enabled.
- * @hide
- */
- public static final String MEMCHECK_SYSTEM_ENABLED = "memcheck_system_enabled";
-
- /**
- * How many bytes the system process must be below to avoid scheduling
- * a soft reboot. This reboot will happen when it is next determined
- * to be a good time.
- * @hide
- */
- public static final String MEMCHECK_SYSTEM_SOFT_THRESHOLD = "memcheck_system_soft";
-
- /**
- * How many bytes the system process must be below to avoid scheduling
- * a hard reboot. This reboot will happen immediately.
- * @hide
- */
- public static final String MEMCHECK_SYSTEM_HARD_THRESHOLD = "memcheck_system_hard";
-
- /**
- * How many bytes the phone process must be below to avoid scheduling
- * a soft restart. This restart will happen when it is next determined
- * to be a good time.
- * @hide
- */
- public static final String MEMCHECK_PHONE_SOFT_THRESHOLD = "memcheck_phone_soft";
-
- /**
- * How many bytes the phone process must be below to avoid scheduling
- * a hard restart. This restart will happen immediately.
- * @hide
- */
- public static final String MEMCHECK_PHONE_HARD_THRESHOLD = "memcheck_phone_hard";
-
- /**
- * Boolean indicating whether restarting the phone process due to
- * memory checks is enabled.
- * @hide
- */
- public static final String MEMCHECK_PHONE_ENABLED = "memcheck_phone_enabled";
-
- /**
- * First time during the day it is okay to kill processes
- * or reboot the device due to low memory situations. This number is
- * in seconds since midnight.
- * @hide
- */
- public static final String MEMCHECK_EXEC_START_TIME = "memcheck_exec_start_time";
-
- /**
- * Last time during the day it is okay to kill processes
- * or reboot the device due to low memory situations. This number is
- * in seconds since midnight.
- * @hide
- */
- public static final String MEMCHECK_EXEC_END_TIME = "memcheck_exec_end_time";
-
- /**
- * How long the screen must have been off in order to kill processes
- * or reboot. This number is in seconds. A value of -1 means to
- * entirely disregard whether the screen is on.
- * @hide
- */
- public static final String MEMCHECK_MIN_SCREEN_OFF = "memcheck_min_screen_off";
-
- /**
- * How much time there must be until the next alarm in order to kill processes
- * or reboot. This number is in seconds. Note: this value must be
- * smaller than {@link #MEMCHECK_RECHECK_INTERVAL} or else it will
- * always see an alarm scheduled within its time.
- * @hide
- */
- public static final String MEMCHECK_MIN_ALARM = "memcheck_min_alarm";
-
- /**
- * How frequently to check whether it is a good time to restart things,
- * if the device is in a bad state. This number is in seconds. Note:
- * this value must be larger than {@link #MEMCHECK_MIN_ALARM} or else
- * the alarm to schedule the recheck will always appear within the
- * minimum "do not execute now" time.
- * @hide
- */
- public static final String MEMCHECK_RECHECK_INTERVAL = "memcheck_recheck_interval";
-
- /**
- * How frequently (in DAYS) to reboot the device. If 0, no reboots
- * will occur.
- * @hide
- */
- public static final String REBOOT_INTERVAL = "reboot_interval";
-
- /**
- * First time during the day it is okay to force a reboot of the
- * device (if REBOOT_INTERVAL is set). This number is
- * in seconds since midnight.
- * @hide
- */
- public static final String REBOOT_START_TIME = "reboot_start_time";
-
- /**
- * The window of time (in seconds) after each REBOOT_INTERVAL in which
- * a reboot can be executed. If 0, a reboot will always be executed at
- * exactly the given time. Otherwise, it will only be executed if
- * the device is idle within the window.
- * @hide
- */
- public static final String REBOOT_WINDOW = "reboot_window";
-
- /**
* Threshold values for the duration and level of a discharge cycle, under
* which we log discharge cycle info.
* @hide
@@ -4128,13 +3783,6 @@ public final class Settings {
public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
/**
- * @deprecated Use {@link android.provider.Settings.Global#WTF_IS_FATAL} instead
- * @hide
- */
- @Deprecated
- public static final String WTF_IS_FATAL = Global.WTF_IS_FATAL;
-
- /**
* Maximum age of entries kept by {@link com.android.internal.os.IDropBoxManagerService}.
* @hide
*/
@@ -4239,121 +3887,6 @@ public final class Settings {
public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS;
/**
- * The interval in milliseconds to issue wake up scans when wifi needs
- * to connect. This is necessary to connect to an access point when
- * device is on the move and the screen is off.
- * @hide
- * @deprecated Use {@link android.provider.Settings.Global#WIFI_FRAMEWORK_SCAN_INTERVAL_MS}
- * instead.
- */
- @Deprecated
- public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS =
- Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS;
-
- /**
- * The interval in milliseconds to scan as used by the wifi supplicant
- * @hide
- * @deprecated Use {@link android.provider.Settings.Global#WIFI_SUPPLICANT_SCAN_INTERVAL_MS}
- * instead.
- */
- @Deprecated
- public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS =
- Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_POLL_INTERVAL_MS}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
- Global.PDP_WATCHDOG_POLL_INTERVAL_MS;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_LONG_POLL_INTERVAL_MS}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
- Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
- Global.PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
- Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_ERROR_POLL_COUNT}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
- Global.PDP_WATCHDOG_ERROR_POLL_COUNT;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
- Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
- Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
- Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#GPRS_REGISTER_CHECK_PERIOD_MS}
- * instead.
- * @hide
- */
- @Deprecated
- public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
- Global.GPRS_REGISTER_CHECK_PERIOD_MS;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#NITZ_UPDATE_SPACING} instead
- * @hide
- */
- public static final String NITZ_UPDATE_SPACING = Global.NITZ_UPDATE_SPACING;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#NITZ_UPDATE_SPACING} instead
- * @hide
- */
- public static final String NITZ_UPDATE_DIFF = Global.NITZ_UPDATE_DIFF;
-
- /**
* The maximum reconnect delay for short network outages or when the network is suspended
* due to phone use.
* @hide
@@ -4362,20 +3895,6 @@ public final class Settings {
"sync_max_retry_delay_in_seconds";
/**
- * @deprecated Use {@link Settings.Global#SMS_OUTGOING_CHECK_INTERVAL_MS} instead.
- * @hide
- */
- public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
- Global.SMS_OUTGOING_CHECK_INTERVAL_MS;
-
- /**
- * @deprecated Use {@link Settings.Global#SMS_OUTGOING_CHECK_MAX_COUNT} instead.
- * @hide
- */
- public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
- Global.SMS_OUTGOING_CHECK_MAX_COUNT;
-
- /**
* The global search provider chosen by the user (if multiple global
* search providers are installed). This will be the provider returned
* by {@link SearchManager#getGlobalSearchActivity()} if it's still
@@ -4610,72 +4129,6 @@ public final class Settings {
public static final String DEFAULT_INSTALL_LOCATION = "default_install_location";
/**
- * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_POLLING_SEC} instead
- * @hide
- */
- @Deprecated
- public static final String THROTTLE_POLLING_SEC = Global.THROTTLE_POLLING_SEC;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_THRESHOLD_BYTES} instead
- * @hide
- */
- @Deprecated
- public static final String THROTTLE_THRESHOLD_BYTES = Global.THROTTLE_THRESHOLD_BYTES;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_VALUE_KBITSPS} instead
- * @hide
- */
- @Deprecated
- public static final String THROTTLE_VALUE_KBITSPS = Global.THROTTLE_VALUE_KBITSPS;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_VALUE_KBITSPS} instead
- * @hide
- */
- @Deprecated
- public static final String THROTTLE_RESET_DAY = Global.THROTTLE_RESET_DAY;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_NOTIFICATION_TYPE} instead
- * @hide
- */
- @Deprecated
- public static final String THROTTLE_NOTIFICATION_TYPE = Global.THROTTLE_NOTIFICATION_TYPE;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_HELP_URI} instead
- * @hide
- */
- @Deprecated
- public static final String THROTTLE_HELP_URI = Global.THROTTLE_HELP_URI;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_MAX_NTP_CACHE_AGE_SEC} instead
- * @hide
- */
- @Deprecated
- public static final String THROTTLE_MAX_NTP_CACHE_AGE_SEC =
- Global.THROTTLE_MAX_NTP_CACHE_AGE_SEC;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#DOWNLOAD_MAX_BYTES_OVER_MOBILE} instead
- * @hide
- */
- @Deprecated
- public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE =
- Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE} instead
- * @hide
- */
- @Deprecated
- public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE =
- Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE;
-
- /**
* ms during which to consume extra events related to Inet connection condition
* after a transtion to fully-connected
* @hide
@@ -4692,30 +4145,6 @@ public final class Settings {
"inet_condition_debounce_down_delay";
/**
- * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DATA_SERVICE_URL} instead
- * @hide
- */
- @Deprecated
- public static final String SETUP_PREPAID_DATA_SERVICE_URL =
- Global.SETUP_PREPAID_DATA_SERVICE_URL;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DETECTION_TARGET_URL} instead
- * @hide
- */
- @Deprecated
- public static final String SETUP_PREPAID_DETECTION_TARGET_URL =
- Global.SETUP_PREPAID_DETECTION_TARGET_URL;
-
- /**
- * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DETECTION_REDIR_HOST} instead
- * @hide
- */
- @Deprecated
- public static final String SETUP_PREPAID_DETECTION_REDIR_HOST =
- Global.SETUP_PREPAID_DETECTION_REDIR_HOST;
-
- /**
* Whether screensavers are enabled.
* @hide
*/
@@ -4750,131 +4179,11 @@ public final class Settings {
*/
public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component";
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_ENABLED = Global.NETSTATS_ENABLED;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_POLL_INTERVAL = Global.NETSTATS_POLL_INTERVAL;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_TIME_CACHE_MAX_AGE = Global.NETSTATS_TIME_CACHE_MAX_AGE;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_GLOBAL_ALERT_BYTES = Global.NETSTATS_GLOBAL_ALERT_BYTES;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_SAMPLE_ENABLED = Global.NETSTATS_SAMPLE_ENABLED;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_REPORT_XT_OVER_DEV = Global.NETSTATS_REPORT_XT_OVER_DEV;
-
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_DEV_BUCKET_DURATION = Global.NETSTATS_DEV_BUCKET_DURATION;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_DEV_PERSIST_BYTES = Global.NETSTATS_DEV_PERSIST_BYTES;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_DEV_ROTATE_AGE = Global.NETSTATS_DEV_ROTATE_AGE;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_DEV_DELETE_AGE = Global.NETSTATS_DEV_DELETE_AGE;
-
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_UID_BUCKET_DURATION = Global.NETSTATS_UID_BUCKET_DURATION;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_UID_PERSIST_BYTES = Global.NETSTATS_UID_PERSIST_BYTES;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_UID_ROTATE_AGE = Global.NETSTATS_UID_ROTATE_AGE;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_UID_DELETE_AGE = Global.NETSTATS_UID_DELETE_AGE;
-
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_UID_TAG_BUCKET_DURATION = Global.NETSTATS_UID_TAG_BUCKET_DURATION;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_UID_TAG_PERSIST_BYTES = Global.NETSTATS_UID_TAG_PERSIST_BYTES;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_UID_TAG_ROTATE_AGE = Global.NETSTATS_UID_TAG_ROTATE_AGE;
- /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
- * {@hide} */
- @Deprecated
- public static final String NETSTATS_UID_TAG_DELETE_AGE = Global.NETSTATS_UID_TAG_DELETE_AGE;
-
- /** Preferred NTP server. {@hide}
- * @deprecated moved to Settings.Global */
- public static final String NTP_SERVER = Global.NTP_SERVER;
-
- /** Timeout in milliseconds to wait for NTP server. {@hide}
- * @deprecated moved to Settings.Global */
- public static final String NTP_TIMEOUT = Global.NTP_TIMEOUT;
-
- /** Autofill server address (Used in WebView/browser).
- * @deprecated moved to Settings.Global
- * {@hide} */
- public static final String WEB_AUTOFILL_QUERY_URL = Global.WEB_AUTOFILL_QUERY_URL;
-
- /**
- * Whether the package manager should send package verification broadcasts for verifiers to
- * review apps prior to installation.
- * @deprecated moved to Settings.Global
- * 1 = request apps to be verified prior to installation, if a verifier exists.
- * 0 = do not verify apps before installation
- * {@hide}
- */
- @Deprecated
- public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable";
-
- /** Timeout for package verification.
- * @deprecated moved to Settings.Global
- * {@hide} */
- @Deprecated
- public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
-
- /** Default response code for package verification.
- * @deprecated moved to Settings.Global
- * {@hide} */
- @Deprecated
- public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response";
-
/** {@hide} */
public static final String
READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default";
/**
- * Duration in milliseconds before pre-authorized URIs for the contacts
- * provider should expire.
- * @hide
- */
- public static final String CONTACTS_PREAUTH_URI_EXPIRATION =
- "contacts_preauth_uri_expiration";
-
- /**
* This are the settings to be backed up.
*
* NOTE: Settings are backed up and restored in the order they appear
diff --git a/core/java/android/service/dreams/Dream.java b/core/java/android/service/dreams/Dream.java
index 473414c..590acfa 100644
--- a/core/java/android/service/dreams/Dream.java
+++ b/core/java/android/service/dreams/Dream.java
@@ -72,6 +72,12 @@ public class Dream extends Service implements Window.Callback {
private final String TAG = Dream.class.getSimpleName() + "[" + getClass().getSimpleName() + "]";
/**
+ * The name of the dream manager service.
+ * @hide
+ */
+ public static final String DREAM_SERVICE = "dreams";
+
+ /**
* Used with {@link Intent#ACTION_MAIN} to declare the necessary intent-filter for a dream.
*
* @see Dream
@@ -499,7 +505,7 @@ public class Dream extends Service implements Window.Callback {
// end public api
private void loadSandman() {
- mSandman = IDreamManager.Stub.asInterface(ServiceManager.getService("dreams"));
+ mSandman = IDreamManager.Stub.asInterface(ServiceManager.getService(DREAM_SERVICE));
}
private final void attach(IBinder windowToken) {
@@ -584,7 +590,7 @@ public class Dream extends Service implements Window.Callback {
mFinished = true;
if (mSandman != null) {
- mSandman.awakenSelf(mWindowToken);
+ mSandman.finishSelf(mWindowToken);
} else {
Slog.w(TAG, "No dream manager found");
}
diff --git a/core/java/android/service/dreams/IDreamManager.aidl b/core/java/android/service/dreams/IDreamManager.aidl
index bd1c524..1c1b390 100644
--- a/core/java/android/service/dreams/IDreamManager.aidl
+++ b/core/java/android/service/dreams/IDreamManager.aidl
@@ -30,5 +30,5 @@ interface IDreamManager {
ComponentName getDefaultDreamComponent();
void testDream(in ComponentName componentName);
boolean isDreaming();
- void awakenSelf(in IBinder token);
+ void finishSelf(in IBinder token);
} \ No newline at end of file
diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java
index 123ce2a..b0a2711 100644
--- a/core/java/android/view/ScaleGestureDetector.java
+++ b/core/java/android/view/ScaleGestureDetector.java
@@ -314,7 +314,7 @@ public class ScaleGestureDetector {
}
}
- final boolean configChanged =
+ final boolean configChanged = action == MotionEvent.ACTION_DOWN ||
action == MotionEvent.ACTION_POINTER_UP ||
action == MotionEvent.ACTION_POINTER_DOWN;
final boolean pointerUp = action == MotionEvent.ACTION_POINTER_UP;
@@ -344,7 +344,7 @@ public class ScaleGestureDetector {
if (skipIndex == i) continue;
// Average touch major and touch minor and convert the resulting diameter into a radius.
- final float touchSize = getAdjustedTouchHistory(event.getPointerId(i));
+ final float touchSize = getAdjustedTouchHistory(event.getPointerId(i)) / 2;
devSumX += Math.abs(event.getX(i) - focusX) + touchSize;
devSumY += Math.abs(event.getY(i) - focusY) + touchSize;
}
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 3be63d5..0d16dd3 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -46,13 +46,18 @@ import java.util.concurrent.locks.ReentrantLock;
*
* <p>The surface is Z ordered so that it is behind the window holding its
* SurfaceView; the SurfaceView punches a hole in its window to allow its
- * surface to be displayed. The view hierarchy will take care of correctly
+ * surface to be displayed. The view hierarchy will take care of correctly
* compositing with the Surface any siblings of the SurfaceView that would
- * normally appear on top of it. This can be used to place overlays such as
+ * normally appear on top of it. This can be used to place overlays such as
* buttons on top of the Surface, though note however that it can have an
* impact on performance since a full alpha-blended composite will be performed
* each time the Surface changes.
*
+ * <p> The transparent region that makes the surface visible is based on the
+ * layout positions in the view hierarchy. If the post-layout transform
+ * properties are used to draw a sibling view on top of the SurfaceView, the
+ * view may not be properly composited with the surface.
+ *
* <p>Access to the underlying surface is provided via the SurfaceHolder interface,
* which can be retrieved by calling {@link #getHolder}.
*
@@ -62,14 +67,14 @@ import java.util.concurrent.locks.ReentrantLock;
* Surface is created and destroyed as the window is shown and hidden.
*
* <p>One of the purposes of this class is to provide a surface in which a
- * secondary thread can render into the screen. If you are going to use it
+ * secondary thread can render into the screen. If you are going to use it
* this way, you need to be aware of some threading semantics:
*
* <ul>
* <li> All SurfaceView and
* {@link SurfaceHolder.Callback SurfaceHolder.Callback} methods will be called
* from the thread running the SurfaceView's window (typically the main thread
- * of the application). They thus need to correctly synchronize with any
+ * of the application). They thus need to correctly synchronize with any
* state that is also touched by the drawing thread.
* <li> You must ensure that the drawing thread only touches the underlying
* Surface while it is valid -- between
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java
index 87396fb..7ca8322 100644
--- a/core/java/android/widget/ImageView.java
+++ b/core/java/android/widget/ImageView.java
@@ -789,6 +789,7 @@ public class ImageView extends View {
if (resizeWidth) {
int newWidth = (int)(desiredAspect * (heightSize - ptop - pbottom)) +
pleft + pright;
+ widthSize = resolveAdjustedSize(newWidth, mMaxWidth, widthMeasureSpec);
if (newWidth <= widthSize) {
widthSize = newWidth;
done = true;
@@ -799,6 +800,7 @@ public class ImageView extends View {
if (!done && resizeHeight) {
int newHeight = (int)((widthSize - pleft - pright) / desiredAspect) +
ptop + pbottom;
+ heightSize = resolveAdjustedSize(newHeight, mMaxHeight, heightMeasureSpec);
if (newHeight <= heightSize) {
heightSize = newHeight;
}
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index bffbe11..4ad0819 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -436,9 +436,10 @@ public class ResolverActivity extends AlertActivity implements AdapterView.OnIte
if (mBaseResolveList != null) {
mCurrentResolveList = mBaseResolveList;
} else {
- mCurrentResolveList = mPm.queryIntentActivities(
+ mCurrentResolveList = mPm.queryIntentActivitiesAsUser(
mIntent, PackageManager.MATCH_DEFAULT_ONLY
- | (mAlwaysUseOption ? PackageManager.GET_RESOLVED_FILTER : 0));
+ | (mAlwaysUseOption ? PackageManager.GET_RESOLVED_FILTER : 0),
+ UserHandle.getUserId(mLaunchedFromUid));
// Filter out any activities that the launched uid does not
// have permission for. We don't do this when we have an explicit
// list of resolved activities, because that only happens when