Skip to content

Commit d76008a

Browse files
Dianne HackbornAndroid (Google) Code Review
authored andcommitted
Merge "Fix issue #6266651: Low storage warning takes long time to sort apps by usage"
2 parents 856fbbe + f882efa commit d76008a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

services/java/com/android/server/DeviceStorageMonitorService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import android.content.pm.IPackageDataObserver;
2626
import android.content.pm.IPackageManager;
2727
import android.os.Binder;
28+
import android.os.Environment;
2829
import android.os.Handler;
2930
import android.os.Message;
3031
import android.os.Process;
@@ -336,7 +337,9 @@ private final void sendNotification() {
336337
//log the event to event log with the amount of free storage(in bytes) left on the device
337338
EventLog.writeEvent(EventLogTags.LOW_STORAGE, mFreeMem);
338339
// Pack up the values and broadcast them to everyone
339-
Intent lowMemIntent = new Intent(Intent.ACTION_MANAGE_PACKAGE_STORAGE);
340+
Intent lowMemIntent = new Intent(Environment.isExternalStorageEmulated()
341+
? Settings.ACTION_INTERNAL_STORAGE_SETTINGS
342+
: Intent.ACTION_MANAGE_PACKAGE_STORAGE);
340343
lowMemIntent.putExtra("memory", mFreeMem);
341344
lowMemIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
342345
NotificationManager mNotificationMgr =

0 commit comments

Comments
 (0)