summaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2015-01-12 11:44:32 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-01-15 05:00:46 -0800
commit787a6bb1167be8a58ccf3badce8fbf5d1163e1cc (patch)
tree3a97c060b3cb40fb478205131d8c1cd35bd7ac11 /src/org
parentc300a39b471a09670f4e3c738b5a7eb7a37c3ac1 (diff)
downloadandroid_packages_apps_Gallery2-787a6bb1167be8a58ccf3badce8fbf5d1163e1cc.tar.gz
android_packages_apps_Gallery2-787a6bb1167be8a58ccf3badce8fbf5d1163e1cc.tar.bz2
android_packages_apps_Gallery2-787a6bb1167be8a58ccf3badce8fbf5d1163e1cc.zip
Gallery2: Set APN setting intent's name
The APN setting activity's name is changed, so there will be no result after tap prefered APN. Start intent with ACTION_APN_SETTINGS from settings. CRs-Fixed: 777155 Change-Id: Ibb560612ad5a6748c13319ed9436ad473759e3c1
Diffstat (limited to 'src/org')
-rwxr-xr-xsrc/org/codeaurora/gallery3d/video/SettingsActivity.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/org/codeaurora/gallery3d/video/SettingsActivity.java b/src/org/codeaurora/gallery3d/video/SettingsActivity.java
index e2a60d49c..3d7fac573 100755
--- a/src/org/codeaurora/gallery3d/video/SettingsActivity.java
+++ b/src/org/codeaurora/gallery3d/video/SettingsActivity.java
@@ -286,22 +286,19 @@ public class SettingsActivity extends PreferenceActivity {
}
private void setApnListener() {
- final String CLASS_NAME = "com.android.settings.ApnSettings";
final String SUBSCRIPTION_KEY = "subscription";
-
mApn.setSummary(getDefaultApnName());
mApn.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
public boolean onPreferenceClick(Preference preference) {
- Intent intent = new Intent();
- intent.setClassName(PACKAGE_NAME, CLASS_NAME);
-
+ Intent intent = new Intent(Settings.ACTION_APN_SETTINGS);
int subscription = 0;
try {
subscription = Settings.Global.getInt(SettingsActivity.this.getContentResolver(),
Settings.Global.MULTI_SIM_DATA_CALL_SUBSCRIPTION);
- intent.putExtra(SUBSCRIPTION_KEY, subscription);
} catch (Exception e) {
- Log.d("SettingActivity", "Can't get subscription for Exception" + e);
+ Log.d("SettingActivity", "Can't get subscription for Exception: " + e);
+ } finally {
+ intent.putExtra(SUBSCRIPTION_KEY, subscription);
}
startActivityForResult(intent, SELECT_APN);
return true;