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

Commit d3fc46c7 authored by Christopher Tate's avatar Christopher Tate Committed by Android Git Automerger
Browse files

am b3c5aebd: am 2d091225: Merge "Gracefully handle races with package uninstall" into mnc-dev

* commit 'b3c5aebd':
  Gracefully handle races with package uninstall
parents 63f14807 b3c5aebd
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -5502,8 +5502,10 @@ public final class ActivityManagerService extends ActivityManagerNative
                    // Entire package setting changed
                    enabled = pm.getApplicationEnabledSetting(packageName,
                            (userId != UserHandle.USER_ALL) ? userId : UserHandle.USER_OWNER);
                } catch (RemoteException e) {
                    // Can't happen...
                } catch (Exception e) {
                    // No such package/component; probably racing with uninstall.  In any
                    // event it means we have nothing further to do here.
                    return;
                }
                packageDisabled = enabled != PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                        && enabled != PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
@@ -5518,8 +5520,9 @@ public final class ActivityManagerService extends ActivityManagerNative
                    enabled = pm.getComponentEnabledSetting(
                            new ComponentName(packageName, changedClass),
                            (userId != UserHandle.USER_ALL) ? userId : UserHandle.USER_OWNER);
                } catch (RemoteException e) {
                    // Can't happen...
                } catch (Exception e) {
                    // As above, probably racing with uninstall.
                    return;
                }
                if (enabled != PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                        && enabled != PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {