Launch channel settings as half sheet

If opening app has requested only a subset of fields

Test: manual - launch from an app, filtered and unfiltered, for
normal channels and conversations
Bug: 177246841
Change-Id: Ifd70478101d1ea1340d2ecc55033fab55e65ca92

Change-Id: I5194b959c82b2cfa7990c84285aaf69464cff3a8
This commit is contained in:
Julia Reynolds
2021-03-10 21:38:49 -05:00
parent 61aa289dac
commit efe26e2d44
10 changed files with 304 additions and 53 deletions

View File

@@ -68,12 +68,16 @@ public class ChannelNotificationSettings extends NotificationSettings {
if (mChannel != null && !TextUtils.isEmpty(mChannel.getConversationId())
&& !mChannel.isDemoted()) {
startActivity(new SubSettingLauncher(mContext)
Intent intent = new SubSettingLauncher(mContext)
.setDestination(ConversationNotificationSettings.class.getName())
.setArguments(getArguments())
.setExtras(getIntent() != null ? getIntent().getExtras(): null)
.setSourceMetricsCategory(SettingsEnums.NOTIFICATION_TOPIC_NOTIFICATION)
.toIntent());
.toIntent();
if (mPreferenceFilter != null) {
intent.setClass(mContext, ChannelPanelActivity.class);
}
startActivity(intent);
finish();
return;
}
@@ -84,6 +88,7 @@ public class ChannelNotificationSettings extends NotificationSettings {
controller.displayPreference(getPreferenceScreen());
}
updatePreferenceStates();
animatePanel();
}
@Override