Loading services/java/com/android/server/MountService.java +19 −9 Original line number Diff line number Diff line Loading @@ -115,8 +115,9 @@ class MountService extends IMountService.Stub private PackageManagerService mPms; private boolean mUmsEnabling; private ArrayList<MountServiceBinderListener> mListeners; private boolean mBooted; private boolean mReady; private boolean mBooted = false; private boolean mReady = false; private boolean mSendUmsConnectedOnBoot = false; /** * Private hash of currently mounted secure containers. Loading Loading @@ -162,6 +163,14 @@ class MountService extends IMountService.Stub Log.e(TAG, String.format("Boot-time mount failed (%d)", rc)); } } /* * If UMS is connected in boot, send the connected event * now that we're up. */ if (mSendUmsConnectedOnBoot) { sendUmsIntent(true); mSendUmsConnectedOnBoot = false; } } catch (Exception ex) { Log.e(TAG, "Boot-time mount exception", ex); } Loading Loading @@ -636,14 +645,15 @@ class MountService extends IMountService.Stub } if (mBooted == true) { Intent intent; if (avail) { intent = new Intent(Intent.ACTION_UMS_CONNECTED); sendUmsIntent(avail); } else { intent = new Intent(Intent.ACTION_UMS_DISCONNECTED); mSendUmsConnectedOnBoot = avail; } mContext.sendBroadcast(intent); } private void sendUmsIntent(boolean c) { mContext.sendBroadcast( new Intent((c ? Intent.ACTION_UMS_CONNECTED : Intent.ACTION_UMS_DISCONNECTED))); } private void validatePermission(String perm) { Loading Loading
services/java/com/android/server/MountService.java +19 −9 Original line number Diff line number Diff line Loading @@ -115,8 +115,9 @@ class MountService extends IMountService.Stub private PackageManagerService mPms; private boolean mUmsEnabling; private ArrayList<MountServiceBinderListener> mListeners; private boolean mBooted; private boolean mReady; private boolean mBooted = false; private boolean mReady = false; private boolean mSendUmsConnectedOnBoot = false; /** * Private hash of currently mounted secure containers. Loading Loading @@ -162,6 +163,14 @@ class MountService extends IMountService.Stub Log.e(TAG, String.format("Boot-time mount failed (%d)", rc)); } } /* * If UMS is connected in boot, send the connected event * now that we're up. */ if (mSendUmsConnectedOnBoot) { sendUmsIntent(true); mSendUmsConnectedOnBoot = false; } } catch (Exception ex) { Log.e(TAG, "Boot-time mount exception", ex); } Loading Loading @@ -636,14 +645,15 @@ class MountService extends IMountService.Stub } if (mBooted == true) { Intent intent; if (avail) { intent = new Intent(Intent.ACTION_UMS_CONNECTED); sendUmsIntent(avail); } else { intent = new Intent(Intent.ACTION_UMS_DISCONNECTED); mSendUmsConnectedOnBoot = avail; } mContext.sendBroadcast(intent); } private void sendUmsIntent(boolean c) { mContext.sendBroadcast( new Intent((c ? Intent.ACTION_UMS_CONNECTED : Intent.ACTION_UMS_DISCONNECTED))); } private void validatePermission(String perm) { Loading