From 39f40c7687c9eeba56e60250366b4bd383e53a26 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Thu, 30 Jan 2014 13:14:02 -0800 Subject: [PATCH 1/8] packages/apps/Settings: Rename persist.sys.dalvik.vm.lib to allow new default Bug: 12798969 Change-Id: I1937c2ff758214e1c9d369e475ae4efbba4f9dec --- src/com/android/settings/DevelopmentSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index f16a19bf861..f8b4fd3c168 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -95,7 +95,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment private static final String KEEP_SCREEN_ON = "keep_screen_on"; private static final String BT_HCI_SNOOP_LOG = "bt_hci_snoop_log"; private static final String SELECT_RUNTIME_KEY = "select_runtime"; - private static final String SELECT_RUNTIME_PROPERTY = "persist.sys.dalvik.vm.lib"; + private static final String SELECT_RUNTIME_PROPERTY = "persist.sys.dalvik.vm.lib.1"; private static final String ALLOW_MOCK_LOCATION = "allow_mock_location"; private static final String HDCP_CHECKING_KEY = "hdcp_checking"; private static final String HDCP_CHECKING_PROPERTY = "persist.sys.hdcp_checking"; From 6a2d0ca9f4a30b62f7551e70695dd648305c0778 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Tue, 4 Feb 2014 12:41:30 -0800 Subject: [PATCH 2/8] Fix bug #12890490 Crash in Settings observed after tap on Preferred Engine settings and Cloud print option - when setting the Fragment's title use the CharSequence when the titleRes ID is "0" Change-Id: I54e5379172632acfc967b5ea401ba90f73b41748 --- .../android/settings/SettingsActivity.java | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java index c3d067f7301..a362ee622f6 100644 --- a/src/com/android/settings/SettingsActivity.java +++ b/src/com/android/settings/SettingsActivity.java @@ -924,7 +924,7 @@ public class SettingsActivity extends Activity public void startPreferencePanel(String fragmentClass, Bundle args, int titleRes, CharSequence titleText, Fragment resultTo, int resultRequestCode) { - startWithFragment(fragmentClass, args, resultTo, resultRequestCode, titleRes, 0); + startWithFragment(fragmentClass, args, resultTo, resultRequestCode, titleRes, titleText); } /** @@ -965,16 +965,16 @@ public class SettingsActivity extends Activity * @param fragmentName The name of the fragment to display. * @param args Optional arguments to supply to the fragment. * @param resultTo Option fragment that should receive the result of - * the activity launch. - * @param resultRequestCode If resultTo is non-null, this is the request - * code in which to report the result. - * @param titleRes Resource ID of string to display for the title of - * this set of preferences. - * @param shortTitleRes Resource ID of string to display for the short title of - * this set of preferences. + * the activity launch. + * @param resultRequestCode If resultTo is non-null, this is the request code in which to + * report the result. + * @param titleRes Resource ID of string to display for the title of. If the Resource ID is a + * valid one then it will be used to get the title. Otherwise the titleText + * argument will be used as the title. + * @param titleText string to display for the title of. */ private void startWithFragment(String fragmentName, Bundle args, Fragment resultTo, - int resultRequestCode, int titleRes, int shortTitleRes) { + int resultRequestCode, int titleRes, CharSequence titleText) { Fragment f = Fragment.instantiate(this, fragmentName, args); if (resultTo != null) { f.setTargetFragment(resultTo, resultRequestCode); @@ -985,10 +985,17 @@ public class SettingsActivity extends Activity transaction.addToBackStack(BACK_STACK_PREFS); transaction.commitAllowingStateLoss(); - final CharSequence title = getText(titleRes); - final TitlePair pair = new TitlePair(titleRes, null); + final TitlePair pair; + final CharSequence cs; + if (titleRes != 0) { + pair = new TitlePair(titleRes, null); + cs = getText(titleRes); + } else { + pair = new TitlePair(0, titleText); + cs = titleText; + } + setTitle(cs); mTitleStack.add(pair); - setTitle(title); } /** @@ -1583,7 +1590,7 @@ public class SettingsActivity extends Activity /** * Called when the user selects an item in the header list. The default * implementation will call either - * {@link #startWithFragment(String, Bundle, Fragment, int, int, int)} + * {@link #startWithFragment(String, android.os.Bundle, android.app.Fragment, int, int, CharSequence)} * or {@link #switchToHeader(com.android.settings.SettingsActivity.Header, boolean)} * as appropriate. * From 3513cda38c613a22192a6f6a5800b18fe4df13c3 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Tue, 4 Feb 2014 14:01:39 -0800 Subject: [PATCH 3/8] Fix bug #12890909 Tablets: Settings crashes when tapped on Add Account option in settings - remove android:theme="@android:style/Theme.Holo.DialogWhenLarge" for com.android.settings.Settings$ChooseAccountActivity Change-Id: Ife94e93e057029a71fe4a276f7ef9b98c9561b87 --- AndroidManifest.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ec01534e3d8..6ba9a94fb46 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1538,8 +1538,7 @@ + android:configChanges="orientation|keyboardHidden|screenSize"> From b608b8a4344fcf5b6de40b87c61a9ca0e6e2bf0f Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Tue, 4 Feb 2014 14:20:28 -0800 Subject: [PATCH 4/8] Fix bug #12895706 BT settings crash with java.lang.ClassCastException: com.android.settings.Settings cannot be cast to android.preference.PreferenceActivity - remove the PreferenceActivity related code as we are no more using PreferenceActivity (and Settings is a derive of SettingsActivity) Change-Id: I3c650c03cd205d9c06679974ae4d832ced25459b --- .../settings/bluetooth/LocalDeviceProfilesSettings.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java b/src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java index f01bbf5eca9..8d7100745fc 100644 --- a/src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java +++ b/src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java @@ -19,7 +19,6 @@ package com.android.settings.bluetooth; import android.os.Bundle; import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; -import android.preference.PreferenceActivity; import android.preference.PreferenceScreen; import com.android.settings.R; @@ -73,8 +72,6 @@ public final class LocalDeviceProfilesSettings extends SettingsPreferenceFragmen // preference can be updated when the timeout changes. mDiscoverableEnabler.setVisibilityPreference(mVisibilityPref); - PreferenceActivity mActivity = (PreferenceActivity)getActivity(); - mActivity.showBreadCrumbs(mManager.getBluetoothAdapter().getName(), ""); PreferenceScreen bluetoothBroadcast = (PreferenceScreen)findPreference(KEY_BROADCASTING); mAdvertisingEnabler = new BluetoothAdvertisingEnabler(getActivity(), bluetoothBroadcast); mManager.setBluetoothAdvertisingEnabler(mAdvertisingEnabler); From 49d98bb566100ef480d4e1228f87319f5bfd5ff3 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Wed, 5 Feb 2014 12:53:04 -0800 Subject: [PATCH 5/8] Fix bug #12903673 Stability: 47 ANRs in com.android.settings - fix the recursive call (probably introduced by some search/replace) Change-Id: I563a68c2cc141a59ef8bb9dd64cd67a62dbfcd4a --- src/com/android/settings/accounts/SyncSettingsActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/accounts/SyncSettingsActivity.java b/src/com/android/settings/accounts/SyncSettingsActivity.java index bbd9f919081..9b1bc32e760 100644 --- a/src/com/android/settings/accounts/SyncSettingsActivity.java +++ b/src/com/android/settings/accounts/SyncSettingsActivity.java @@ -27,7 +27,7 @@ import com.android.settings.SettingsActivity; public class SyncSettingsActivity extends SettingsActivity { @Override public Intent getIntent() { - Intent modIntent = new Intent(getIntent()); + Intent modIntent = new Intent(super.getIntent()); modIntent.putExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT, SyncSettings.class.getName()); modIntent.putExtra(SettingsActivity.EXTRA_NO_HEADERS, true); return modIntent; From 6f77c70877bd13e32baecec03b7a469f491a3a6d Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Wed, 5 Feb 2014 15:13:46 -0800 Subject: [PATCH 6/8] Fix bug #12898564 Settings Crash on Renaming the device. - remove the call to PreferencesActivity as we are no more using the PreferencesActivity Also set correct activity title with the new selected BT name for the device. Change-Id: I03497187e0410ff2bba87bdb04a197938d1ea967 --- .../settings/bluetooth/BluetoothNameDialogFragment.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java index 0af9c4ed7c4..bf0356c3147 100644 --- a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java +++ b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java @@ -26,7 +26,6 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; -import android.preference.PreferenceActivity; import android.text.Editable; import android.text.InputFilter; import android.text.TextWatcher; @@ -179,9 +178,8 @@ public final class BluetoothNameDialogFragment extends DialogFragment implements mDeviceNameUpdated = true; mDeviceNameEdited = false; mDeviceNameView.setText(mLocalAdapter.getName()); + getActivity().setTitle(mLocalAdapter.getName()); } - PreferenceActivity activity = (PreferenceActivity)getActivity(); - activity.showBreadCrumbs(mLocalAdapter.getName(), ""); } public void afterTextChanged(Editable s) { From c4776b90fc14f1f36596dac99a95b63b40d87695 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Thu, 6 Feb 2014 11:20:24 -0800 Subject: [PATCH 7/8] Fix bug #12890909 Settings crashes when tapped on Add Account option in settings Follow up from the previous CL that was trying to fix it. - remove the dialog theme android:theme="@android:style/Theme.Holo.Dialog" as a Dialog does not support a Drawwer Change-Id: I8b3fe89c157f0b454464c04a4acd4f32049bde71 --- AndroidManifest.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6ba9a94fb46..6e01aecb824 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1514,8 +1514,7 @@ + android:label="@string/account_sync_settings_title"> From 011c262e0da9f6882db35a2e9f1f2e9ea7cfc65a Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Thu, 6 Feb 2014 15:46:19 -0800 Subject: [PATCH 8/8] Fix bug #12910775 Settings crash after tap on Access Point Names under Mobile networks - ApnSettings is now a fragment so introduce a new ApnSettingsActivity - ApsSettingsActivity will use the ApnSettings fragment - move the getListView() call to onActivityCreated(...) as the ListView needs to be created before this call can be done. - add also an alias for the old activity name ".ApsSettings" Change-Id: Id228722d7f34415d4b036282f0845e28546111df --- AndroidManifest.xml | 15 ++++++++++++++- src/com/android/settings/ApnSettings.java | 8 +++++++- src/com/android/settings/Settings.java | 1 + src/com/android/settings/SettingsActivity.java | 3 ++- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6e01aecb824..cc407dbddab 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -259,7 +259,7 @@ - + + + + + +