diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-09-26 14:55:18 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-26 14:55:19 -0700 |
commit | e521573097390ce5465fc9b88dee2ae62f2317c6 (patch) | |
tree | 3e43f20c2f0f750fa58c1c6d0854b7fe4cac81d5 /core | |
parent | 62fbb8311a1fe84fd1b09e27169757c85d7933cb (diff) | |
parent | b12e1354f25f04e9c9a71da76c6fca858b7d39d0 (diff) | |
download | frameworks_base-e521573097390ce5465fc9b88dee2ae62f2317c6.zip frameworks_base-e521573097390ce5465fc9b88dee2ae62f2317c6.tar.gz frameworks_base-e521573097390ce5465fc9b88dee2ae62f2317c6.tar.bz2 |
Merge "Maybe fix issue #7211766: bindService() to User u0 While u10 is..." into jb-mr1-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/ActivityManagerNative.java | 2 | ||||
-rw-r--r-- | core/java/android/app/ActivityThread.java | 7 | ||||
-rw-r--r-- | core/java/android/content/Context.java | 15 |
3 files changed, 19 insertions, 5 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/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 |