summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/power
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-06-12 20:10:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-10 21:32:31 +0000
commit0c377a902490239b310cbdcd1e6aad504a0e8845 (patch)
treeed564880fc919a2b2c1b2341a737b9e1e48138dd /packages/SystemUI/src/com/android/systemui/power
parent8e2c4da2c1cfbbb5b5845974a9e2cd8cfcd391d7 (diff)
parenteb44a7de47a994f93398b5880cd9f2d6badc6e3a (diff)
downloadframeworks_base-0c377a902490239b310cbdcd1e6aad504a0e8845.zip
frameworks_base-0c377a902490239b310cbdcd1e6aad504a0e8845.tar.gz
frameworks_base-0c377a902490239b310cbdcd1e6aad504a0e8845.tar.bz2
Merge "PowerUI: dismiss warning notifications when falling back." into lmp-preview-dev
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 1bb7109..e8f3745 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;
@@ -303,6 +302,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();
}
@@ -346,10 +351,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();