Properly show conversation settings
... when the backing shortcut is missing, so users can change notification settings when the shortcut hasn't yet been recreated by the app when setting up a new device Test: Robotests (confirmed that the 2 controllers that used mConversationInfo already tested for null), manual Fixes: 203991823 Change-Id: I477c6b0aef0d978767788cbfc1bfadea4d36cda8
This commit is contained in:
@@ -41,13 +41,14 @@ public class ConversationNotificationSettings extends NotificationSettings {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (mUid < 0 || TextUtils.isEmpty(mPkg) || mPkgInfo == null || mChannel == null
|
||||
|| mConversationInfo == null) {
|
||||
if (mUid < 0 || TextUtils.isEmpty(mPkg) || mPkgInfo == null || mChannel == null) {
|
||||
Log.w(TAG, "Missing package or uid or packageinfo or channel");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
getActivity().setTitle(mConversationInfo.getLabel());
|
||||
getActivity().setTitle(mConversationInfo == null
|
||||
? mChannel.getName()
|
||||
: mConversationInfo.getLabel());
|
||||
|
||||
for (NotificationPreferenceController controller : mControllers) {
|
||||
controller.onResume(mAppRow, mChannel, mChannelGroup, mConversationDrawable,
|
||||
|
@@ -270,6 +270,9 @@ abstract public class NotificationSettings extends DashboardFragment {
|
||||
String conversationId = intent != null
|
||||
? intent.getStringExtra(Settings.EXTRA_CONVERSATION_ID) : null;
|
||||
mChannel = mBackend.getChannel(mPkg, mUid, channelId, conversationId);
|
||||
if (mChannel == null) {
|
||||
mBackend.getChannel(mPkg, mUid, channelId, null);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadConversation() {
|
||||
|
Reference in New Issue
Block a user