diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-02-18 11:52:00 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-02-18 11:52:00 -0800 |
| commit | f114d9bba2a8bead30dcf4c82ca64b2e44136ba7 (patch) | |
| tree | 911d9838a17a2cc8252be8a536f18d681837efb4 | |
| parent | 5c52f3ce0640b13337b3715dd0f4f1debbc14e14 (diff) | |
| parent | b586c53059538ad9855856c41247a716188eb7c6 (diff) | |
| download | android_packages_apps_Gallery2-f114d9bba2a8bead30dcf4c82ca64b2e44136ba7.tar.gz android_packages_apps_Gallery2-f114d9bba2a8bead30dcf4c82ca64b2e44136ba7.tar.bz2 android_packages_apps_Gallery2-f114d9bba2a8bead30dcf4c82ca64b2e44136ba7.zip | |
Merge "Gallery2: fix permission issue"
| -rw-r--r-- | Android.mk | 2 | ||||
| -rwxr-xr-x | src/org/codeaurora/gallery3d/video/SettingsActivity.java | 64 |
2 files changed, 0 insertions, 66 deletions
diff --git a/Android.mk b/Android.mk index 0363a5116..fe1c14f74 100644 --- a/Android.mk +++ b/Android.mk @@ -37,8 +37,6 @@ LOCAL_AAPT_FLAGS := --auto-add-overlay LOCAL_PACKAGE_NAME := Gallery2 -LOCAL_CERTIFICATE := platform - LOCAL_OVERRIDES_PACKAGES := Gallery Gallery3D GalleryNew3D LOCAL_PROGUARD_ENABLED := disabled diff --git a/src/org/codeaurora/gallery3d/video/SettingsActivity.java b/src/org/codeaurora/gallery3d/video/SettingsActivity.java index aca446bf3..262e761a6 100755 --- a/src/org/codeaurora/gallery3d/video/SettingsActivity.java +++ b/src/org/codeaurora/gallery3d/video/SettingsActivity.java @@ -2,7 +2,6 @@ package org.codeaurora.gallery3d.video; import android.app.ActionBar; import android.app.Activity; -import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; @@ -93,68 +92,6 @@ public class SettingsActivity extends PreferenceActivity { ab.setTitle(R.string.setting); } - private String getApnKey() { - // to find default key - String key = null; - Cursor cursor = getContentResolver().query(PREFERAPN_URI, new String[] { - "_id" - }, null, null, Telephony.Carriers.DEFAULT_SORT_ORDER); - if (cursor.getCount() > 0 && cursor.moveToFirst()) { - key = cursor.getString(COLUMN_ID_INDEX); - Log.v("settingActivty", "default apn key = " + key); - } - cursor.close(); - return key; - } - - private String getApnName(String key) { - String name = null; - // to find default proxy - String where = getOperatorNumericSelection(); - - Cursor cursor = getContentResolver().query(Telephony.Carriers.CONTENT_URI, new String[] { - "_id", "name", "apn", "type" - }, where, null, Telephony.Carriers.DEFAULT_SORT_ORDER); - - while (cursor != null && cursor.moveToNext()) { - String curKey = cursor.getString(cursor.getColumnIndex("_id")); - String curName = cursor.getString(cursor.getColumnIndex("name")); - if (curKey.equals(key)) { - Log.d("rtsp", "getDefaultApnName, find, key=" + curKey + ",curName=" + curName); - name = curName; - break; - } - } - - if (cursor != null) { - cursor.close(); - } - return name; - - } - - private String getDefaultApnName() { - return getApnName(getApnKey()); - } - - private String getSelectedApnKey() { - String key = null; - - Cursor cursor = getContentResolver().query(PREFERAPN_URI, new String[] { - "_id", "name" - }, null, null, null); - if (cursor.getCount() > 0) { - cursor.moveToFirst(); - key = cursor.getString(NAME_INDEX); - } - cursor.close(); - - Log.w("rtsp", "getSelectedApnKey key = " + key); - if (null == key) - return new String("null"); - return key; - } - @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == SELECT_APN) { @@ -288,7 +225,6 @@ public class SettingsActivity extends PreferenceActivity { private void setApnListener() { final String SUBSCRIPTION_KEY = "subscription"; final String SUB_ID = "sub_id"; - mApn.setSummary(getDefaultApnName()); mApn.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { public boolean onPreferenceClick(Preference preference) { Intent intent = new Intent(Settings.ACTION_APN_SETTINGS); |
