Loading core/java/com/android/internal/content/NativeLibraryHelper.java +0 −15 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import android.os.incremental.IncrementalManager; import android.os.incremental.IncrementalStorage; import android.system.ErrnoException; import android.system.Os; import android.util.ArraySet; import android.util.Slog; import dalvik.system.CloseGuard; Loading Loading @@ -551,18 +550,4 @@ public class NativeLibraryHelper { } return false; } /** * Wait for all native library extraction to complete for the passed storages. * * @param incrementalStorages A list of the storages to wait for. */ public static void waitForNativeBinariesExtraction( ArraySet<IncrementalStorage> incrementalStorages) { for (int i = 0; i < incrementalStorages.size(); ++i) { IncrementalStorage storage = incrementalStorages.valueAtUnchecked(i); storage.waitForNativeBinariesExtraction(); } } } services/core/java/com/android/server/pm/PackageManagerService.java +22 −1 Original line number Diff line number Diff line Loading @@ -20111,7 +20111,28 @@ public class PackageManagerService extends IPackageManager.Stub notifyPackageChangeObserversOnUpdate(reconciledPkg); } NativeLibraryHelper.waitForNativeBinariesExtraction(incrementalStorages); waitForNativeBinariesExtraction(incrementalStorages); } static void waitForNativeBinariesExtraction( ArraySet<IncrementalStorage> incrementalStorages) { if (incrementalStorages.isEmpty()) { return; } try { // Native library extraction may take very long time: each page could potentially // wait for either 10s or 100ms (adb vs non-adb data loader), and that easily adds // up to a full watchdog timeout of 1 min, killing the system after that. It doesn't // make much sense as blocking here doesn't lock up the framework, but only blocks // the installation session and the following ones. Watchdog.getInstance().pauseWatchingCurrentThread("native_lib_extract"); for (int i = 0; i < incrementalStorages.size(); ++i) { IncrementalStorage storage = incrementalStorages.valueAtUnchecked(i); storage.waitForNativeBinariesExtraction(); } } finally { Watchdog.getInstance().resumeWatchingCurrentThread("native_lib_extract"); } } private int[] getInstalledUsers(PackageSetting ps, int userId) { Loading
core/java/com/android/internal/content/NativeLibraryHelper.java +0 −15 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import android.os.incremental.IncrementalManager; import android.os.incremental.IncrementalStorage; import android.system.ErrnoException; import android.system.Os; import android.util.ArraySet; import android.util.Slog; import dalvik.system.CloseGuard; Loading Loading @@ -551,18 +550,4 @@ public class NativeLibraryHelper { } return false; } /** * Wait for all native library extraction to complete for the passed storages. * * @param incrementalStorages A list of the storages to wait for. */ public static void waitForNativeBinariesExtraction( ArraySet<IncrementalStorage> incrementalStorages) { for (int i = 0; i < incrementalStorages.size(); ++i) { IncrementalStorage storage = incrementalStorages.valueAtUnchecked(i); storage.waitForNativeBinariesExtraction(); } } }
services/core/java/com/android/server/pm/PackageManagerService.java +22 −1 Original line number Diff line number Diff line Loading @@ -20111,7 +20111,28 @@ public class PackageManagerService extends IPackageManager.Stub notifyPackageChangeObserversOnUpdate(reconciledPkg); } NativeLibraryHelper.waitForNativeBinariesExtraction(incrementalStorages); waitForNativeBinariesExtraction(incrementalStorages); } static void waitForNativeBinariesExtraction( ArraySet<IncrementalStorage> incrementalStorages) { if (incrementalStorages.isEmpty()) { return; } try { // Native library extraction may take very long time: each page could potentially // wait for either 10s or 100ms (adb vs non-adb data loader), and that easily adds // up to a full watchdog timeout of 1 min, killing the system after that. It doesn't // make much sense as blocking here doesn't lock up the framework, but only blocks // the installation session and the following ones. Watchdog.getInstance().pauseWatchingCurrentThread("native_lib_extract"); for (int i = 0; i < incrementalStorages.size(); ++i) { IncrementalStorage storage = incrementalStorages.valueAtUnchecked(i); storage.waitForNativeBinariesExtraction(); } } finally { Watchdog.getInstance().resumeWatchingCurrentThread("native_lib_extract"); } } private int[] getInstalledUsers(PackageSetting ps, int userId) {