Loading services/core/java/com/android/server/pm/Installer.java +20 −3 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ public class Installer extends SystemService { IInstalld.FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES; private final boolean mIsolated; private volatile boolean mDeferSetFirstBoot; private volatile IInstalld mInstalld; private volatile Object mWarnIfHeld; Loading Loading @@ -171,6 +171,7 @@ public class Installer extends SystemService { mInstalld = IInstalld.Stub.asInterface(binder); try { invalidateMounts(); executeDeferredActions(); } catch (InstallerException ignored) { } } else { Loading @@ -179,6 +180,15 @@ public class Installer extends SystemService { } } /** * Perform any deferred actions on mInstalld while the connection could not be made. */ private void executeDeferredActions() throws InstallerException { if (mDeferSetFirstBoot) { setFirstBoot(); } } /** * Do several pre-flight checks before making a remote call. * Loading Loading @@ -291,8 +301,15 @@ public class Installer extends SystemService { return; } try { // mInstalld might be null if the connection could not be established. if (mInstalld != null) { mInstalld.setFirstBoot(); } catch (RemoteException e) { } else { // if it is null while trying to set the first boot, set a flag to try and set the // first boot when the connection is eventually established mDeferSetFirstBoot = true; } } catch (Exception e) { throw InstallerException.from(e); } } Loading Loading
services/core/java/com/android/server/pm/Installer.java +20 −3 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ public class Installer extends SystemService { IInstalld.FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES; private final boolean mIsolated; private volatile boolean mDeferSetFirstBoot; private volatile IInstalld mInstalld; private volatile Object mWarnIfHeld; Loading Loading @@ -171,6 +171,7 @@ public class Installer extends SystemService { mInstalld = IInstalld.Stub.asInterface(binder); try { invalidateMounts(); executeDeferredActions(); } catch (InstallerException ignored) { } } else { Loading @@ -179,6 +180,15 @@ public class Installer extends SystemService { } } /** * Perform any deferred actions on mInstalld while the connection could not be made. */ private void executeDeferredActions() throws InstallerException { if (mDeferSetFirstBoot) { setFirstBoot(); } } /** * Do several pre-flight checks before making a remote call. * Loading Loading @@ -291,8 +301,15 @@ public class Installer extends SystemService { return; } try { // mInstalld might be null if the connection could not be established. if (mInstalld != null) { mInstalld.setFirstBoot(); } catch (RemoteException e) { } else { // if it is null while trying to set the first boot, set a flag to try and set the // first boot when the connection is eventually established mDeferSetFirstBoot = true; } } catch (Exception e) { throw InstallerException.from(e); } } Loading