Merge "Throw exceptions if obtain ActivityStarter before system ready"
This commit is contained in:
@@ -279,6 +279,9 @@ class ActivityStarter {
|
||||
ActivityStarter starter = mStarterPool.acquire();
|
||||
|
||||
if (starter == null) {
|
||||
if (mService.mRootWindowContainer == null) {
|
||||
throw new IllegalStateException("Too early to start activity.");
|
||||
}
|
||||
starter = new ActivityStarter(mController, mService, mSupervisor, mInterceptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -183,6 +183,7 @@ import android.os.IUserManager;
|
||||
import android.os.LocaleList;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Parcel;
|
||||
import android.os.PowerManager;
|
||||
import android.os.PowerManagerInternal;
|
||||
import android.os.Process;
|
||||
@@ -4938,6 +4939,21 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
return allUids.contains(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
|
||||
throws RemoteException {
|
||||
try {
|
||||
return super.onTransact(code, data, reply, flags);
|
||||
} catch (RuntimeException e) {
|
||||
if (!(e instanceof SecurityException)) {
|
||||
Slog.w(TAG, "Activity Task Manager onTransact aborts "
|
||||
+ " UID:" + Binder.getCallingUid()
|
||||
+ " PID:" + Binder.getCallingPid(), e);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
final class H extends Handler {
|
||||
static final int REPORT_TIME_TRACKER_MSG = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user