diff options
author | dh-harald <github@criminal.hu> | 2013-04-07 21:23:16 +0200 |
---|---|---|
committer | dh-harald <github@criminal.hu> | 2013-04-14 23:25:04 +0200 |
commit | 90f2ec1cad434ff6ab6b8e92c18ff5efbf9be6d8 (patch) | |
tree | 189fd201596168a696d19cc92efe5e1b40d36dce /src/com/android/settings/cyanogenmod/SystemSettings.java | |
parent | af3f79a1f89c07d5629929eee0ec5dcc3f52ebda (diff) | |
download | packages_apps_settings-90f2ec1cad434ff6ab6b8e92c18ff5efbf9be6d8.zip packages_apps_settings-90f2ec1cad434ff6ab6b8e92c18ff5efbf9be6d8.tar.gz packages_apps_settings-90f2ec1cad434ff6ab6b8e92c18ff5efbf9be6d8.tar.bz2 |
Fix: Don't display the lock clock preference if its not installed
Removed duplicated codes
Change-Id: Ib7d54dfc33c6a66711799bbdf44212d287221ae9
Diffstat (limited to 'src/com/android/settings/cyanogenmod/SystemSettings.java')
-rw-r--r-- | src/com/android/settings/cyanogenmod/SystemSettings.java | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/com/android/settings/cyanogenmod/SystemSettings.java b/src/com/android/settings/cyanogenmod/SystemSettings.java index cbf88f1..0b0d29c 100644 --- a/src/com/android/settings/cyanogenmod/SystemSettings.java +++ b/src/com/android/settings/cyanogenmod/SystemSettings.java @@ -18,7 +18,6 @@ package com.android.settings.cyanogenmod; import android.content.ContentResolver; import android.content.Context; -import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Resources; import android.os.Bundle; import android.os.RemoteException; @@ -36,9 +35,6 @@ import android.view.WindowManagerGlobal; import com.android.settings.R; import com.android.settings.SettingsPreferenceFragment; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - public class SystemSettings extends SettingsPreferenceFragment implements Preference.OnPreferenceChangeListener { private static final String TAG = "SystemSettings"; @@ -235,24 +231,6 @@ public class SystemSettings extends SettingsPreferenceFragment implements } } - private boolean removePreferenceIfPackageNotInstalled(Preference preference) { - String intentUri = ((PreferenceScreen) preference).getIntent().toUri(1); - Pattern pattern = Pattern.compile("component=([^/]+)/"); - Matcher matcher = pattern.matcher(intentUri); - - String packageName = matcher.find() ? matcher.group(1) : null; - if (packageName != null) { - try { - getPackageManager().getPackageInfo(packageName, 0); - } catch (NameNotFoundException e) { - Log.e(TAG, "package " + packageName + " not installed, hiding preference."); - getPreferenceScreen().removePreference(preference); - return true; - } - } - return false; - } - private void updateExpandedDesktop(int value) { ContentResolver cr = getContentResolver(); Resources res = getResources(); |