Merge "system server watchdog caused by deadlock" into rvc-qpr-dev
This commit is contained in:
@@ -2997,13 +2997,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stopLockTaskModeByToken(IBinder token) {
|
public void stopLockTaskModeByToken(IBinder token) {
|
||||||
synchronized (mGlobalLock) {
|
stopLockTaskModeInternal(token, false /* isSystemCaller */);
|
||||||
final ActivityRecord r = ActivityRecord.forTokenLocked(token);
|
|
||||||
if (r == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
stopLockTaskModeInternal(r.getTask(), false /* isSystemCaller */);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3045,11 +3039,19 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLockTaskModeInternal(@Nullable Task task, boolean isSystemCaller) {
|
private void stopLockTaskModeInternal(@Nullable IBinder token, boolean isSystemCaller) {
|
||||||
final int callingUid = Binder.getCallingUid();
|
final int callingUid = Binder.getCallingUid();
|
||||||
long ident = Binder.clearCallingIdentity();
|
long ident = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
synchronized (mGlobalLock) {
|
synchronized (mGlobalLock) {
|
||||||
|
Task task = null;
|
||||||
|
if (token != null) {
|
||||||
|
final ActivityRecord r = ActivityRecord.forTokenLocked(token);
|
||||||
|
if (r == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
task = r.getTask();
|
||||||
|
}
|
||||||
getLockTaskController().stopLockTaskMode(task, isSystemCaller, callingUid);
|
getLockTaskController().stopLockTaskMode(task, isSystemCaller, callingUid);
|
||||||
}
|
}
|
||||||
// Launch in-call UI if a call is ongoing. This is necessary to allow stopping the lock
|
// Launch in-call UI if a call is ongoing. This is necessary to allow stopping the lock
|
||||||
|
|||||||
Reference in New Issue
Block a user