summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-02-18 11:52:00 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-02-18 11:52:00 -0800
commitf114d9bba2a8bead30dcf4c82ca64b2e44136ba7 (patch)
tree911d9838a17a2cc8252be8a536f18d681837efb4 /src
parent5c52f3ce0640b13337b3715dd0f4f1debbc14e14 (diff)
parentb586c53059538ad9855856c41247a716188eb7c6 (diff)
downloadandroid_packages_apps_Gallery2-f114d9bba2a8bead30dcf4c82ca64b2e44136ba7.tar.gz
android_packages_apps_Gallery2-f114d9bba2a8bead30dcf4c82ca64b2e44136ba7.tar.bz2
android_packages_apps_Gallery2-f114d9bba2a8bead30dcf4c82ca64b2e44136ba7.zip
Merge "Gallery2: fix permission issue"
Diffstat (limited to 'src')
-rwxr-xr-xsrc/org/codeaurora/gallery3d/video/SettingsActivity.java64
1 files changed, 0 insertions, 64 deletions
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);