Merge "Fix crashes in Settings" into mnc-dr-dev
This commit is contained in:
@@ -671,7 +671,6 @@
|
|||||||
android:excludeFromRecents="true">
|
android:excludeFromRecents="true">
|
||||||
<intent-filter android:priority="1">
|
<intent-filter android:priority="1">
|
||||||
<action android:name="com.android.settings.USER_DICTIONARY_INSERT" />
|
<action android:name="com.android.settings.USER_DICTIONARY_INSERT" />
|
||||||
<action android:name="com.android.settings.USER_DICTIONARY_EDIT" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
||||||
@@ -1736,27 +1735,6 @@
|
|||||||
<activity android:name=".AppPicker" android:label="@string/select_application"
|
<activity android:name=".AppPicker" android:label="@string/select_application"
|
||||||
android:theme="@android:style/Theme.Material.Light.Dialog" />
|
android:theme="@android:style/Theme.Material.Light.Dialog" />
|
||||||
|
|
||||||
<activity android:name="Settings$UsbSettingsActivity"
|
|
||||||
android:label="@string/storage_title_usb"
|
|
||||||
android:taskAffinity="com.android.settings"
|
|
||||||
android:parentActivityName="Settings$StorageSettingsActivity">
|
|
||||||
<intent-filter android:priority="1">
|
|
||||||
<action android:name="android.settings.STORAGE_USB_SETTINGS" />
|
|
||||||
<action android:name="com.android.settings.STORAGE_USB_SETTINGS" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
</intent-filter>
|
|
||||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
|
||||||
android:value="com.android.settings.deviceinfo.UsbSettings" />
|
|
||||||
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
|
|
||||||
android:resource="@id/storage_settings" />
|
|
||||||
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
|
||||||
android:value="true" />
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<!-- Keep compatibility with old shortcuts. -->
|
<!-- Keep compatibility with old shortcuts. -->
|
||||||
<activity-alias android:name="UsbSettings"
|
<activity-alias android:name="UsbSettings"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
@@ -56,7 +56,10 @@ public class UserDictionaryAddWordActivity extends Activity {
|
|||||||
// The following will get the EXTRA_WORD and EXTRA_LOCALE fields that are in the intent.
|
// The following will get the EXTRA_WORD and EXTRA_LOCALE fields that are in the intent.
|
||||||
// We do need to add the action by hand, because UserDictionaryAddWordContents expects
|
// We do need to add the action by hand, because UserDictionaryAddWordContents expects
|
||||||
// it to be in the bundle, in the EXTRA_MODE key.
|
// it to be in the bundle, in the EXTRA_MODE key.
|
||||||
final Bundle args = intent.getExtras();
|
Bundle args = intent.getExtras();
|
||||||
|
if (args == null) {
|
||||||
|
args = new Bundle();
|
||||||
|
}
|
||||||
args.putInt(UserDictionaryAddWordContents.EXTRA_MODE, mode);
|
args.putInt(UserDictionaryAddWordContents.EXTRA_MODE, mode);
|
||||||
|
|
||||||
if (null != savedInstanceState) {
|
if (null != savedInstanceState) {
|
||||||
@@ -74,6 +77,7 @@ public class UserDictionaryAddWordActivity extends Activity {
|
|||||||
|
|
||||||
private void reportBackToCaller(final int resultCode, final Bundle result) {
|
private void reportBackToCaller(final int resultCode, final Bundle result) {
|
||||||
final Intent senderIntent = getIntent();
|
final Intent senderIntent = getIntent();
|
||||||
|
if (senderIntent.getExtras() == null) return;
|
||||||
final Object listener = senderIntent.getExtras().get("listener");
|
final Object listener = senderIntent.getExtras().get("listener");
|
||||||
if (!(listener instanceof Messenger)) return; // This will work if listener is null too.
|
if (!(listener instanceof Messenger)) return; // This will work if listener is null too.
|
||||||
final Messenger messenger = (Messenger)listener;
|
final Messenger messenger = (Messenger)listener;
|
||||||
|
Reference in New Issue
Block a user