Loading services/core/java/com/android/server/MountService.java +15 −13 Original line number Original line Diff line number Diff line Loading @@ -767,8 +767,9 @@ class MountService extends IMountService.Stub Slog.d(TAG, "volume state changed for " + path + " (" + oldState + " -> " + state + ")"); Slog.d(TAG, "volume state changed for " + path + " (" + oldState + " -> " + state + ")"); // Tell PackageManager about changes, not only to primary volume, // Tell PackageManager about changes, only to the non-emulated // to all the non-emulated storage volumes // storage volumes. if (!volume.isEmulated()) { if (Environment.MEDIA_UNMOUNTED.equals(state)) { if (Environment.MEDIA_UNMOUNTED.equals(state)) { mPms.updateExternalMediaStatus(false, false); mPms.updateExternalMediaStatus(false, false); Loading @@ -782,6 +783,7 @@ class MountService extends IMountService.Stub } else if (Environment.MEDIA_MOUNTED.equals(state)) { } else if (Environment.MEDIA_MOUNTED.equals(state)) { mPms.updateExternalMediaStatus(true, false); mPms.updateExternalMediaStatus(true, false); } } } synchronized (mListeners) { synchronized (mListeners) { for (int i = mListeners.size() -1; i >= 0; i--) { for (int i = mListeners.size() -1; i >= 0; i--) { Loading Loading
services/core/java/com/android/server/MountService.java +15 −13 Original line number Original line Diff line number Diff line Loading @@ -767,8 +767,9 @@ class MountService extends IMountService.Stub Slog.d(TAG, "volume state changed for " + path + " (" + oldState + " -> " + state + ")"); Slog.d(TAG, "volume state changed for " + path + " (" + oldState + " -> " + state + ")"); // Tell PackageManager about changes, not only to primary volume, // Tell PackageManager about changes, only to the non-emulated // to all the non-emulated storage volumes // storage volumes. if (!volume.isEmulated()) { if (Environment.MEDIA_UNMOUNTED.equals(state)) { if (Environment.MEDIA_UNMOUNTED.equals(state)) { mPms.updateExternalMediaStatus(false, false); mPms.updateExternalMediaStatus(false, false); Loading @@ -782,6 +783,7 @@ class MountService extends IMountService.Stub } else if (Environment.MEDIA_MOUNTED.equals(state)) { } else if (Environment.MEDIA_MOUNTED.equals(state)) { mPms.updateExternalMediaStatus(true, false); mPms.updateExternalMediaStatus(true, false); } } } synchronized (mListeners) { synchronized (mListeners) { for (int i = mListeners.size() -1; i >= 0; i--) { for (int i = mListeners.size() -1; i >= 0; i--) { Loading