Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f16b926a authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Throw exceptions if obtain ActivityStarter before system ready"

parents 66988843 b7844e5b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
            }

+16 −0
Original line number Diff line number Diff line
@@ -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;