diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2015-01-12 11:44:32 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-01-15 05:00:46 -0800 |
commit | 787a6bb1167be8a58ccf3badce8fbf5d1163e1cc (patch) | |
tree | 3a97c060b3cb40fb478205131d8c1cd35bd7ac11 /src/org | |
parent | c300a39b471a09670f4e3c738b5a7eb7a37c3ac1 (diff) | |
download | android_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-x | src/org/codeaurora/gallery3d/video/SettingsActivity.java | 11 |
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; |