Fix NPE when scheduling transaction for null client
Application process was crash and the application thread was set to null when obtaining the client transaction object. NPE was thrown by using it to schedule transaction. Bug: 130006936 Test: WindowProcessControllerTests Test: ActivityStartControllerTests Test: RootActivityContainerTests Change-Id: I65ecb124e014e5d80ebc283884475619f95239fa
This commit is contained in:
@@ -98,7 +98,7 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
|
||||
private final ActivityTaskManagerService mAtm;
|
||||
// The actual proc... may be null only if 'persistent' is true (in which case we are in the
|
||||
// process of launching the app)
|
||||
private volatile IApplicationThread mThread;
|
||||
private IApplicationThread mThread;
|
||||
// Currently desired scheduling class
|
||||
private volatile int mCurSchedGroup;
|
||||
// Currently computed process state
|
||||
@@ -192,8 +192,11 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
|
||||
return mPid;
|
||||
}
|
||||
|
||||
@HotPath(caller = HotPath.PROCESS_CHANGE)
|
||||
public void setThread(IApplicationThread thread) {
|
||||
mThread = thread;
|
||||
synchronized (mAtm.mGlobalLockWithoutBoost) {
|
||||
mThread = thread;
|
||||
}
|
||||
}
|
||||
|
||||
IApplicationThread getThread() {
|
||||
|
||||
Reference in New Issue
Block a user