Loading services/java/com/android/server/MountService.java +10 −2 Original line number Original line Diff line number Diff line Loading @@ -68,6 +68,8 @@ class MountService extends IMountService.Stub private static final String TAG = "MountService"; private static final String TAG = "MountService"; private static final String VOLD_TAG = "VoldConnector"; /* /* * Internal vold volume state constants * Internal vold volume state constants */ */ Loading Loading @@ -1006,9 +1008,15 @@ class MountService extends IMountService.Stub return; return; } } mConnector = new NativeDaemonConnector(this, "vold", 10, "VoldConnector"); /* * Create the connection to vold with a maximum queue of twice the * amount of containers we'd ever expect to have. This keeps an * "asec list" from blocking a thread repeatedly. */ mConnector = new NativeDaemonConnector(this, "vold", PackageManagerService.MAX_CONTAINERS * 2, VOLD_TAG); mReady = false; mReady = false; Thread thread = new Thread(mConnector, NativeDaemonConnector.class.getName()); Thread thread = new Thread(mConnector, VOLD_TAG); thread.start(); thread.start(); } } Loading services/java/com/android/server/NetworkManagementService.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -55,6 +55,8 @@ class NetworkManagementService extends INetworkManagementService.Stub { private static final String TAG = "NetworkManagmentService"; private static final String TAG = "NetworkManagmentService"; private static final String NETD_TAG = "NetdConnector"; class NetdResponseCode { class NetdResponseCode { public static final int InterfaceListResult = 110; public static final int InterfaceListResult = 110; public static final int TetherInterfaceListResult = 111; public static final int TetherInterfaceListResult = 111; Loading Loading @@ -101,8 +103,8 @@ class NetworkManagementService extends INetworkManagementService.Stub { } } mConnector = new NativeDaemonConnector( mConnector = new NativeDaemonConnector( new NetdCallbackReceiver(), "netd", 10, "NetdConnector"); new NetdCallbackReceiver(), "netd", 10, NETD_TAG); Thread thread = new Thread(mConnector, NativeDaemonConnector.class.getName()); Thread thread = new Thread(mConnector, NETD_TAG); thread.start(); thread.start(); } } Loading services/java/com/android/server/PackageManagerService.java +7 −6 Original line number Original line Diff line number Diff line Loading @@ -9383,17 +9383,18 @@ class PackageManagerService extends IPackageManager.Stub { // ------- apps on sdcard specific code ------- // ------- apps on sdcard specific code ------- static final boolean DEBUG_SD_INSTALL = false; static final boolean DEBUG_SD_INSTALL = false; final private String mSdEncryptKey = "AppsOnSD"; private static final String SD_ENCRYPTION_KEYSTORE_NAME = "AppsOnSD"; final private String mSdEncryptAlg = "AES"; private static final String SD_ENCRYPTION_ALGORITHM = "AES"; static final int MAX_CONTAINERS = 250; private boolean mMediaMounted = false; private boolean mMediaMounted = false; private static final int MAX_CONTAINERS = 250; private String getEncryptKey() { private String getEncryptKey() { try { try { String sdEncKey = SystemKeyStore.getInstance().retrieveKeyHexString(mSdEncryptKey); String sdEncKey = SystemKeyStore.getInstance().retrieveKeyHexString( SD_ENCRYPTION_KEYSTORE_NAME); if (sdEncKey == null) { if (sdEncKey == null) { sdEncKey = SystemKeyStore.getInstance(). sdEncKey = SystemKeyStore.getInstance().generateNewKeyHexString(128, generateNewKeyHexString(128, mSdEncryptAlg, mSdEncryptKey); SD_ENCRYPTION_ALGORITHM, SD_ENCRYPTION_KEYSTORE_NAME); if (sdEncKey == null) { if (sdEncKey == null) { Slog.e(TAG, "Failed to create encryption keys"); Slog.e(TAG, "Failed to create encryption keys"); return null; return null; Loading Loading
services/java/com/android/server/MountService.java +10 −2 Original line number Original line Diff line number Diff line Loading @@ -68,6 +68,8 @@ class MountService extends IMountService.Stub private static final String TAG = "MountService"; private static final String TAG = "MountService"; private static final String VOLD_TAG = "VoldConnector"; /* /* * Internal vold volume state constants * Internal vold volume state constants */ */ Loading Loading @@ -1006,9 +1008,15 @@ class MountService extends IMountService.Stub return; return; } } mConnector = new NativeDaemonConnector(this, "vold", 10, "VoldConnector"); /* * Create the connection to vold with a maximum queue of twice the * amount of containers we'd ever expect to have. This keeps an * "asec list" from blocking a thread repeatedly. */ mConnector = new NativeDaemonConnector(this, "vold", PackageManagerService.MAX_CONTAINERS * 2, VOLD_TAG); mReady = false; mReady = false; Thread thread = new Thread(mConnector, NativeDaemonConnector.class.getName()); Thread thread = new Thread(mConnector, VOLD_TAG); thread.start(); thread.start(); } } Loading
services/java/com/android/server/NetworkManagementService.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -55,6 +55,8 @@ class NetworkManagementService extends INetworkManagementService.Stub { private static final String TAG = "NetworkManagmentService"; private static final String TAG = "NetworkManagmentService"; private static final String NETD_TAG = "NetdConnector"; class NetdResponseCode { class NetdResponseCode { public static final int InterfaceListResult = 110; public static final int InterfaceListResult = 110; public static final int TetherInterfaceListResult = 111; public static final int TetherInterfaceListResult = 111; Loading Loading @@ -101,8 +103,8 @@ class NetworkManagementService extends INetworkManagementService.Stub { } } mConnector = new NativeDaemonConnector( mConnector = new NativeDaemonConnector( new NetdCallbackReceiver(), "netd", 10, "NetdConnector"); new NetdCallbackReceiver(), "netd", 10, NETD_TAG); Thread thread = new Thread(mConnector, NativeDaemonConnector.class.getName()); Thread thread = new Thread(mConnector, NETD_TAG); thread.start(); thread.start(); } } Loading
services/java/com/android/server/PackageManagerService.java +7 −6 Original line number Original line Diff line number Diff line Loading @@ -9383,17 +9383,18 @@ class PackageManagerService extends IPackageManager.Stub { // ------- apps on sdcard specific code ------- // ------- apps on sdcard specific code ------- static final boolean DEBUG_SD_INSTALL = false; static final boolean DEBUG_SD_INSTALL = false; final private String mSdEncryptKey = "AppsOnSD"; private static final String SD_ENCRYPTION_KEYSTORE_NAME = "AppsOnSD"; final private String mSdEncryptAlg = "AES"; private static final String SD_ENCRYPTION_ALGORITHM = "AES"; static final int MAX_CONTAINERS = 250; private boolean mMediaMounted = false; private boolean mMediaMounted = false; private static final int MAX_CONTAINERS = 250; private String getEncryptKey() { private String getEncryptKey() { try { try { String sdEncKey = SystemKeyStore.getInstance().retrieveKeyHexString(mSdEncryptKey); String sdEncKey = SystemKeyStore.getInstance().retrieveKeyHexString( SD_ENCRYPTION_KEYSTORE_NAME); if (sdEncKey == null) { if (sdEncKey == null) { sdEncKey = SystemKeyStore.getInstance(). sdEncKey = SystemKeyStore.getInstance().generateNewKeyHexString(128, generateNewKeyHexString(128, mSdEncryptAlg, mSdEncryptKey); SD_ENCRYPTION_ALGORITHM, SD_ENCRYPTION_KEYSTORE_NAME); if (sdEncKey == null) { if (sdEncKey == null) { Slog.e(TAG, "Failed to create encryption keys"); Slog.e(TAG, "Failed to create encryption keys"); return null; return null; Loading