summaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-10-09 11:10:03 +0800
committerkaiyiz <kaiyiz@codeaurora.org>2014-11-11 15:59:49 +0800
commit941211349392d6a9f2dd14efbb63ba138d7ab91a (patch)
tree362467fbbe84eec1860baa39e9a503a235df7868 /src/org
parentdf2a284b84ac35837d2b1c5c466b3eef6b7f08e7 (diff)
downloadandroid_packages_apps_Gallery2-941211349392d6a9f2dd14efbb63ba138d7ab91a.tar.gz
android_packages_apps_Gallery2-941211349392d6a9f2dd14efbb63ba138d7ab91a.tar.bz2
android_packages_apps_Gallery2-941211349392d6a9f2dd14efbb63ba138d7ab91a.zip
Gallery2: Sign SIM card number for Mobile Data to Setting
When choose prefered APN in Streaming Settings, there is no default SIM card number for mobile data, so the reset function is not available. In the intent for APN setting, add the SIM card number for default set. CRs-Fixed: 731357 Change-Id: I30e9e361af504be851adef0537d7512150338783
Diffstat (limited to 'src/org')
-rwxr-xr-xsrc/org/codeaurora/gallery3d/video/SettingsActivity.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/org/codeaurora/gallery3d/video/SettingsActivity.java b/src/org/codeaurora/gallery3d/video/SettingsActivity.java
index 87a74ba8b..e2a60d49c 100755
--- a/src/org/codeaurora/gallery3d/video/SettingsActivity.java
+++ b/src/org/codeaurora/gallery3d/video/SettingsActivity.java
@@ -19,6 +19,7 @@ import android.preference.PreferenceCategory;
import android.preference.RingtonePreference;
import android.preference.PreferenceScreen;
import android.provider.ContactsContract;
+import android.provider.Settings;
import android.provider.Settings.System;
import android.provider.Telephony;
import android.telephony.TelephonyManager;
@@ -285,11 +286,23 @@ public class SettingsActivity extends PreferenceActivity {
}
private void setApnListener() {
- final String ACTION_NAME = "android.settings.APN_SETTINGS";
+ 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(ACTION_NAME);
+ Intent intent = new Intent();
+ intent.setClassName(PACKAGE_NAME, CLASS_NAME);
+
+ 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);
+ }
startActivityForResult(intent, SELECT_APN);
return true;
}