summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/power
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-06-12 13:00:55 -0400
committerJohn Spurlock <jspurlock@google.com>2014-06-12 13:00:55 -0400
commiteb44a7de47a994f93398b5880cd9f2d6badc6e3a (patch)
tree470064e16f0ba5b679568e529f92c2bd684801e6 /packages/SystemUI/src/com/android/systemui/power
parent4a1ca967388804e599180a27bf9f03ea16ce6362 (diff)
downloadframeworks_base-eb44a7de47a994f93398b5880cd9f2d6badc6e3a.zip
frameworks_base-eb44a7de47a994f93398b5880cd9f2d6badc6e3a.tar.gz
frameworks_base-eb44a7de47a994f93398b5880cd9f2d6badc6e3a.tar.bz2
PowerUI: dismiss warning notifications when falling back.
The full-screen intents simply fire broadcasts to open fallback dialogs. This means the warning notifications are left visible under the dialog on the lockscreen, or after the dialog is quickly dismissed. Once we launch the fallback dialogs, there is no reason for the notification form to exist. Bug:13329308 Change-Id: I5735c65d7e8eb620493d3ef3a2cfc27f75cecbb5
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/power')
-rw-r--r--packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index 3fa8b99..da8a5cb 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -34,7 +34,6 @@ import android.os.Handler;
import android.os.SystemClock;
import android.os.UserHandle;
import android.provider.Settings;
-import android.util.Log;
import android.util.Slog;
import android.view.ContextThemeWrapper;
import android.view.View;
@@ -312,6 +311,12 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
@Override
public void dismissInvalidChargerWarning() {
+ dismissInvalidChargerNotification();
+ mFallbackDialogs.dismissInvalidChargerWarning();
+ }
+
+ private void dismissInvalidChargerNotification() {
+ Slog.i(TAG, "dismissing invalid charger notification");
mInvalidCharger = false;
updateNotification();
}
@@ -355,10 +360,12 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
- Log.d(TAG, "got " + action);
+ Slog.i(TAG, "Received " + action);
if (action.equals(ACTION_SHOW_FALLBACK_WARNING)) {
+ dismissLowBatteryNotification();
mFallbackDialogs.showLowBatteryWarning(false /*playSound*/);
} else if (action.equals(ACTION_SHOW_FALLBACK_CHARGER)) {
+ dismissInvalidChargerNotification();
mFallbackDialogs.showInvalidChargerWarning();
} else if (action.equals(ACTION_SHOW_BATTERY_SETTINGS)) {
dismissLowBatteryNotification();