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

Commit db5ae808 authored by Michael Bestas's avatar Michael Bestas Committed by Steve Kondik
Browse files

More cleanup on QS tiles

* Make strings & states more consistent to AOSP tiles
* Remove unused/duplicate strings
* Fix copyright headers

Change-Id: Ib97f216c31c96e23d72ce7bf7e63b16b65f1bee0
parent 1ca191d0
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -22,13 +22,6 @@
    android:paddingEnd="16dp"
    android:orientation="vertical" >

    <TextView
        android:id="@android:id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.QS.DataUsage"
        android:text="@string/quick_settings_location_detail_menu_title" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
@@ -50,7 +43,7 @@
            android:paddingRight="@dimen/detail_radio_group_padding"
            android:paddingBottom="@dimen/detail_radio_group_padding"
            android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary"
            android:text="@string/quick_settings_location_detail_mode_high_accuracy_title" />
            android:text="@string/quick_settings_location_high_accuracy_label" />
        <RadioButton android:id="@+id/radio_battery_saving"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
@@ -59,7 +52,7 @@
            android:paddingRight="@dimen/detail_radio_group_padding"
            android:paddingBottom="@dimen/detail_radio_group_padding"
            android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary"
            android:text="@string/quick_settings_location_detail_mode_battery_saving_title" />
            android:text="@string/quick_settings_location_battery_saving_label" />
        <RadioButton android:id="@+id/radio_sensors_only"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
@@ -68,7 +61,7 @@
            android:paddingRight="@dimen/detail_radio_group_padding"
            android:paddingBottom="@dimen/detail_radio_group_padding"
            android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary"
            android:text="@string/quick_settings_location_detail_mode_sensors_only_title" />
            android:text="@string/quick_settings_location_gps_only_label" />
        </RadioGroup>
    </LinearLayout>

+21 −46
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
 * Copyright (c) 2009, 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.
 */
     Copyright (C) 2015 The CyanogenMod 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">
    <!-- The text for the button in the notification window-shade that clears
@@ -46,9 +44,6 @@
    <!-- Content description of the location tile in quick settings when on, high accuracy mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_high_accuracy">Location reporting: high accuracy mode.</string>

    <!-- Content description of the superuser tile -->
    <string name="accessibility_su_active">Superuser session active</string>

    <!-- QuickSettings: Mobile data [CHAR LIMIT=NONE] -->
    <string name="quick_settings_mobile_data_label">Mobile data</string>
    <!-- QuickSettings: Roaming [CHAR LIMIT=NONE] -->
@@ -61,39 +56,23 @@
    <string name="quick_settings_dds_sub">Card <xliff:g id="number">%d</xliff:g> data</string>
    <string name="quick_settings_data_off">Data off</string>

    <!-- QuickSettings: Location detail panel title [CHAR LIMIT=NONE] -->
    <string name="quick_settings_location_detail_title">Location mode</string>
    <!-- QuickSettings: Location (On, low-power) [CHAR LIMIT=NONE] -->
    <string name="quick_settings_location_battery_saving_label">Battery saving</string>
    <!-- QuickSettings: Location (On, gps-only) [CHAR LIMIT=NONE] -->
    <string name="quick_settings_location_gps_only_label">GPS only</string>
    <string name="quick_settings_location_gps_only_label">Device only</string>
    <!-- QuickSettings: Location (On, high-accuracy) [CHAR LIMIT=NONE] -->
    <string name="quick_settings_location_high_accuracy_label">High accuracy</string>

    <!-- QuickSettings: Location detail panel title [CHAR LIMIT=NONE] -->
    <string name="quick_settings_location_detail_title">Location</string>
    <!-- QuickSettings: Location detail panel menu title [CHAR LIMIT=NONE] -->
    <string name="quick_settings_location_detail_menu_title">Select mode:</string>
    <!-- [CHAR LIMIT=30] Location detail panel, high accuracy location mode -->
    <string name="quick_settings_location_detail_mode_high_accuracy_title">High accuracy</string>
    <!-- [CHAR LIMIT=30] Location detail panel, battery saving location mode -->
    <string name="quick_settings_location_detail_mode_battery_saving_title">Battery saving</string>
    <!-- [CHAR LIMIT=30] Location detail panel, device only location mode -->
    <string name="quick_settings_location_detail_mode_sensors_only_title">Device only</string>
    <!-- [CHAR LIMIT=130] Location detail panel, description for high accuracy mode -->
    <string name="quick_settings_location_detail_mode_high_accuracy_description">Use GPS, Wi\u2011Fi, and cellular networks to determine location </string>
    <!-- [CHAR LIMIT=130] Location detail panel, description for battery saving mode -->
    <string name="quick_settings_location_detail_mode_battery_saving_description">Use Wi\u2011Fi and cellular networks to determine location</string>
    <!-- [CHAR LIMIT=130] Location detail panel, description for sensors only mode -->
    <string name="quick_settings_location_detail_mode_sensors_only_description">Use GPS to determine your location</string>

    <string name="quick_settings_nfc">NFC</string>
    <string name="quick_settings_nfc_off">NFC off</string>
    <string name="quick_settings_profile_detail_menu_title">Select Profile:</string>
    <string name="quick_settings_profiles_title">System profiles</string>
    <string name="quick_settings_nfc_label">NFC</string>
    <string name="quick_settings_profiles_detail_title">System profiles</string>
    <string name="quick_settings_profiles_disabled">Profiles disabled</string>
    <string name="quick_settings_compass_label">Compass</string>
    <string name="quick_settings_compass_value" translatable="false"><xliff:g id="degrees">%1$.0f</xliff:g>\u00b0 <xliff:g id="direction">%2$s</xliff:g></string>
    <string name="quick_settings_compass_off">Compass off</string>
    <string name="quick_settings_compass_init">Initializing\u2026</string>
    <string name="quick_settings_lockscreen">Lock screen</string>
    <string name="quick_settings_lockscreen_label">Lock screen</string>
    <string name="quick_settings_network_adb_label">ADB over network</string>

    <!-- Task Manager -->
    <string name="tasklistview_title">Task Manager</string>
