Updating some notificiation UI for Throttling

String update and make one an ongoing notification.

bug:2576057
Change-Id: I7980f110c7eed8e8bf305490eddaa58e2949e3be
This commit is contained in:
Robert Greenwalt
2010-04-08 16:00:26 -07:00
parent 2b4b573801
commit c87dc6dc90
2 changed files with 10 additions and 8 deletions

View File

@@ -362,7 +362,8 @@ public class ThrottleService extends IThrottleManager.Stub {
postNotification(com.android.internal.R.string.throttled_notification_title,
com.android.internal.R.string.throttled_notification_message,
com.android.internal.R.drawable.stat_sys_throttled);
com.android.internal.R.drawable.stat_sys_throttled,
Notification.FLAG_ONGOING_EVENT);
Intent broadcast = new Intent(ThrottleManager.THROTTLE_ACTION);
broadcast.putExtra(ThrottleManager.EXTRA_THROTTLE_LEVEL, mPolicyThrottleValue);
@@ -380,7 +381,8 @@ public class ThrottleService extends IThrottleManager.Stub {
throttle_warning_notification_title,
com.android.internal.R.string.
throttle_warning_notification_message,
com.android.internal.R.drawable.stat_sys_throttle_warning);
com.android.internal.R.drawable.stat_sys_throttle_warning,
0);
} else {
mWarningNotificationSent =false;
}
@@ -388,7 +390,7 @@ public class ThrottleService extends IThrottleManager.Stub {
}
}
private void postNotification(int titleInt, int messageInt, int icon) {
private void postNotification(int titleInt, int messageInt, int icon, int flags) {
Intent intent = new Intent();
// TODO - fix up intent
intent.setClassName("com.android.settings", "com.android.settings.TetherSettings");
@@ -405,8 +407,8 @@ public class ThrottleService extends IThrottleManager.Stub {
// TODO - fixup icon
mThrottlingNotification.icon = icon;
mThrottlingNotification.defaults &= ~Notification.DEFAULT_SOUND;
// mThrottlingNotification.flags = Notification.FLAG_ONGOING_EVENT;
}
mThrottlingNotification.flags = flags;
mThrottlingNotification.tickerText = title;
mThrottlingNotification.setLatestEventInfo(mContext, title, message, pi);