Merge "Fix the binder calling identity in setVrMode" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
88757bbb8b
@@ -14288,14 +14288,20 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized(this) {
|
// Clear the binder calling uid since this path may call moveToTask().
|
||||||
r.requestedVrComponent = (enabled) ? packageName : null;
|
final long callingId = Binder.clearCallingIdentity();
|
||||||
|
try {
|
||||||
|
synchronized(this) {
|
||||||
|
r.requestedVrComponent = (enabled) ? packageName : null;
|
||||||
|
|
||||||
// Update associated state if this activity is currently focused
|
// Update associated state if this activity is currently focused
|
||||||
if (r == mStackSupervisor.getResumedActivityLocked()) {
|
if (r == mStackSupervisor.getResumedActivityLocked()) {
|
||||||
applyUpdateVrModeLocked(r);
|
applyUpdateVrModeLocked(r);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
} finally {
|
||||||
|
Binder.restoreCallingIdentity(callingId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user