@@ -107,8 +86,4 @@

    <string name="left_shortcut_hint">Swipe right for %1$s</string>
    <string name="right_shortcut_hint">Swipe left for %1$s</string>

    <string name="quick_settings_network_adb_enabled_label">Enabled</string>
    <string name="quick_settings_network_adb_disabled_label">Disabled</string>

</resources>
+5 −6
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The CyanogenMod Open Source Project
 * Copyright (C) 2015 The CyanogenMod Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -59,7 +59,6 @@ public class AdbOverNetworkTile extends QSTile<QSTile.BooleanState> {
            return;
        }
        state.value = isAdbNetworkEnabled();
        state.iconId = R.drawable.ic_qs_flashlight_on;
        if (state.value) {
            WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
            WifiInfo wifiInfo = wifiManager.getConnectionInfo();
@@ -69,13 +68,13 @@ public class AdbOverNetworkTile extends QSTile<QSTile.BooleanState> {
                InetAddress address = NetworkUtils.intToInetAddress(wifiInfo.getIpAddress());
                state.label = address.getHostAddress();
            } else {
                //if wifiInfo is null, set the enabled label without host address
                state.label = mContext.getString(R.string.quick_settings_network_adb_enabled_label);
                // if wifiInfo is null, set the label without host address
                state.label = mContext.getString(R.string.quick_settings_network_adb_label);
            }
            state.iconId = R.drawable.ic_qs_network_adb_on;
        } else {
            // Otherwise set the disabled label and icon
            state.label = mContext.getString(R.string.quick_settings_network_adb_disabled_label);
            // Otherwise set the label and disabled icon
            state.label = mContext.getString(R.string.quick_settings_network_adb_label);
            state.iconId = R.drawable.ic_qs_network_adb_off;
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ public class CompassTile extends QSTile<QSTile.BooleanState> implements SensorEv
            }
        } else {
            state.iconId = R.drawable.ic_qs_compass_off;
            state.label = mContext.getString(R.string.quick_settings_compass_off);
            state.label = mContext.getString(R.string.quick_settings_compass_label);
            mImage.setRotation(0);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ public class LockscreenToggleTile extends QSTile<QSTile.BooleanState>
                && mKeyguard.isShowing() && mKeyguard.isSecure();

        state.visible = mKeyguardBound && !hideTile;
        state.label = mContext.getString(R.string.quick_settings_lockscreen);
        state.label = mContext.getString(R.string.quick_settings_lockscreen_label);
        state.iconId = mKeyguardBound && mLockscreenDisabled
                ? R.drawable.ic_qs_lock_screen_off
                : R.drawable.ic_qs_lock_screen_on;
Loading