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

Commit 3ee13171 authored by San Mehat's avatar San Mehat
Browse files

NotificationManagerService: Add a listener for storage events



Signed-off-by: default avatarSan Mehat <san@google.com>
parent 64e6a45e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import android.os.Message;
import android.os.Power;
import android.os.Process;
import android.os.RemoteException;
import android.storage.StorageManager;
import android.os.SystemProperties;
import android.os.Vibrator;
import android.provider.Settings;
@@ -406,6 +407,10 @@ class NotificationManagerService extends INotificationManager.Stub
        mSound.setUsesWakeLock(context);
        mToastQueue = new ArrayList<ToastRecord>();
        mHandler = new WorkerHandler();

        StorageManager sm = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
        sm.registerListener(new com.android.internal.app.StorageNotification(context));

        mStatusBarService = statusBar;
        statusBar.setNotificationCallbacks(mNotificationCallbacks);