Loading packages/SystemUI/res/drawable/ic_qs_font_scaling.xml 0 → 100644 +25 −0 Original line number Diff line number Diff line <!-- Copyright (C) 2023 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"> <path android:pathData="M7,20L7,7L2,7L2,4h13v3h-5v13ZM16,20v-8h-3L13,9h9v3h-3v8Z" android:fillColor="#041E49"/> </vector> No newline at end of file packages/SystemUI/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" --> <string name="quick_settings_tiles_stock" translatable="false"> internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream,font_scaling </string> <!-- The tiles to display in QuickSettings --> Loading packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,8 @@ <string name="quick_settings_inversion_label">Color inversion</string> <!-- QuickSettings: Label for the toggle that controls whether display color correction is enabled. [CHAR LIMIT=NONE] --> <string name="quick_settings_color_correction_label">Color correction</string> <!-- QuickSettings: Label for font size scaling. [CHAR LIMIT=NONE] --> <string name="quick_settings_font_scaling_label">Font size</string> <!-- QuickSettings: Control panel: Label for button that navigates to user settings. [CHAR LIMIT=NONE] --> <string name="quick_settings_more_user_settings">Manage users</string> <!-- QuickSettings: Control panel: Label for button that dismisses control panel. [CHAR LIMIT=NONE] --> Loading packages/SystemUI/res/values/tiles_states_strings.xml +10 −0 Original line number Diff line number Diff line Loading @@ -318,4 +318,14 @@ <item>Off</item> <item>On</item> </string-array> <!-- State names for font scaling tile: unavailable, off, on. This subtitle is shown when the tile is in that particular state but does not set its own subtitle, so some of these may never appear on screen. They should still be translated as if they could appear. [CHAR LIMIT=32] --> <string-array name="tile_states_font_scaling"> <item>Unavailable</item> <item>Off</item> <item>On</item> </string-array> </resources> No newline at end of file packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java +7 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import com.android.systemui.qs.tiles.DeviceControlsTile; import com.android.systemui.qs.tiles.DndTile; import com.android.systemui.qs.tiles.DreamTile; import com.android.systemui.qs.tiles.FlashlightTile; import com.android.systemui.qs.tiles.FontScalingTile; import com.android.systemui.qs.tiles.HotspotTile; import com.android.systemui.qs.tiles.InternetTile; import com.android.systemui.qs.tiles.LocationTile; Loading Loading @@ -94,6 +95,7 @@ public class QSFactoryImpl implements QSFactory { private final Provider<QRCodeScannerTile> mQRCodeScannerTileProvider; private final Provider<OneHandedModeTile> mOneHandedModeTileProvider; private final Provider<DreamTile> mDreamTileProvider; private final Provider<FontScalingTile> mFontScalingTileProvider; private final Lazy<QSHost> mQsHostLazy; private final Provider<CustomTile.Builder> mCustomTileBuilderProvider; Loading Loading @@ -129,7 +131,8 @@ public class QSFactoryImpl implements QSFactory { Provider<QRCodeScannerTile> qrCodeScannerTileProvider, Provider<OneHandedModeTile> oneHandedModeTileProvider, Provider<ColorCorrectionTile> colorCorrectionTileProvider, Provider<DreamTile> dreamTileProvider) { Provider<DreamTile> dreamTileProvider, Provider<FontScalingTile> fontScalingTileProvider) { mQsHostLazy = qsHostLazy; mCustomTileBuilderProvider = customTileBuilderProvider; Loading Loading @@ -161,6 +164,7 @@ public class QSFactoryImpl implements QSFactory { mOneHandedModeTileProvider = oneHandedModeTileProvider; mColorCorrectionTileProvider = colorCorrectionTileProvider; mDreamTileProvider = dreamTileProvider; mFontScalingTileProvider = fontScalingTileProvider; } /** Creates a tile with a type based on {@code tileSpec} */ Loading Loading @@ -232,6 +236,8 @@ public class QSFactoryImpl implements QSFactory { return mColorCorrectionTileProvider.get(); case "dream": return mDreamTileProvider.get(); case "font_scaling": return mFontScalingTileProvider.get(); } // Custom tiles Loading Loading
packages/SystemUI/res/drawable/ic_qs_font_scaling.xml 0 → 100644 +25 −0 Original line number Diff line number Diff line <!-- Copyright (C) 2023 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"> <path android:pathData="M7,20L7,7L2,7L2,4h13v3h-5v13ZM16,20v-8h-3L13,9h9v3h-3v8Z" android:fillColor="#041E49"/> </vector> No newline at end of file
packages/SystemUI/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" --> <string name="quick_settings_tiles_stock" translatable="false"> internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream,font_scaling </string> <!-- The tiles to display in QuickSettings --> Loading
packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,8 @@ <string name="quick_settings_inversion_label">Color inversion</string> <!-- QuickSettings: Label for the toggle that controls whether display color correction is enabled. [CHAR LIMIT=NONE] --> <string name="quick_settings_color_correction_label">Color correction</string> <!-- QuickSettings: Label for font size scaling. [CHAR LIMIT=NONE] --> <string name="quick_settings_font_scaling_label">Font size</string> <!-- QuickSettings: Control panel: Label for button that navigates to user settings. [CHAR LIMIT=NONE] --> <string name="quick_settings_more_user_settings">Manage users</string> <!-- QuickSettings: Control panel: Label for button that dismisses control panel. [CHAR LIMIT=NONE] --> Loading
packages/SystemUI/res/values/tiles_states_strings.xml +10 −0 Original line number Diff line number Diff line Loading @@ -318,4 +318,14 @@ <item>Off</item> <item>On</item> </string-array> <!-- State names for font scaling tile: unavailable, off, on. This subtitle is shown when the tile is in that particular state but does not set its own subtitle, so some of these may never appear on screen. They should still be translated as if they could appear. [CHAR LIMIT=32] --> <string-array name="tile_states_font_scaling"> <item>Unavailable</item> <item>Off</item> <item>On</item> </string-array> </resources> No newline at end of file
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java +7 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import com.android.systemui.qs.tiles.DeviceControlsTile; import com.android.systemui.qs.tiles.DndTile; import com.android.systemui.qs.tiles.DreamTile; import com.android.systemui.qs.tiles.FlashlightTile; import com.android.systemui.qs.tiles.FontScalingTile; import com.android.systemui.qs.tiles.HotspotTile; import com.android.systemui.qs.tiles.InternetTile; import com.android.systemui.qs.tiles.LocationTile; Loading Loading @@ -94,6 +95,7 @@ public class QSFactoryImpl implements QSFactory { private final Provider<QRCodeScannerTile> mQRCodeScannerTileProvider; private final Provider<OneHandedModeTile> mOneHandedModeTileProvider; private final Provider<DreamTile> mDreamTileProvider; private final Provider<FontScalingTile> mFontScalingTileProvider; private final Lazy<QSHost> mQsHostLazy; private final Provider<CustomTile.Builder> mCustomTileBuilderProvider; Loading Loading @@ -129,7 +131,8 @@ public class QSFactoryImpl implements QSFactory { Provider<QRCodeScannerTile> qrCodeScannerTileProvider, Provider<OneHandedModeTile> oneHandedModeTileProvider, Provider<ColorCorrectionTile> colorCorrectionTileProvider, Provider<DreamTile> dreamTileProvider) { Provider<DreamTile> dreamTileProvider, Provider<FontScalingTile> fontScalingTileProvider) { mQsHostLazy = qsHostLazy; mCustomTileBuilderProvider = customTileBuilderProvider; Loading Loading @@ -161,6 +164,7 @@ public class QSFactoryImpl implements QSFactory { mOneHandedModeTileProvider = oneHandedModeTileProvider; mColorCorrectionTileProvider = colorCorrectionTileProvider; mDreamTileProvider = dreamTileProvider; mFontScalingTileProvider = fontScalingTileProvider; } /** Creates a tile with a type based on {@code tileSpec} */ Loading Loading @@ -232,6 +236,8 @@ public class QSFactoryImpl implements QSFactory { return mColorCorrectionTileProvider.get(); case "dream": return mDreamTileProvider.get(); case "font_scaling": return mFontScalingTileProvider.get(); } // Custom tiles Loading