Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a60f7151 authored by Andrew Sapperstein's avatar Andrew Sapperstein Committed by Android (Google) Code Review
Browse files

Merge "Decrease frequency of high temp warnings" into nyc-mr2-dev

parents ae5d4ff8 97bfa0f1
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -215,8 +215,16 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
            return;
        }
        mTempWarning = false;
        mNoMan.cancelAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP,
                UserHandle.ALL);
        dismissTemperatureWarningInternal();
    }

    /**
     * Internal only version of {@link #dismissTemperatureWarning()} that simply dismisses
     * the notification. As such, the notification will not show again until
     * {@link #dismissTemperatureWarning()} is called.
     */
    private void dismissTemperatureWarningInternal() {
        mNoMan.cancelAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP, UserHandle.ALL);
    }

    @Override
@@ -388,10 +396,10 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
            } else if (action.equals(ACTION_DISMISSED_WARNING)) {
                dismissLowBatteryWarning();
            } else if (ACTION_CLICKED_TEMP_WARNING.equals(action)) {
                dismissTemperatureWarning();
                dismissTemperatureWarningInternal();
                showTemperatureDialog();
            } else if (ACTION_DISMISSED_TEMP_WARNING.equals(action)) {
                dismissTemperatureWarning();
                dismissTemperatureWarningInternal();
            }
        }
    }