Loading services/core/java/com/android/server/pm/PackageInstallerSession.java +1 −23 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.content.pm.PackageParser; import android.content.pm.PackageParser.ApkLite; import android.content.pm.PackageParser.PackageLite; import android.content.pm.PackageParser.PackageParserException; import android.content.pm.dex.DexMetadataHelper; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Binder; Loading Loading @@ -99,7 +100,6 @@ import com.android.server.LocalServices; import com.android.server.pm.Installer.InstallerException; import com.android.server.pm.PackageInstallerService.PackageInstallObserverAdapter; import android.content.pm.dex.DexMetadataHelper; import libcore.io.IoUtils; import org.xmlpull.v1.XmlPullParser; Loading @@ -122,7 +122,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { private static final boolean LOGD = true; private static final String REMOVE_SPLIT_MARKER_EXTENSION = ".removed"; private static final int MSG_EARLY_BIND = 0; private static final int MSG_COMMIT = 1; private static final int MSG_ON_PACKAGE_INSTALLED = 2; Loading Loading @@ -168,7 +167,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { final int userId; final SessionParams params; final long createdMillis; final int defaultContainerGid; /** Staging location where client data is written. */ final File stageDir; Loading Loading @@ -285,9 +283,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @Override public boolean handleMessage(Message msg) { switch (msg.what) { case MSG_EARLY_BIND: earlyBindToDefContainer(); break; case MSG_COMMIT: synchronized (mLock) { try { Loading Loading @@ -323,10 +318,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } }; private void earlyBindToDefContainer() { mPm.earlyBindToDefContainer(); } /** * @return {@code true} iff the installing is app an device owner or affiliated profile owner. */ Loading Loading @@ -413,19 +404,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } } } final long identity = Binder.clearCallingIdentity(); try { final int uid = mPm.getPackageUid(PackageManagerService.DEFAULT_CONTAINER_PACKAGE, PackageManager.MATCH_SYSTEM_ONLY, UserHandle.USER_SYSTEM); defaultContainerGid = UserHandle.getSharedAppGid(uid); } finally { Binder.restoreCallingIdentity(identity); } // attempt to bind to the DefContainer as early as possible if ((params.installFlags & PackageManager.INSTALL_INSTANT_APP) != 0) { mHandler.sendMessage(mHandler.obtainMessage(MSG_EARLY_BIND)); } } public SessionInfo generateInfo() { Loading Loading
services/core/java/com/android/server/pm/PackageInstallerSession.java +1 −23 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.content.pm.PackageParser; import android.content.pm.PackageParser.ApkLite; import android.content.pm.PackageParser.PackageLite; import android.content.pm.PackageParser.PackageParserException; import android.content.pm.dex.DexMetadataHelper; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Binder; Loading Loading @@ -99,7 +100,6 @@ import com.android.server.LocalServices; import com.android.server.pm.Installer.InstallerException; import com.android.server.pm.PackageInstallerService.PackageInstallObserverAdapter; import android.content.pm.dex.DexMetadataHelper; import libcore.io.IoUtils; import org.xmlpull.v1.XmlPullParser; Loading @@ -122,7 +122,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { private static final boolean LOGD = true; private static final String REMOVE_SPLIT_MARKER_EXTENSION = ".removed"; private static final int MSG_EARLY_BIND = 0; private static final int MSG_COMMIT = 1; private static final int MSG_ON_PACKAGE_INSTALLED = 2; Loading Loading @@ -168,7 +167,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { final int userId; final SessionParams params; final long createdMillis; final int defaultContainerGid; /** Staging location where client data is written. */ final File stageDir; Loading Loading @@ -285,9 +283,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @Override public boolean handleMessage(Message msg) { switch (msg.what) { case MSG_EARLY_BIND: earlyBindToDefContainer(); break; case MSG_COMMIT: synchronized (mLock) { try { Loading Loading @@ -323,10 +318,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } }; private void earlyBindToDefContainer() { mPm.earlyBindToDefContainer(); } /** * @return {@code true} iff the installing is app an device owner or affiliated profile owner. */ Loading Loading @@ -413,19 +404,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } } } final long identity = Binder.clearCallingIdentity(); try { final int uid = mPm.getPackageUid(PackageManagerService.DEFAULT_CONTAINER_PACKAGE, PackageManager.MATCH_SYSTEM_ONLY, UserHandle.USER_SYSTEM); defaultContainerGid = UserHandle.getSharedAppGid(uid); } finally { Binder.restoreCallingIdentity(identity); } // attempt to bind to the DefContainer as early as possible if ((params.installFlags & PackageManager.INSTALL_INSTANT_APP) != 0) { mHandler.sendMessage(mHandler.obtainMessage(MSG_EARLY_BIND)); } } public SessionInfo generateInfo() { Loading