summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--proguard.flags1
-rw-r--r--res/drawable/ic_settings_extdesk_hidenavbar.xml27
-rw-r--r--res/values/cm_arrays.xml61
-rw-r--r--res/values/cm_strings.xml34
-rw-r--r--res/xml/dashboard_categories.xml8
-rw-r--r--res/xml/status_bar_settings.xml60
-rw-r--r--src/com/android/settings/cyanogenmod/StatusBarSettings.java192
7 files changed, 0 insertions, 383 deletions
diff --git a/proguard.flags b/proguard.flags
index 991c31c..578ff4d 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -16,7 +16,6 @@
-keep class com.android.settings.users.*
-keep class com.android.settings.nfc.*
-keep class com.android.settings.notification.*
--keep class com.android.settings.cyanogenmod.*
# Keep click responders
-keepclassmembers class com.android.settings.inputmethod.UserDictionaryAddWordActivity {
diff --git a/res/drawable/ic_settings_extdesk_hidenavbar.xml b/res/drawable/ic_settings_extdesk_hidenavbar.xml
deleted file mode 100644
index 8f83ff0..0000000
--- a/res/drawable/ic_settings_extdesk_hidenavbar.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2012-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.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
-
- <path
- android:fillColor="#039588"
- android:pathData="M18,20H6V8h12V20Z
-M18,2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2L18,2z" />
-</vector> \ No newline at end of file
diff --git a/res/values/cm_arrays.xml b/res/values/cm_arrays.xml
index a558cb8..c4df71e 100644
--- a/res/values/cm_arrays.xml
+++ b/res/values/cm_arrays.xml
@@ -208,65 +208,4 @@
<item>2500</item>
<item>5000</item>
</string-array>
-
- <string-array name="status_bar_clock_style_entries" translatable="false">
- <item>@string/status_bar_clock_style_right</item>
- <item>@string/status_bar_clock_style_center</item>
- <item>@string/status_bar_clock_style_left</item>
- <item>@string/status_bar_clock_style_hidden</item>
- </string-array>
-
- <string-array name="status_bar_clock_style_entries_rtl" translatable="false">
- <item>@string/status_bar_clock_style_left</item>
- <item>@string/status_bar_clock_style_center</item>
- <item>@string/status_bar_clock_style_right</item>
- <item>@string/status_bar_clock_style_hidden</item>
- </string-array>
-
- <string-array name="status_bar_clock_style_values" translatable="false">
- <item>1</item>
- <item>2</item>
- <item>3</item>
- <item>0</item>
- </string-array>
-
- <string-array name="status_bar_am_pm_entries" translatable="false">
- <item>@string/status_bar_am_pm_normal</item>
- <item>@string/status_bar_am_pm_small</item>
- <item>@string/status_bar_am_pm_hidden</item>
- </string-array>
-
- <string-array name="status_bar_am_pm_values" translatable="false">
- <item>0</item>
- <item>1</item>
- <item>2</item>
- </string-array>
-
- <string-array name="status_bar_battery_style_entries" translatable="false">
- <item>@string/status_bar_battery_style_icon_portrait</item>
- <item>@string/status_bar_battery_style_icon_landscape</item>
- <item>@string/status_bar_battery_style_circle</item>
- <item>@string/status_bar_battery_style_text</item>
- <item>@string/status_bar_battery_style_hidden</item>
- </string-array>
-
- <string-array name="status_bar_battery_style_values" translatable="false">
- <item>0</item>
- <item>5</item>
- <item>2</item>
- <item>6</item>
- <item>4</item>
- </string-array>
-
- <string-array name="status_bar_battery_percentage_entries" translatable="false">
- <item>@string/status_bar_battery_percentage_default</item>
- <item>@string/status_bar_battery_percentage_text_inside</item>
- <item>@string/status_bar_battery_percentage_text_next</item>
- </string-array>
-
- <string-array name="status_bar_battery_percentage_values" translatable="false">
- <item>0</item>
- <item>1</item>
- <item>2</item>
- </string-array>
</resources>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index 0f69af7..140d14d 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -310,38 +310,4 @@
<string name="unlock_scramble_pin_layout_title">Scramble layout</string>
<string name="unlock_scramble_pin_layout_summary">Scramble PIN layout when unlocking device</string>
-
- <!-- Status bar -->
- <string name="status_bar_title">Status bar</string>
- <string name="status_bar_toggle_brightness">Brightness control</string>
- <string name="status_bar_toggle_brightness_summary">Adjust brightness by sliding across the status bar</string>
- <string name="status_bar_notif_count_title">Show notification count</string>
- <string name="status_bar_notif_count_summary">Display the number of pending notifications</string>
-
- <!-- Status bar - Clock -->
- <string name="status_bar_clock_style_title">Clock style</string>
- <string name="status_bar_clock_style_right">Right</string>
- <string name="status_bar_clock_style_left">Left</string>
- <string name="status_bar_clock_style_center">Center</string>
- <string name="status_bar_clock_style_hidden">Hidden</string>
-
- <string name="status_bar_am_pm_title">AM/PM style</string>
- <string name="status_bar_am_pm_info">24-hour clock is enabled</string>
- <string name="status_bar_am_pm_normal">Normal</string>
- <string name="status_bar_am_pm_small">Small</string>
- <string name="status_bar_am_pm_hidden">Hidden (default)</string>
-
- <!-- Status bar - Battery -->
- <string name="status_bar_battery_style_title">Battery status style</string>
- <string name="status_bar_battery_style_icon_portrait">Icon portrait</string>
- <string name="status_bar_battery_style_icon_landscape">Icon landscape</string>
- <string name="status_bar_battery_style_circle">Circle</string>
- <string name="status_bar_battery_style_text">Text</string>
- <string name="status_bar_battery_style_hidden">Hidden</string>
-
- <!-- Status bar - Battery percentage -->
- <string name="status_bar_battery_percentage_title">Battery percentage</string>
- <string name="status_bar_battery_percentage_default">Hidden</string>
- <string name="status_bar_battery_percentage_text_inside">Inside the icon</string>
- <string name="status_bar_battery_percentage_text_next">Next to the icon</string>
</resources>
diff --git a/res/xml/dashboard_categories.xml b/res/xml/dashboard_categories.xml
index 1d9c9bd..0df4931 100644
--- a/res/xml/dashboard_categories.xml
+++ b/res/xml/dashboard_categories.xml
@@ -185,14 +185,6 @@
android:icon="@drawable/ic_settings_profiles"
/>
- <!-- Status bar -->
- <dashboard-tile
- android:id="@+id/status_bar_settings"
- android:title="@string/status_bar_title"
- android:fragment="com.android.settings.cyanogenmod.StatusBarSettings"
- android:icon="@drawable/ic_settings_extdesk_hidenavbar"
- />
-
<!-- Location -->
<dashboard-tile
android:id="@+id/location_settings"
diff --git a/res/xml/status_bar_settings.xml b/res/xml/status_bar_settings.xml
deleted file mode 100644
index 3836732..0000000
--- a/res/xml/status_bar_settings.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2014-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.
--->
-<PreferenceScreen
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:title="@string/status_bar_title">
-
- <ListPreference
- android:key="status_bar_clock"
- android:title="@string/status_bar_clock_style_title"
- android:dialogTitle="@string/status_bar_clock_style_title"
- android:entries="@array/status_bar_clock_style_entries"
- android:entryValues="@array/status_bar_clock_style_values" />
-
- <ListPreference
- android:key="status_bar_am_pm"
- android:title="@string/status_bar_am_pm_title"
- android:dialogTitle="@string/status_bar_am_pm_title"
- android:entries="@array/status_bar_am_pm_entries"
- android:entryValues="@array/status_bar_am_pm_values" />
-
- <ListPreference
- android:key="status_bar_battery_style"
- android:title="@string/status_bar_battery_style_title"
- android:dialogTitle="@string/status_bar_battery_style_title"
- android:entries="@array/status_bar_battery_style_entries"
- android:entryValues="@array/status_bar_battery_style_values" />
-
- <ListPreference
- android:key="status_bar_show_battery_percent"
- android:title="@string/status_bar_battery_percentage_title"
- android:dialogTitle="@string/status_bar_battery_percentage_title"
- android:entries="@array/status_bar_battery_percentage_entries"
- android:entryValues="@array/status_bar_battery_percentage_values" />
-
- <com.android.settings.cyanogenmod.SystemSettingSwitchPreference
- android:key="status_bar_brightness_control"
- android:title="@string/status_bar_toggle_brightness"
- android:summary="@string/status_bar_toggle_brightness_summary"
- android:defaultValue="false" />
-
- <com.android.settings.cyanogenmod.SystemSettingSwitchPreference
- android:key="status_bar_notif_count"
- android:title="@string/status_bar_notif_count_title"
- android:summary="@string/status_bar_notif_count_summary"
- android:defaultValue="false" />
-</PreferenceScreen>
diff --git a/src/com/android/settings/cyanogenmod/StatusBarSettings.java b/src/com/android/settings/cyanogenmod/StatusBarSettings.java
deleted file mode 100644
index a2762f4..0000000
--- a/src/com/android/settings/cyanogenmod/StatusBarSettings.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2014-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.
- */
-package com.android.settings.cyanogenmod;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.Configuration;
-import android.os.Bundle;
-import android.preference.ListPreference;
-import android.preference.Preference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.provider.SearchIndexableResource;
-import android.provider.Settings;
-import android.telephony.TelephonyManager;
-import android.text.format.DateFormat;
-import android.view.View;
-
-import com.android.internal.logging.MetricsLogger;
-import com.android.settings.R;
-import com.android.settings.SettingsPreferenceFragment;
-import com.android.settings.Utils;
-import com.android.settings.search.BaseSearchIndexProvider;
-import com.android.settings.search.Indexable;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import cyanogenmod.providers.CMSettings;
-
-public class StatusBarSettings extends SettingsPreferenceFragment
- implements OnPreferenceChangeListener, Indexable {
-
- private static final String TAG = "StatusBar";
-
- private static final String STATUS_BAR_CLOCK_STYLE = "status_bar_clock";
- private static final String STATUS_BAR_AM_PM = "status_bar_am_pm";
- private static final String STATUS_BAR_BATTERY_STYLE = "status_bar_battery_style";
- private static final String STATUS_BAR_SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent";
-
- private static final int STATUS_BAR_BATTERY_STYLE_HIDDEN = 4;
- private static final int STATUS_BAR_BATTERY_STYLE_TEXT = 6;
-
- private ListPreference mStatusBarClock;
- private ListPreference mStatusBarAmPm;
- private ListPreference mStatusBarBattery;
- private ListPreference mStatusBarBatteryShowPercent;
-
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- addPreferencesFromResource(R.xml.status_bar_settings);
-
- ContentResolver resolver = getActivity().getContentResolver();
-
- mStatusBarClock = (ListPreference) findPreference(STATUS_BAR_CLOCK_STYLE);
- mStatusBarAmPm = (ListPreference) findPreference(STATUS_BAR_AM_PM);
- mStatusBarBattery = (ListPreference) findPreference(STATUS_BAR_BATTERY_STYLE);
- mStatusBarBatteryShowPercent =
- (ListPreference) findPreference(STATUS_BAR_SHOW_BATTERY_PERCENT);
-
- int clockStyle = CMSettings.System.getInt(resolver,
- CMSettings.System.STATUS_BAR_CLOCK, 1);
- mStatusBarClock.setValue(String.valueOf(clockStyle));
- mStatusBarClock.setSummary(mStatusBarClock.getEntry());
- mStatusBarClock.setOnPreferenceChangeListener(this);
-
- if (DateFormat.is24HourFormat(getActivity())) {
- mStatusBarAmPm.setEnabled(false);
- mStatusBarAmPm.setSummary(R.string.status_bar_am_pm_info);
- } else {
- int statusBarAmPm = CMSettings.System.getInt(resolver,
- CMSettings.System.STATUS_BAR_AM_PM, 2);
- mStatusBarAmPm.setValue(String.valueOf(statusBarAmPm));
- mStatusBarAmPm.setSummary(mStatusBarAmPm.getEntry());
- mStatusBarAmPm.setOnPreferenceChangeListener(this);
- }
-
- int batteryStyle = CMSettings.System.getInt(resolver,
- CMSettings.System.STATUS_BAR_BATTERY_STYLE, 0);
- mStatusBarBattery.setValue(String.valueOf(batteryStyle));
- mStatusBarBattery.setSummary(mStatusBarBattery.getEntry());
- mStatusBarBattery.setOnPreferenceChangeListener(this);
-
- int batteryShowPercent = CMSettings.System.getInt(resolver,
- CMSettings.System.STATUS_BAR_SHOW_BATTERY_PERCENT, 0);
- mStatusBarBatteryShowPercent.setValue(String.valueOf(batteryShowPercent));
- mStatusBarBatteryShowPercent.setSummary(mStatusBarBatteryShowPercent.getEntry());
- enableStatusBarBatteryDependents(batteryStyle);
- mStatusBarBatteryShowPercent.setOnPreferenceChangeListener(this);
- }
-
- @Override
- protected int getMetricsCategory() {
- // todo add a constant in MetricsLogger.java
- return MetricsLogger.MAIN_SETTINGS;
- }
-
- @Override
- public void onResume() {
- super.onResume();
- // Adjust clock position for RTL if necessary
- Configuration config = getResources().getConfiguration();
- if (config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
- mStatusBarClock.setEntries(getActivity().getResources().getStringArray(
- R.array.status_bar_clock_style_entries_rtl));
- mStatusBarClock.setSummary(mStatusBarClock.getEntry());
- }
- }
-
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- ContentResolver resolver = getActivity().getContentResolver();
- if (preference == mStatusBarClock) {
- int clockStyle = Integer.parseInt((String) newValue);
- int index = mStatusBarClock.findIndexOfValue((String) newValue);
- CMSettings.System.putInt(
- resolver, CMSettings.System.STATUS_BAR_CLOCK, clockStyle);
- mStatusBarClock.setSummary(mStatusBarClock.getEntries()[index]);
- return true;
- } else if (preference == mStatusBarAmPm) {
- int statusBarAmPm = Integer.valueOf((String) newValue);
- int index = mStatusBarAmPm.findIndexOfValue((String) newValue);
- CMSettings.System.putInt(
- resolver, CMSettings.System.STATUS_BAR_AM_PM, statusBarAmPm);
- mStatusBarAmPm.setSummary(mStatusBarAmPm.getEntries()[index]);
- return true;
- } else if (preference == mStatusBarBattery) {
- int batteryStyle = Integer.valueOf((String) newValue);
- int index = mStatusBarBattery.findIndexOfValue((String) newValue);
- CMSettings.System.putInt(
- resolver, CMSettings.System.STATUS_BAR_BATTERY_STYLE, batteryStyle);
- mStatusBarBattery.setSummary(mStatusBarBattery.getEntries()[index]);
- enableStatusBarBatteryDependents(batteryStyle);
- return true;
- } else if (preference == mStatusBarBatteryShowPercent) {
- int batteryShowPercent = Integer.valueOf((String) newValue);
- int index = mStatusBarBatteryShowPercent.findIndexOfValue((String) newValue);
- CMSettings.System.putInt(
- resolver, CMSettings.System.STATUS_BAR_SHOW_BATTERY_PERCENT, batteryShowPercent);
- mStatusBarBatteryShowPercent.setSummary(
- mStatusBarBatteryShowPercent.getEntries()[index]);
- return true;
- }
- return false;
- }
-
- private void enableStatusBarBatteryDependents(int batteryIconStyle) {
- if (batteryIconStyle == STATUS_BAR_BATTERY_STYLE_HIDDEN ||
- batteryIconStyle == STATUS_BAR_BATTERY_STYLE_TEXT) {
- mStatusBarBatteryShowPercent.setEnabled(false);
- } else {
- mStatusBarBatteryShowPercent.setEnabled(true);
- }
- }
-
- public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
- new BaseSearchIndexProvider() {
- @Override
- public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
- boolean enabled) {
- ArrayList<SearchIndexableResource> result =
- new ArrayList<SearchIndexableResource>();
-
- SearchIndexableResource sir = new SearchIndexableResource(context);
- sir.xmlResId = R.xml.status_bar_settings;
- result.add(sir);
-
- return result;
- }
-
- @Override
- public List<String> getNonIndexableKeys(Context context) {
- ArrayList<String> result = new ArrayList<String>();
- return result;
- }
- };
-}