Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f882efad authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #6266651: Low storage warning takes long time to sort apps by usage

On a device with emulated external storage, the low storage notification
should go to the main storage settings UI.  This shows the user all of
the things that could be causing their storage to be low.

Change-Id: I9c345b6cb7abbabc24a67c7e104d077ecbbfb86d
parent 50a92678
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.content.Intent;
import android.content.pm.IPackageDataObserver;
import android.content.pm.IPackageManager;
import android.os.Binder;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.os.Process;
@@ -336,7 +337,9 @@ public class DeviceStorageMonitorService extends Binder {
        //log the event to event log with the amount of free storage(in bytes) left on the device
        EventLog.writeEvent(EventLogTags.LOW_STORAGE, mFreeMem);
        //  Pack up the values and broadcast them to everyone
        Intent lowMemIntent = new Intent(Intent.ACTION_MANAGE_PACKAGE_STORAGE);
        Intent lowMemIntent = new Intent(Environment.isExternalStorageEmulated()
                ? Settings.ACTION_INTERNAL_STORAGE_SETTINGS
                : Intent.ACTION_MANAGE_PACKAGE_STORAGE);
        lowMemIntent.putExtra("memory", mFreeMem);
        lowMemIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        NotificationManager mNotificationMgr =