Adds logic to SystemUI that shows a notification alerting the user that their phone has reached a certain temperature and has throttled itself in order to cool down. The logic is controlled by a configuration resource: R.bool.config_showTemperatureWarning. If false, no action is taken. When true, PowerUI checks every 30 seconds if the current temp of HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN is greater than the throttling temp of HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN. If any one of the temperatures returned is greater, a notification is shown. Clicking on the notification will show a dialog explaining more details about what the device is doing in response to the high temperature. The notification will disappear once the temperature drops below the throttling temperature. In order to check the temperature in SystemUI, HardwarePropertiesManager has been updated to also allow any calls made by callers holding the signature-level DEVICE_POWER permission. Test: runtest systemui Bug: 30995038 Change-Id: I1b3f122341911c68e90c8a49ad35267ac382b356
77 lines
3.6 KiB
XML
77 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
~ Copyright (C) 2014 The Android Open Source Project
|
|
~
|
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
~ you may not use this file except in compliance with the License.
|
|
~ You may obtain a copy of the License at
|
|
~
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
~
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
~ See the License for the specific language governing permissions and
|
|
~ limitations under the License
|
|
-->
|
|
|
|
<resources>
|
|
<item type="id" name="translation_x_animator_tag"/>
|
|
<item type="id" name="translation_y_animator_tag"/>
|
|
<item type="id" name="translation_z_animator_tag"/>
|
|
<item type="id" name="alpha_animator_tag"/>
|
|
<item type="id" name="top_inset_animator_tag"/>
|
|
<item type="id" name="height_animator_tag"/>
|
|
<item type="id" name="shadow_alpha_animator_tag"/>
|
|
<item type="id" name="translation_x_animator_end_value_tag"/>
|
|
<item type="id" name="translation_y_animator_end_value_tag"/>
|
|
<item type="id" name="translation_z_animator_end_value_tag"/>
|
|
<item type="id" name="alpha_animator_end_value_tag"/>
|
|
<item type="id" name="top_inset_animator_end_value_tag"/>
|
|
<item type="id" name="height_animator_end_value_tag"/>
|
|
<item type="id" name="shadow_alpha_animator_end_value_tag"/>
|
|
<item type="id" name="translation_x_animator_start_value_tag"/>
|
|
<item type="id" name="translation_y_animator_start_value_tag"/>
|
|
<item type="id" name="translation_z_animator_start_value_tag"/>
|
|
<item type="id" name="alpha_animator_start_value_tag"/>
|
|
<item type="id" name="top_inset_animator_start_value_tag"/>
|
|
<item type="id" name="height_animator_start_value_tag"/>
|
|
<item type="id" name="shadow_alpha_animator_start_value_tag"/>
|
|
<item type="id" name="doze_saved_filter_tag"/>
|
|
<item type="id" name="qs_icon_tag"/>
|
|
<item type="id" name="scrim"/>
|
|
<item type="id" name="scrim_target"/>
|
|
<item type="id" name="scrim_alpha_start"/>
|
|
<item type="id" name="scrim_alpha_end"/>
|
|
<item type="id" name="notification_power"/>
|
|
<item type="id" name="notification_screenshot"/>
|
|
<item type="id" name="notification_hidden"/>
|
|
<item type="id" name="notification_volumeui"/>
|
|
<item type="id" name="notification_temperature"/>
|
|
<item type="id" name="transformation_start_x_tag"/>
|
|
<item type="id" name="transformation_start_y_tag"/>
|
|
<item type="id" name="transformation_start_scale_x_tag"/>
|
|
<item type="id" name="transformation_start_scale_y_tag"/>
|
|
<item type="id" name="custom_background_color"/>
|
|
|
|
<!-- Whether the icon is from a notification for which targetSdk < L -->
|
|
<item type="id" name="icon_is_pre_L"/>
|
|
|
|
<!-- For notification icons for which targetSdk < L, this caches whether the icon is grayscale -->
|
|
<item type="id" name="icon_is_grayscale" />
|
|
<item type="id" name="clip_children_tag" />
|
|
<item type="id" name="clip_children_set_tag" />
|
|
<item type="id" name="clip_to_padding_tag" />
|
|
<item type="id" name="image_icon_tag" />
|
|
<item type="id" name="contains_transformed_view" />
|
|
<item type="id" name="is_clicked_heads_up_tag" />
|
|
|
|
<!-- Accessibility actions for the docked stack divider -->
|
|
<item type="id" name="action_move_tl_full" />
|
|
<item type="id" name="action_move_tl_70" />
|
|
<item type="id" name="action_move_tl_50" />
|
|
<item type="id" name="action_move_tl_30" />
|
|
<item type="id" name="action_move_rb_full" />
|
|
</resources>
|
|
|