From b403ab69df89a17669fc5678248068dfbddd0733 Mon Sep 17 00:00:00 2001 From: elektroschmock Date: Sun, 28 Oct 2012 20:32:25 +0100 Subject: CrespoParts: Cleanup unused strings Patch set 1 - Removed unused strings Make deepidle stats dependent of deepidle activated in kernel Patch Set 2 - Reworked Idle Stats disabling. Justin White Patch set 3 - Fixed code style - removed tabs Change-Id: Ia489a657742227f32c82dfa74237229619782d53 --- CrespoParts/AndroidManifest.xml | 1 - CrespoParts/res/values-da/strings.xml | 4 -- CrespoParts/res/values-de/strings.xml | 6 +- CrespoParts/res/values-es/strings.xml | 4 -- CrespoParts/res/values-fr/strings.xml | 4 -- CrespoParts/res/values-ja/strings.xml | 4 -- CrespoParts/res/values-nl/strings.xml | 4 -- CrespoParts/res/values-pt-rPT/strings.xml | 4 -- CrespoParts/res/values-ru/strings.xml | 4 -- CrespoParts/res/values-tr/strings.xml | 4 -- CrespoParts/res/values-zh-rTW/strings.xml | 4 -- .../settings/device/GeneralFragmentActivity.java | 84 +++++++++++----------- 12 files changed, 46 insertions(+), 81 deletions(-) (limited to 'CrespoParts') diff --git a/CrespoParts/AndroidManifest.xml b/CrespoParts/AndroidManifest.xml index 12b1009..c0abbdf 100644 --- a/CrespoParts/AndroidManifest.xml +++ b/CrespoParts/AndroidManifest.xml @@ -25,7 +25,6 @@ - diff --git a/CrespoParts/res/values-da/strings.xml b/CrespoParts/res/values-da/strings.xml index a3c8b39..9244ed8 100644 --- a/CrespoParts/res/values-da/strings.xml +++ b/CrespoParts/res/values-da/strings.xml @@ -10,9 +10,5 @@ Blå Touch Knapper - Baggrundslys Timeout - Indstil forsinkelsen for hvornår touch knappernes lys skal slukkes - Blink Timeout - Indstil forsinkelsen for hvornår touch knappernes blink lys automatisk skal slukkes efter en notifikation diff --git a/CrespoParts/res/values-de/strings.xml b/CrespoParts/res/values-de/strings.xml index 77189bb..12e1a72 100644 --- a/CrespoParts/res/values-de/strings.xml +++ b/CrespoParts/res/values-de/strings.xml @@ -36,10 +36,12 @@ Dank an: ale.landra91 cpaixao provolinoo - Touch Keys + Sensortasten Hintergrundbeleuchtung Die Hintergrundbeleuchtung wird nach erhalten einer Nachricht aktiviert. - + Abschalten nach + Automatisches Abschalten + Zeit nach der die Hintergrundbeleuchtung abgeschaltet wird.\n(0 = kein automatisches Abschalten) Mobilfunk HSPA HSDPA/HSUPA aktivieren diff --git a/CrespoParts/res/values-es/strings.xml b/CrespoParts/res/values-es/strings.xml index d48f7c1..8ee0d3e 100644 --- a/CrespoParts/res/values-es/strings.xml +++ b/CrespoParts/res/values-es/strings.xml @@ -10,9 +10,5 @@ Azul Teclas - Tiempo de luz teclado - Adjusta el tiempo al que se desactiva la luz de las teclas con la pantalla encendida - Tiempo de parpadeo - Adjusta el tiempo al que deja de parpadear el teclado después de que llegue una notificación diff --git a/CrespoParts/res/values-fr/strings.xml b/CrespoParts/res/values-fr/strings.xml index 600aa8c..ca86fa0 100644 --- a/CrespoParts/res/values-fr/strings.xml +++ b/CrespoParts/res/values-fr/strings.xml @@ -10,10 +10,6 @@ Bleu Touches tactiles - Délai rétroéclairage - Régler le délai avant l\'extinction du rétroéclairage des touches tactiles - Délai clignotement - Régler le délai avant l\'arrêt du clignotement du rétroéclairage des touches tactiles après une notification diff --git a/CrespoParts/res/values-ja/strings.xml b/CrespoParts/res/values-ja/strings.xml index 37bafb8..6057b1c 100644 --- a/CrespoParts/res/values-ja/strings.xml +++ b/CrespoParts/res/values-ja/strings.xml @@ -12,10 +12,6 @@ タッチキー - バックライトのタイムアウト - タッチキーのバックライトが自動的にオフになるまでの遅延を調整する - 点滅のタイムアウト - タッチキーの点滅のバックライトが通知した後、自動的に消えるまでの遅延時間を調整する ラジオ HSPA diff --git a/CrespoParts/res/values-nl/strings.xml b/CrespoParts/res/values-nl/strings.xml index 6260c9a..f686065 100644 --- a/CrespoParts/res/values-nl/strings.xml +++ b/CrespoParts/res/values-nl/strings.xml @@ -10,9 +10,5 @@ Blauw Touch Keys - Backlight Timeout - Pas de vertraging aan voor het touch key-backlight uitgaat - Blink Timeout - Pas de vertraging aan voor het knipperend touch key-backlight uitgaat na een notificatie diff --git a/CrespoParts/res/values-pt-rPT/strings.xml b/CrespoParts/res/values-pt-rPT/strings.xml index 4431cca..3186c71 100644 --- a/CrespoParts/res/values-pt-rPT/strings.xml +++ b/CrespoParts/res/values-pt-rPT/strings.xml @@ -10,10 +10,6 @@ Azul Botões Capacitivos - Temporizador Luz de Fundo - Ajusta o tempo que as teclas capacitivas demoram a desligar a sua luz de fundo - Temporizador de Intermitência - Ajusta o tempo que as teclas demoram a desligar a retroiluminação intermitente após notificação. Radio HSPA diff --git a/CrespoParts/res/values-ru/strings.xml b/CrespoParts/res/values-ru/strings.xml index 2bcbe46..f303381 100644 --- a/CrespoParts/res/values-ru/strings.xml +++ b/CrespoParts/res/values-ru/strings.xml @@ -12,10 +12,6 @@ Синий Сенсорные кнопки - Таймаут подсветки - Как долго работает подсветка сенсорных кнопок - Таймаут мигания - Как долго будут мигать сенсорные кнопки после уведомления Радиомодуль HSPA diff --git a/CrespoParts/res/values-tr/strings.xml b/CrespoParts/res/values-tr/strings.xml index 8f1e947..485f433 100644 --- a/CrespoParts/res/values-tr/strings.xml +++ b/CrespoParts/res/values-tr/strings.xml @@ -11,9 +11,5 @@ Mavi Dokunmatik tuşlar - Arka ışık zaman aşımı - Dokunmatik tuşa ışığı otomatik kapanmadan önceki gecikmeyi ayarlayın - Yanıp sönme zaman aşımı - Bir bildirim sonrası dokunmatik tuşun yanıp söner arka ışığın otomatik kapanmadan önceki gecikmeyi ayarlayın. diff --git a/CrespoParts/res/values-zh-rTW/strings.xml b/CrespoParts/res/values-zh-rTW/strings.xml index 9f2ec87..2bea575 100644 --- a/CrespoParts/res/values-zh-rTW/strings.xml +++ b/CrespoParts/res/values-zh-rTW/strings.xml @@ -12,10 +12,6 @@ 觸控鍵 - 背光逾時 - 調整觸控鍵背光自動關閉前的延遲時間 - 閃爍逾時 - 調整觸控鍵閃爍通知自動關閉前的延遲時間 行動網路 HSPA diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java index d437997..613bc24 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java @@ -48,6 +48,7 @@ public class GeneralFragmentActivity extends PreferenceFragment implements OnPre private CheckBoxPreference mDeepIdle; private CheckBoxPreference mNotification; + private PreferenceScreen mIdleStats; private bldTuningPreference mbldTuning; @Override @@ -59,11 +60,14 @@ public class GeneralFragmentActivity extends PreferenceFragment implements OnPre PreferenceScreen prefSet = getPreferenceScreen(); mDeepIdle = (CheckBoxPreference) findPreference(DeviceSettings.KEY_DEEPIDLE); mNotification = (CheckBoxPreference) findPreference(DeviceSettings.KEY_NOTIFICATION); + mIdleStats = (PreferenceScreen) findPreference(DeviceSettings.KEY_DEEPIDLE_STATS); if (isSupported(CPU_DEEPIDLE_FILE)) { mDeepIdle.setChecked(PREF_ENABLED.equals(Utils.readOneLine(CPU_DEEPIDLE_FILE))); + mIdleStats.setOnPreferenceClickListener(this); } else { mDeepIdle.setEnabled(false); + mIdleStats.setEnabled(false); } if (isSupported(TOUCHKEY_NOTIFICATION_FILE)) { @@ -72,10 +76,6 @@ public class GeneralFragmentActivity extends PreferenceFragment implements OnPre mNotification.setEnabled(false); } - Preference p = findPreference(DeviceSettings.KEY_DEEPIDLE_STATS); - if(p != null) - p.setOnPreferenceClickListener(this); - mbldTuning = (bldTuningPreference) findPreference(DeviceSettings.KEY_BLD_TUNING); if(mbldTuning != null) mbldTuning.setEnabled(bldTuningPreference.isSupported()); @@ -120,45 +120,45 @@ public class GeneralFragmentActivity extends PreferenceFragment implements OnPre } } - private void showIdleStatsDialog() { - // display dialog - final View content = getActivity().getLayoutInflater().inflate(R.layout.idle_stats_dialog, null); + private void showIdleStatsDialog() { + // display dialog + final View content = getActivity().getLayoutInflater().inflate(R.layout.idle_stats_dialog, null); String sStatsLine = Utils.readOneLine(CPU_DEEPIDLE_STATS); String[] sValues = sStatsLine.split(" "); - ((TextView)content.findViewById(R.id.time1)).setText(sValues[0]); - ((TextView)content.findViewById(R.id.time2)).setText(sValues[2]); - ((TextView)content.findViewById(R.id.time3)).setText(sValues[4]); - ((TextView)content.findViewById(R.id.avg1)).setText(sValues[1]); - ((TextView)content.findViewById(R.id.avg2)).setText(sValues[3]); - ((TextView)content.findViewById(R.id.avg3)).setText(sValues[5]); - - AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); - builder.setTitle(getString(R.string.label_deepidle_stats)); - builder.setView(content); - builder.setPositiveButton(getString(R.string.label_reset), new OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - Utils.writeValue(CPU_DEEPIDLE_RESET, "1"); - dialog.dismiss(); - } - }); - builder.setNegativeButton(getString(R.string.label_close), new OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - } - }); - builder.show(); - } - - @Override - public boolean onPreferenceClick(Preference preference) { - boolean ret = false; - if(preference.getKey().equals(DeviceSettings.KEY_DEEPIDLE_STATS)) { - showIdleStatsDialog(); - ret = true; - } - return ret; - } + ((TextView)content.findViewById(R.id.time1)).setText(sValues[0]); + ((TextView)content.findViewById(R.id.time2)).setText(sValues[2]); + ((TextView)content.findViewById(R.id.time3)).setText(sValues[4]); + ((TextView)content.findViewById(R.id.avg1)).setText(sValues[1]); + ((TextView)content.findViewById(R.id.avg2)).setText(sValues[3]); + ((TextView)content.findViewById(R.id.avg3)).setText(sValues[5]); + + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder.setTitle(getString(R.string.label_deepidle_stats)); + builder.setView(content); + builder.setPositiveButton(getString(R.string.label_reset), new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + Utils.writeValue(CPU_DEEPIDLE_RESET, "1"); + dialog.dismiss(); + } + }); + builder.setNegativeButton(getString(R.string.label_close), new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + } + }); + builder.show(); + } + + @Override + public boolean onPreferenceClick(Preference preference) { + boolean ret = false; + if(preference.getKey().equals(DeviceSettings.KEY_DEEPIDLE_STATS)) { + showIdleStatsDialog(); + ret = true; + } + return ret; + } } -- cgit v1.1