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

Commit 58111283 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am 98b7584e: am 2a857c63: Merge "Work on issue #17624121: Settings crash while...

am 98b7584e: am 2a857c63: Merge "Work on issue #17624121: Settings crash while launching on wiped device" into lmp-dev

* commit '98b7584e1c45b9963a59de1625594c704065c575':
  Work on issue #17624121: Settings crash while launching on wiped device
parents fc4cba36 459a5597
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1909,7 +1909,8 @@ public final class ActiveServices {
        }
    }

    boolean attachApplicationLocked(ProcessRecord proc, String processName) throws Exception {
    boolean attachApplicationLocked(ProcessRecord proc, String processName)
            throws RemoteException {
        boolean didSomething = false;
        // Collect any services that are waiting for this process to come up.
        if (mPendingServices.size() > 0) {
@@ -1929,7 +1930,7 @@ public final class ActiveServices {
                    realStartServiceLocked(sr, proc, sr.createdFromFg);
                    didSomething = true;
                }
            } catch (Exception e) {
            } catch (RemoteException e) {
                Slog.w(TAG, "Exception in new application when starting service "
                        + sr.shortName, e);
                throw e;
+8 −6
Original line number Diff line number Diff line
@@ -2629,7 +2629,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        int lrui = mLruProcesses.lastIndexOf(app);
        if (lrui >= 0) {
            if (!app.killed) {
                Slog.wtf(TAG, "Removing process that hasn't been killed: " + app);
                Slog.wtfStack(TAG, "Removing process that hasn't been killed: " + app);
                Process.killProcessQuiet(app.pid);
                Process.killProcessGroup(app.info.uid, app.pid);
            }
@@ -6126,7 +6126,7 @@ public final class ActivityManagerService extends ActivityManagerNative
            // todo: Yikes!  What should we do?  For now we will try to
            // start another process, but that could easily get us in
            // an infinite loop of restarting processes...
            Slog.w(TAG, "Exception thrown during bind!", e);
            Slog.wtf(TAG, "Exception thrown during bind of " + app, e);
            app.resetPackageList(mProcessStats);
            app.unlinkDeathRecipient();
@@ -6150,6 +6150,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                    didSomething = true;
                }
            } catch (Exception e) {
                Slog.wtf(TAG, "Exception thrown launching activities in " + app, e);
                badApp = true;
            }
        }
@@ -6159,6 +6160,7 @@ public final class ActivityManagerService extends ActivityManagerNative
            try {
                didSomething |= mServices.attachApplicationLocked(app, processName);
            } catch (Exception e) {
                Slog.wtf(TAG, "Exception thrown starting services in " + app, e);
                badApp = true;
            }
        }
@@ -6169,6 +6171,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                didSomething |= sendPendingBroadcastsLocked(app);
            } catch (Exception e) {
                // If the app died trying to launch the receiver we declare it 'bad'
                Slog.wtf(TAG, "Exception thrown dispatching broadcasts in " + app, e);
                badApp = true;
            }
        }
@@ -6182,14 +6185,13 @@ public final class ActivityManagerService extends ActivityManagerNative
                        compatibilityInfoForPackageLocked(mBackupTarget.appInfo),
                        mBackupTarget.backupMode);
            } catch (Exception e) {
                Slog.w(TAG, "Exception scheduling backup agent creation: ");
                e.printStackTrace();
                Slog.wtf(TAG, "Exception thrown creating backup agent in " + app, e);
                badApp = true;
            }
        }
        if (badApp) {
            // todo: Also need to kill application to deal with all
            // kinds of exceptions.
            app.kill("error during init", true);
            handleAppDiedLocked(app, false, true);
            return false;
        }
+2 −2
Original line number Diff line number Diff line
@@ -503,7 +503,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
        return resumedActivity;
    }

    boolean attachApplicationLocked(ProcessRecord app) throws Exception {
    boolean attachApplicationLocked(ProcessRecord app) throws RemoteException {
        final String processName = app.processName;
        boolean didSomething = false;
        for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
@@ -521,7 +521,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
                            if (realStartActivityLocked(hr, app, true, true)) {
                                didSomething = true;
                            }
                        } catch (Exception e) {
                        } catch (RemoteException e) {
                            Slog.w(TAG, "Exception in new application when starting activity "
                                  + hr.intent.getComponent().flattenToShortString(), e);
                            throw e;