Merge "Fix DND crash from SpringboardActivity" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3f790b76b0
@@ -98,6 +98,17 @@ public class BluetoothSliceBuilder {
|
||||
.build();
|
||||
}
|
||||
|
||||
public static Intent getIntent(Context context) {
|
||||
final String screenTitle = context.getText(R.string.bluetooth_settings_title).toString();
|
||||
final Uri contentUri = new Uri.Builder().appendPath(
|
||||
SettingsSlicesContract.KEY_BLUETOOTH).build();
|
||||
return DatabaseIndexingUtils.buildSearchResultPageIntent(context,
|
||||
BluetoothDashboardFragment.class.getName(), null /* key */, screenTitle,
|
||||
MetricsProto.MetricsEvent.SETTINGS_CONNECTED_DEVICE_CATEGORY)
|
||||
.setClassName(context.getPackageName(), SubSettings.class.getName())
|
||||
.setData(contentUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the current Bluetooth status to the boolean value keyed by
|
||||
* {@link android.app.slice.Slice#EXTRA_TOGGLE_STATE} on {@param intent}.
|
||||
@@ -119,15 +130,7 @@ public class BluetoothSliceBuilder {
|
||||
}
|
||||
|
||||
private static PendingIntent getPrimaryAction(Context context) {
|
||||
final String screenTitle = context.getText(R.string.bluetooth_settings_title).toString();
|
||||
final Uri contentUri = new Uri.Builder().appendPath(
|
||||
SettingsSlicesContract.KEY_BLUETOOTH).build();
|
||||
final Intent intent = DatabaseIndexingUtils.buildSearchResultPageIntent(context,
|
||||
BluetoothDashboardFragment.class.getName(), null /* key */, screenTitle,
|
||||
MetricsProto.MetricsEvent.SETTINGS_CONNECTED_DEVICE_CATEGORY)
|
||||
.setClassName(context.getPackageName(), SubSettings.class.getName())
|
||||
.setData(contentUri);
|
||||
|
||||
final Intent intent = getIntent(context);
|
||||
return PendingIntent.getActivity(context, 0 /* requestCode */,
|
||||
intent, 0 /* flags */);
|
||||
}
|
||||
|
Reference in New Issue
Block a user