am da0498c5: am 6cf3d4aa: am cc691f50: Merge "Updating some notificiation UI for Throttling" into froyo
This commit is contained in:
@@ -2260,11 +2260,11 @@
|
|||||||
|
|
||||||
<!-- Strings for throttling notification -->
|
<!-- Strings for throttling notification -->
|
||||||
<!-- Shown when the user is in danger of being throttled -->
|
<!-- Shown when the user is in danger of being throttled -->
|
||||||
<string name="throttle_warning_notification_title">Excessive data use warning</string>
|
<string name="throttle_warning_notification_title">High mobile data use</string>
|
||||||
<string name="throttle_warning_notification_message">If your data use pattern continues you may be subject to bandwidth restrictions - touch for more information</string>
|
<string name="throttle_warning_notification_message">Touch to learn more about mobile data use</string>
|
||||||
|
|
||||||
<!-- Strings for throttling notification -->
|
<!-- Strings for throttling notification -->
|
||||||
<!-- Shown when the users bandwidth is reduced because of excessive data use -->
|
<!-- Shown when the users bandwidth is reduced because of excessive data use -->
|
||||||
<string name="throttled_notification_title">Bandwidth Restricted</string>
|
<string name="throttled_notification_title">Mobile data limit exceeded</string>
|
||||||
<string name="throttled_notification_message">Your mobile data bandwidth is being reduced because of excessive data use - touch for more information</string>
|
<string name="throttled_notification_message">Touch to learn more about mobile data use</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -362,7 +362,8 @@ public class ThrottleService extends IThrottleManager.Stub {
|
|||||||
|
|
||||||
postNotification(com.android.internal.R.string.throttled_notification_title,
|
postNotification(com.android.internal.R.string.throttled_notification_title,
|
||||||
com.android.internal.R.string.throttled_notification_message,
|
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);
|
Intent broadcast = new Intent(ThrottleManager.THROTTLE_ACTION);
|
||||||
broadcast.putExtra(ThrottleManager.EXTRA_THROTTLE_LEVEL, mPolicyThrottleValue);
|
broadcast.putExtra(ThrottleManager.EXTRA_THROTTLE_LEVEL, mPolicyThrottleValue);
|
||||||
@@ -380,7 +381,8 @@ public class ThrottleService extends IThrottleManager.Stub {
|
|||||||
throttle_warning_notification_title,
|
throttle_warning_notification_title,
|
||||||
com.android.internal.R.string.
|
com.android.internal.R.string.
|
||||||
throttle_warning_notification_message,
|
throttle_warning_notification_message,
|
||||||
com.android.internal.R.drawable.stat_sys_throttle_warning);
|
com.android.internal.R.drawable.stat_sys_throttle_warning,
|
||||||
|
0);
|
||||||
} else {
|
} else {
|
||||||
mWarningNotificationSent =false;
|
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();
|
Intent intent = new Intent();
|
||||||
// TODO - fix up intent
|
// TODO - fix up intent
|
||||||
intent.setClassName("com.android.settings", "com.android.settings.TetherSettings");
|
intent.setClassName("com.android.settings", "com.android.settings.TetherSettings");
|
||||||
@@ -405,8 +407,8 @@ public class ThrottleService extends IThrottleManager.Stub {
|
|||||||
// TODO - fixup icon
|
// TODO - fixup icon
|
||||||
mThrottlingNotification.icon = icon;
|
mThrottlingNotification.icon = icon;
|
||||||
mThrottlingNotification.defaults &= ~Notification.DEFAULT_SOUND;
|
mThrottlingNotification.defaults &= ~Notification.DEFAULT_SOUND;
|
||||||
// mThrottlingNotification.flags = Notification.FLAG_ONGOING_EVENT;
|
|
||||||
}
|
}
|
||||||
|
mThrottlingNotification.flags = flags;
|
||||||
mThrottlingNotification.tickerText = title;
|
mThrottlingNotification.tickerText = title;
|
||||||
mThrottlingNotification.setLatestEventInfo(mContext, title, message, pi);
|
mThrottlingNotification.setLatestEventInfo(mContext, title, message, pi);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user