Loading packages/SystemUI/LineageManifest.xml +4 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,10 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.systemui"> <!-- QS Tiles --> <uses-permission android:name="lineageos.permission.WRITE_SETTINGS" /> <uses-permission android:name="lineageos.permission.WRITE_SECURE_SETTINGS" /> <!-- Visualizer --> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> Loading packages/SystemUI/res/drawable/ic_qs_caffeine.xml 0 → 100644 +27 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (c) 2015 The CyanogenMod Project Copyright (c) 2017 The LineageOS 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="48dp" android:height="48dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#FFFFFFFF" android:pathData="M2,21H20V19H2M20,8H18V5H20M20,3H4V13A4,4 0 0,0 8,17H14A4,4 0 0,0 18,13V10H20A2,2 0 0,0 22,8V5C22,3.89 21.1,3 20,3Z" /> </vector> packages/SystemUI/res/values/cm_strings.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /** * Copyright (c) 2015, The CyanogenMod Project * Copyright (c) 2017-2018, The LineageOS 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Custom QS tiles --> <!-- Caffeine QS tile --> <string name="quick_settings_caffeine_label">Caffeine</string> <string name="accessibility_quick_settings_caffeine_off">Caffeine off.</string> <string name="accessibility_quick_settings_caffeine_on">Caffeine on.</string> </resources> packages/SystemUI/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" --> <string name="quick_settings_tiles_stock" translatable="false"> wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,nfc,location,hotspot,inversion,saver,work,cast,night wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,nfc,location,hotspot,inversion,saver,work,cast,night,caffeine </string> <!-- The tiles to display in QuickSettings --> Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java +6 −1 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * Copyright (C) 2017 The LineageOS Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use mHost file * except in compliance with the License. You may obtain a copy of the License at Loading @@ -26,6 +27,7 @@ import com.android.systemui.qs.external.CustomTile; import com.android.systemui.qs.tiles.AirplaneModeTile; import com.android.systemui.qs.tiles.BatterySaverTile; import com.android.systemui.qs.tiles.BluetoothTile; import com.android.systemui.qs.tiles.CaffeineTile; import com.android.systemui.qs.tiles.CastTile; import com.android.systemui.qs.tiles.CellularTile; import com.android.systemui.qs.tiles.ColorInversionTile; Loading Loading @@ -62,8 +64,8 @@ public class QSFactoryImpl implements QSFactory { } private QSTileImpl createTileInternal(String tileSpec) { // Stock tiles. switch (tileSpec) { // Stock tiles. case "wifi": return new WifiTile(mHost); case "bt": Loading Loading @@ -98,6 +100,9 @@ public class QSFactoryImpl implements QSFactory { return new NightDisplayTile(mHost); case "nfc": return new NfcTile(mHost); // Custom tiles. case "caffeine": return new CaffeineTile(mHost); } // Intent tiles. Loading Loading
packages/SystemUI/LineageManifest.xml +4 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,10 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.systemui"> <!-- QS Tiles --> <uses-permission android:name="lineageos.permission.WRITE_SETTINGS" /> <uses-permission android:name="lineageos.permission.WRITE_SECURE_SETTINGS" /> <!-- Visualizer --> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> Loading
packages/SystemUI/res/drawable/ic_qs_caffeine.xml 0 → 100644 +27 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (c) 2015 The CyanogenMod Project Copyright (c) 2017 The LineageOS 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="48dp" android:height="48dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#FFFFFFFF" android:pathData="M2,21H20V19H2M20,8H18V5H20M20,3H4V13A4,4 0 0,0 8,17H14A4,4 0 0,0 18,13V10H20A2,2 0 0,0 22,8V5C22,3.89 21.1,3 20,3Z" /> </vector>
packages/SystemUI/res/values/cm_strings.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /** * Copyright (c) 2015, The CyanogenMod Project * Copyright (c) 2017-2018, The LineageOS 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Custom QS tiles --> <!-- Caffeine QS tile --> <string name="quick_settings_caffeine_label">Caffeine</string> <string name="accessibility_quick_settings_caffeine_off">Caffeine off.</string> <string name="accessibility_quick_settings_caffeine_on">Caffeine on.</string> </resources>
packages/SystemUI/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" --> <string name="quick_settings_tiles_stock" translatable="false"> wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,nfc,location,hotspot,inversion,saver,work,cast,night wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,nfc,location,hotspot,inversion,saver,work,cast,night,caffeine </string> <!-- The tiles to display in QuickSettings --> Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java +6 −1 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * Copyright (C) 2017 The LineageOS Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use mHost file * except in compliance with the License. You may obtain a copy of the License at Loading @@ -26,6 +27,7 @@ import com.android.systemui.qs.external.CustomTile; import com.android.systemui.qs.tiles.AirplaneModeTile; import com.android.systemui.qs.tiles.BatterySaverTile; import com.android.systemui.qs.tiles.BluetoothTile; import com.android.systemui.qs.tiles.CaffeineTile; import com.android.systemui.qs.tiles.CastTile; import com.android.systemui.qs.tiles.CellularTile; import com.android.systemui.qs.tiles.ColorInversionTile; Loading Loading @@ -62,8 +64,8 @@ public class QSFactoryImpl implements QSFactory { } private QSTileImpl createTileInternal(String tileSpec) { // Stock tiles. switch (tileSpec) { // Stock tiles. case "wifi": return new WifiTile(mHost); case "bt": Loading Loading @@ -98,6 +100,9 @@ public class QSFactoryImpl implements QSFactory { return new NightDisplayTile(mHost); case "nfc": return new NfcTile(mHost); // Custom tiles. case "caffeine": return new CaffeineTile(mHost); } // Intent tiles. Loading