* purposefully done before acquiring {@link #mPackages} lock.
*/
private int augmentFlagsForUser(int flags, int userId) {
- final IActivityManager am = ActivityManagerNative.getDefault();
- if (am == null) {
- // We must be early in boot, so the best we can do is assume the
- // user is fully running.
- return flags;
- }
- final long token = Binder.clearCallingIdentity();
- try {
- if (am.isUserRunning(userId, ActivityManager.FLAG_WITH_AMNESIA)) {
- flags |= PackageManager.FLAG_USER_RUNNING_WITH_AMNESIA;
- }
- } catch (RemoteException e) {
- throw e.rethrowAsRuntimeException();
- } finally {
- Binder.restoreCallingIdentity(token);
- }
+ // TODO: bring back once locking fixed
+// final IActivityManager am = ActivityManagerNative.getDefault();
+// if (am == null) {
+// // We must be early in boot, so the best we can do is assume the
+// // user is fully running.
+// return flags;
+// }
+// final long token = Binder.clearCallingIdentity();
+// try {
+// if (am.isUserRunning(userId, ActivityManager.FLAG_WITH_AMNESIA)) {
+// flags |= PackageManager.FLAG_USER_RUNNING_WITH_AMNESIA;
+// }
+// } catch (RemoteException e) {
+// throw e.rethrowAsRuntimeException();
+// } finally {
+// Binder.restoreCallingIdentity(token);
+// }
return flags;
}