Merge "Add screensaver icon to DreamTile" into tm-qpr-dev
This commit is contained in:
24
packages/SystemUI/res/drawable/ic_qs_screen_saver.xml
Normal file
24
packages/SystemUI/res/drawable/ic_qs_screen_saver.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<!--
|
||||
Copyright (C) 2022 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.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M5,15H19L14.5,9L11,13.5L8.5,10.5ZM6,21Q5.575,21 5.287,20.712Q5,20.425 5,20V19H3Q2.175,19 1.588,18.413Q1,17.825 1,17V6Q1,5.175 1.588,4.588Q2.175,4 3,4H21Q21.825,4 22.413,4.588Q23,5.175 23,6V17Q23,17.825 22.413,18.413Q21.825,19 21,19H19V20Q19,20.425 18.712,20.712Q18.425,21 18,21ZM3,17H21Q21,17 21,17Q21,17 21,17V6Q21,6 21,6Q21,6 21,6H3Q3,6 3,6Q3,6 3,6V17Q3,17 3,17Q3,17 3,17ZM3,17Q3,17 3,17Q3,17 3,17V6Q3,6 3,6Q3,6 3,6Q3,6 3,6Q3,6 3,6V17Q3,17 3,17Q3,17 3,17Z"/>
|
||||
</vector>
|
||||
@@ -61,6 +61,7 @@ import javax.inject.Named;
|
||||
public class DreamTile extends QSTileImpl<QSTile.BooleanState> {
|
||||
|
||||
private static final String LOG_TAG = "QSDream";
|
||||
private final Icon mIcon = ResourceIcon.get(R.drawable.ic_qs_screen_saver);
|
||||
private final IDreamManager mDreamManager;
|
||||
private final BroadcastDispatcher mBroadcastDispatcher;
|
||||
private final SettingObserver mEnabledSettingObserver;
|
||||
@@ -167,6 +168,7 @@ public class DreamTile extends QSTileImpl<QSTile.BooleanState> {
|
||||
state.label = getTileLabel();
|
||||
state.secondaryLabel = getActiveDreamName();
|
||||
state.contentDescription = getContentDescription(state.secondaryLabel);
|
||||
state.icon = mIcon;
|
||||
|
||||
if (getActiveDream() == null || !isScreensaverEnabled()) {
|
||||
state.state = Tile.STATE_UNAVAILABLE;
|
||||
|
||||
Reference in New Issue
Block a user