From 3ee1317173260252d475772fec09d492f8fcfd33 Mon Sep 17 00:00:00 2001 From: San Mehat Date: Thu, 4 Feb 2010 20:54:43 -0800 Subject: [PATCH] NotificationManagerService: Add a listener for storage events Signed-off-by: San Mehat --- .../java/com/android/server/NotificationManagerService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index d989b6bfb62a4..80fd51f94eb04 100755 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -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(); 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);