Loading core/java/android/app/Notification.java +74 −19 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import android.os.Parcelable; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.service.notification.StatusBarNotification; import android.text.BidiFormatter; import android.text.SpannableStringBuilder; import android.text.Spanned; Loading Loading @@ -3903,10 +3904,24 @@ public class Notification implements Parcelable * 3. Standard template view */ public RemoteViews createContentView() { return createContentView(false /* increasedheight */ ); } /** * Construct a RemoteViews for the smaller content view. * * @param increasedHeight true if this layout be created with an increased height. Some * styles may support showing more then just that basic 1U size * and the system may decide to render important notifications * slightly bigger even when collapsed. * * @hide */ public RemoteViews createContentView(boolean increasedHeight) { if (mN.contentView != null && (mStyle == null || !mStyle.displayCustomViewInline())) { return mN.contentView; } else if (mStyle != null) { final RemoteViews styleView = mStyle.makeContentView(); final RemoteViews styleView = mStyle.makeContentView(increasedHeight); if (styleView != null) { return styleView; } Loading Loading @@ -4535,6 +4550,19 @@ public class Notification implements Parcelable return (flags & ongoingFlags) != 0; } /** * @return the style class of this notification * @hide */ public Class<? extends Notification.Style> getNotificationStyle() { String templateClass = extras.getString(Notification.EXTRA_TEMPLATE); if (!TextUtils.isEmpty(templateClass)) { return Notification.getNotificationStyleClass(templateClass); } return null; } /** * @return true if this notification is colorized. This also factors in wheather the * notification is ongoing. Loading Loading @@ -4656,11 +4684,13 @@ public class Notification implements Parcelable } /** * Construct a Style-specific RemoteViews for the final 1U notification layout. * Construct a Style-specific RemoteViews for the collapsed notification layout. * The default implementation has nothing additional to add. * * @param increasedHeight true if this layout be created with an increased height. * @hide */ public RemoteViews makeContentView() { public RemoteViews makeContentView(boolean increasedHeight) { return null; } Loading Loading @@ -5005,6 +5035,23 @@ public class Notification implements Parcelable mBigText = extras.getCharSequence(EXTRA_BIG_TEXT); } /** * @param increasedHeight true if this layout be created with an increased height. * * @hide */ @Override public RemoteViews makeContentView(boolean increasedHeight) { if (increasedHeight) { ArrayList<Action> actions = mBuilder.mActions; mBuilder.mActions = new ArrayList<>(); RemoteViews remoteViews = makeBigContentView(); mBuilder.mActions = actions; return remoteViews; } return super.makeContentView(increasedHeight); } /** * @hide */ Loading Loading @@ -5269,7 +5316,8 @@ public class Notification implements Parcelable * @hide */ @Override public RemoteViews makeContentView() { public RemoteViews makeContentView(boolean increasedHeight) { if (!increasedHeight) { Message m = findLatestIncomingMessage(); CharSequence title = mConversationTitle != null ? mConversationTitle Loading @@ -5278,8 +5326,15 @@ public class Notification implements Parcelable ? null : mConversationTitle != null ? makeMessageLine(m, mBuilder) : m.mText; return mBuilder.applyStandardTemplateWithActions(mBuilder.getBaseLayoutResource(), return mBuilder.applyStandardTemplate(mBuilder.getBaseLayoutResource(), mBuilder.mParams.reset().hasProgress(false).title(title).text(text)); } else { ArrayList<Action> actions = mBuilder.mActions; mBuilder.mActions = new ArrayList<>(); RemoteViews remoteViews = makeBigContentView(); mBuilder.mActions = actions; return remoteViews; } } private Message findLatestIncomingMessage() { Loading Loading @@ -5844,7 +5899,7 @@ public class Notification implements Parcelable * @hide */ @Override public RemoteViews makeContentView() { public RemoteViews makeContentView(boolean increasedHeight) { return makeMediaContentView(); } Loading Loading @@ -6020,7 +6075,7 @@ public class Notification implements Parcelable * @hide */ @Override public RemoteViews makeContentView() { public RemoteViews makeContentView(boolean increasedHeight) { return makeStandardTemplateWithCustomContent(mBuilder.mN.contentView); } Loading Loading @@ -6134,8 +6189,8 @@ public class Notification implements Parcelable * @hide */ @Override public RemoteViews makeContentView() { RemoteViews remoteViews = super.makeContentView(); public RemoteViews makeContentView(boolean increasedHeight) { RemoteViews remoteViews = super.makeContentView(false /* increasedHeight */); return buildIntoRemoteView(remoteViews, R.id.notification_content_container, mBuilder.mN.contentView); } Loading @@ -6157,7 +6212,7 @@ public class Notification implements Parcelable return buildIntoRemoteView(remoteViews, R.id.notification_main_column, customRemoteView); } else if (customRemoteView != mBuilder.mN.contentView){ remoteViews = super.makeContentView(); remoteViews = super.makeContentView(false /* increasedHeight */); return buildIntoRemoteView(remoteViews, R.id.notification_content_container, customRemoteView); } else { Loading core/java/com/android/internal/util/NotificationMessagingUtil.java 0 → 100644 +93 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.internal.util; import android.app.Notification; import android.app.NotificationManager; import android.content.Context; import android.database.ContentObserver; import android.net.Uri; import android.os.Handler; import android.os.Looper; import android.os.UserHandle; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.util.ArrayMap; import java.util.Objects; /** * A util to look up messaging related functions for notifications. This is used for both the * ranking and the actual layout. */ public class NotificationMessagingUtil { private static final String DEFAULT_SMS_APP_SETTING = Settings.Secure.SMS_DEFAULT_APPLICATION; private final Context mContext; private ArrayMap<Integer, String> mDefaultSmsApp = new ArrayMap<>(); public NotificationMessagingUtil(Context context) { mContext = context; mContext.getContentResolver().registerContentObserver( Settings.Secure.getUriFor(DEFAULT_SMS_APP_SETTING), false, mSmsContentObserver); } @SuppressWarnings("deprecation") private boolean isDefaultMessagingApp(StatusBarNotification sbn) { final int userId = sbn.getUserId(); if (userId == UserHandle.USER_NULL || userId == UserHandle.USER_ALL) return false; if (mDefaultSmsApp.get(userId) == null) { cacheDefaultSmsApp(userId); } return Objects.equals(mDefaultSmsApp.get(userId), sbn.getPackageName()); } private void cacheDefaultSmsApp(int userId) { mDefaultSmsApp.put(userId, Settings.Secure.getStringForUser( mContext.getContentResolver(), Settings.Secure.SMS_DEFAULT_APPLICATION, userId)); } private final ContentObserver mSmsContentObserver = new ContentObserver( new Handler(Looper.getMainLooper())) { @Override public void onChange(boolean selfChange, Uri uri, int userId) { if (Settings.Secure.getUriFor(DEFAULT_SMS_APP_SETTING).equals(uri)) { cacheDefaultSmsApp(userId); } } }; public boolean isImportantMessaging(StatusBarNotification sbn, int importance) { if (importance < NotificationManager.IMPORTANCE_LOW) { return false; } Class<? extends Notification.Style> style = sbn.getNotification().getNotificationStyle(); if (Notification.MessagingStyle.class.equals(style)) { return true; } if (Notification.CATEGORY_MESSAGE.equals(sbn.getNotification().category) && isDefaultMessagingApp(sbn)) { return true; } return false; } } packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ <!-- Height of a small notification in the status bar--> <dimen name="notification_min_height">92dp</dimen> <!-- Height of a small notification in the status bar if it is a large (like messaging)--> <dimen name="notification_min_height_large">132dp</dimen> <!-- Height of a small notification in the status bar which was used before android N --> <dimen name="notification_min_height_legacy">64dp</dimen> Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +16 −2 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private int mMaxHeadsUpHeightLegacy; private int mMaxHeadsUpHeight; private int mNotificationMinHeight; private int mNotificationMinHeightLarge; private int mNotificationMaxHeight; private int mNotificationAmbientHeight; private int mIncreasedPaddingBetweenElements; Loading Loading @@ -207,6 +208,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private Runnable mOnDismissRunnable; private boolean mIsLowPriority; private boolean mIsColorized; private boolean mUseIncreasedCollapsedHeight; @Override public boolean isGroupExpansionChanging() { Loading Loading @@ -341,8 +343,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { boolean customView = layout.getContractedChild().getId() != com.android.internal.R.id.status_bar_latest_event_content; boolean beforeN = mEntry.targetSdk < Build.VERSION_CODES.N; int minHeight = customView && beforeN && !mIsSummaryWithChildren ? mNotificationMinHeightLegacy : mNotificationMinHeight; int minHeight; if (customView && beforeN && !mIsSummaryWithChildren) { minHeight = mNotificationMinHeightLegacy; } else if (mUseIncreasedCollapsedHeight && layout == mPrivateLayout) { minHeight = mNotificationMinHeightLarge; } else { minHeight = mNotificationMinHeight; } boolean headsUpCustom = layout.getHeadsUpChild() != null && layout.getHeadsUpChild().getId() != com.android.internal.R.id.status_bar_latest_event_content; Loading Loading @@ -979,6 +987,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } } public void setUseIncreasedCollapsedHeight(boolean use) { mUseIncreasedCollapsedHeight = use; } public interface ExpansionLogger { public void logNotificationExpansion(String key, boolean userAction, boolean expanded); } Loading @@ -992,6 +1004,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private void initDimens() { mNotificationMinHeightLegacy = getFontScaledHeight(R.dimen.notification_min_height_legacy); mNotificationMinHeight = getFontScaledHeight(R.dimen.notification_min_height); mNotificationMinHeightLarge = getFontScaledHeight( R.dimen.notification_min_height_large); mNotificationMaxHeight = getFontScaledHeight(R.dimen.notification_max_height); mNotificationAmbientHeight = getFontScaledHeight(R.dimen.notification_ambient_height); mMaxHeadsUpHeightLegacy = getFontScaledHeight( Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java +7 −6 Original line number Diff line number Diff line Loading @@ -126,13 +126,13 @@ public class NotificationData { } public boolean cacheContentViews(Context ctx, Notification updatedNotification, boolean isLowPriority) { boolean isLowPriority, boolean useIncreasedCollapsedView) { boolean applyInPlace = false; if (updatedNotification != null) { final Notification.Builder updatedNotificationBuilder = Notification.Builder.recoverBuilder(ctx, updatedNotification); final RemoteViews newContentView = createContentView(updatedNotificationBuilder, isLowPriority); isLowPriority, useIncreasedCollapsedView); final RemoteViews newBigContentView = createBigContentView( updatedNotificationBuilder, isLowPriority); final RemoteViews newHeadsUpContentView = Loading Loading @@ -162,7 +162,8 @@ public class NotificationData { final Notification.Builder builder = Notification.Builder.recoverBuilder(ctx, notification.getNotification()); cachedContentView = createContentView(builder, isLowPriority); cachedContentView = createContentView(builder, isLowPriority, useIncreasedCollapsedView); cachedBigContentView = createBigContentView(builder, isLowPriority); cachedHeadsUpContentView = builder.createHeadsUpContentView(); cachedPublicContentView = builder.makePublicContentView(); Loading @@ -188,11 +189,11 @@ public class NotificationData { } private RemoteViews createContentView(Notification.Builder builder, boolean isAmbient) { if (isAmbient) { boolean isLowPriority, boolean useLarge) { if (isLowPriority) { return builder.makeLowPriorityContentView(false /* useRegularSubtext */); } return builder.createContentView(); return builder.createContentView(useLarge); } // Returns true if the RemoteViews are the same. Loading Loading
core/java/android/app/Notification.java +74 −19 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import android.os.Parcelable; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.service.notification.StatusBarNotification; import android.text.BidiFormatter; import android.text.SpannableStringBuilder; import android.text.Spanned; Loading Loading @@ -3903,10 +3904,24 @@ public class Notification implements Parcelable * 3. Standard template view */ public RemoteViews createContentView() { return createContentView(false /* increasedheight */ ); } /** * Construct a RemoteViews for the smaller content view. * * @param increasedHeight true if this layout be created with an increased height. Some * styles may support showing more then just that basic 1U size * and the system may decide to render important notifications * slightly bigger even when collapsed. * * @hide */ public RemoteViews createContentView(boolean increasedHeight) { if (mN.contentView != null && (mStyle == null || !mStyle.displayCustomViewInline())) { return mN.contentView; } else if (mStyle != null) { final RemoteViews styleView = mStyle.makeContentView(); final RemoteViews styleView = mStyle.makeContentView(increasedHeight); if (styleView != null) { return styleView; } Loading Loading @@ -4535,6 +4550,19 @@ public class Notification implements Parcelable return (flags & ongoingFlags) != 0; } /** * @return the style class of this notification * @hide */ public Class<? extends Notification.Style> getNotificationStyle() { String templateClass = extras.getString(Notification.EXTRA_TEMPLATE); if (!TextUtils.isEmpty(templateClass)) { return Notification.getNotificationStyleClass(templateClass); } return null; } /** * @return true if this notification is colorized. This also factors in wheather the * notification is ongoing. Loading Loading @@ -4656,11 +4684,13 @@ public class Notification implements Parcelable } /** * Construct a Style-specific RemoteViews for the final 1U notification layout. * Construct a Style-specific RemoteViews for the collapsed notification layout. * The default implementation has nothing additional to add. * * @param increasedHeight true if this layout be created with an increased height. * @hide */ public RemoteViews makeContentView() { public RemoteViews makeContentView(boolean increasedHeight) { return null; } Loading Loading @@ -5005,6 +5035,23 @@ public class Notification implements Parcelable mBigText = extras.getCharSequence(EXTRA_BIG_TEXT); } /** * @param increasedHeight true if this layout be created with an increased height. * * @hide */ @Override public RemoteViews makeContentView(boolean increasedHeight) { if (increasedHeight) { ArrayList<Action> actions = mBuilder.mActions; mBuilder.mActions = new ArrayList<>(); RemoteViews remoteViews = makeBigContentView(); mBuilder.mActions = actions; return remoteViews; } return super.makeContentView(increasedHeight); } /** * @hide */ Loading Loading @@ -5269,7 +5316,8 @@ public class Notification implements Parcelable * @hide */ @Override public RemoteViews makeContentView() { public RemoteViews makeContentView(boolean increasedHeight) { if (!increasedHeight) { Message m = findLatestIncomingMessage(); CharSequence title = mConversationTitle != null ? mConversationTitle Loading @@ -5278,8 +5326,15 @@ public class Notification implements Parcelable ? null : mConversationTitle != null ? makeMessageLine(m, mBuilder) : m.mText; return mBuilder.applyStandardTemplateWithActions(mBuilder.getBaseLayoutResource(), return mBuilder.applyStandardTemplate(mBuilder.getBaseLayoutResource(), mBuilder.mParams.reset().hasProgress(false).title(title).text(text)); } else { ArrayList<Action> actions = mBuilder.mActions; mBuilder.mActions = new ArrayList<>(); RemoteViews remoteViews = makeBigContentView(); mBuilder.mActions = actions; return remoteViews; } } private Message findLatestIncomingMessage() { Loading Loading @@ -5844,7 +5899,7 @@ public class Notification implements Parcelable * @hide */ @Override public RemoteViews makeContentView() { public RemoteViews makeContentView(boolean increasedHeight) { return makeMediaContentView(); } Loading Loading @@ -6020,7 +6075,7 @@ public class Notification implements Parcelable * @hide */ @Override public RemoteViews makeContentView() { public RemoteViews makeContentView(boolean increasedHeight) { return makeStandardTemplateWithCustomContent(mBuilder.mN.contentView); } Loading Loading @@ -6134,8 +6189,8 @@ public class Notification implements Parcelable * @hide */ @Override public RemoteViews makeContentView() { RemoteViews remoteViews = super.makeContentView(); public RemoteViews makeContentView(boolean increasedHeight) { RemoteViews remoteViews = super.makeContentView(false /* increasedHeight */); return buildIntoRemoteView(remoteViews, R.id.notification_content_container, mBuilder.mN.contentView); } Loading @@ -6157,7 +6212,7 @@ public class Notification implements Parcelable return buildIntoRemoteView(remoteViews, R.id.notification_main_column, customRemoteView); } else if (customRemoteView != mBuilder.mN.contentView){ remoteViews = super.makeContentView(); remoteViews = super.makeContentView(false /* increasedHeight */); return buildIntoRemoteView(remoteViews, R.id.notification_content_container, customRemoteView); } else { Loading
core/java/com/android/internal/util/NotificationMessagingUtil.java 0 → 100644 +93 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.internal.util; import android.app.Notification; import android.app.NotificationManager; import android.content.Context; import android.database.ContentObserver; import android.net.Uri; import android.os.Handler; import android.os.Looper; import android.os.UserHandle; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.util.ArrayMap; import java.util.Objects; /** * A util to look up messaging related functions for notifications. This is used for both the * ranking and the actual layout. */ public class NotificationMessagingUtil { private static final String DEFAULT_SMS_APP_SETTING = Settings.Secure.SMS_DEFAULT_APPLICATION; private final Context mContext; private ArrayMap<Integer, String> mDefaultSmsApp = new ArrayMap<>(); public NotificationMessagingUtil(Context context) { mContext = context; mContext.getContentResolver().registerContentObserver( Settings.Secure.getUriFor(DEFAULT_SMS_APP_SETTING), false, mSmsContentObserver); } @SuppressWarnings("deprecation") private boolean isDefaultMessagingApp(StatusBarNotification sbn) { final int userId = sbn.getUserId(); if (userId == UserHandle.USER_NULL || userId == UserHandle.USER_ALL) return false; if (mDefaultSmsApp.get(userId) == null) { cacheDefaultSmsApp(userId); } return Objects.equals(mDefaultSmsApp.get(userId), sbn.getPackageName()); } private void cacheDefaultSmsApp(int userId) { mDefaultSmsApp.put(userId, Settings.Secure.getStringForUser( mContext.getContentResolver(), Settings.Secure.SMS_DEFAULT_APPLICATION, userId)); } private final ContentObserver mSmsContentObserver = new ContentObserver( new Handler(Looper.getMainLooper())) { @Override public void onChange(boolean selfChange, Uri uri, int userId) { if (Settings.Secure.getUriFor(DEFAULT_SMS_APP_SETTING).equals(uri)) { cacheDefaultSmsApp(userId); } } }; public boolean isImportantMessaging(StatusBarNotification sbn, int importance) { if (importance < NotificationManager.IMPORTANCE_LOW) { return false; } Class<? extends Notification.Style> style = sbn.getNotification().getNotificationStyle(); if (Notification.MessagingStyle.class.equals(style)) { return true; } if (Notification.CATEGORY_MESSAGE.equals(sbn.getNotification().category) && isDefaultMessagingApp(sbn)) { return true; } return false; } }
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ <!-- Height of a small notification in the status bar--> <dimen name="notification_min_height">92dp</dimen> <!-- Height of a small notification in the status bar if it is a large (like messaging)--> <dimen name="notification_min_height_large">132dp</dimen> <!-- Height of a small notification in the status bar which was used before android N --> <dimen name="notification_min_height_legacy">64dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +16 −2 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private int mMaxHeadsUpHeightLegacy; private int mMaxHeadsUpHeight; private int mNotificationMinHeight; private int mNotificationMinHeightLarge; private int mNotificationMaxHeight; private int mNotificationAmbientHeight; private int mIncreasedPaddingBetweenElements; Loading Loading @@ -207,6 +208,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private Runnable mOnDismissRunnable; private boolean mIsLowPriority; private boolean mIsColorized; private boolean mUseIncreasedCollapsedHeight; @Override public boolean isGroupExpansionChanging() { Loading Loading @@ -341,8 +343,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { boolean customView = layout.getContractedChild().getId() != com.android.internal.R.id.status_bar_latest_event_content; boolean beforeN = mEntry.targetSdk < Build.VERSION_CODES.N; int minHeight = customView && beforeN && !mIsSummaryWithChildren ? mNotificationMinHeightLegacy : mNotificationMinHeight; int minHeight; if (customView && beforeN && !mIsSummaryWithChildren) { minHeight = mNotificationMinHeightLegacy; } else if (mUseIncreasedCollapsedHeight && layout == mPrivateLayout) { minHeight = mNotificationMinHeightLarge; } else { minHeight = mNotificationMinHeight; } boolean headsUpCustom = layout.getHeadsUpChild() != null && layout.getHeadsUpChild().getId() != com.android.internal.R.id.status_bar_latest_event_content; Loading Loading @@ -979,6 +987,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } } public void setUseIncreasedCollapsedHeight(boolean use) { mUseIncreasedCollapsedHeight = use; } public interface ExpansionLogger { public void logNotificationExpansion(String key, boolean userAction, boolean expanded); } Loading @@ -992,6 +1004,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private void initDimens() { mNotificationMinHeightLegacy = getFontScaledHeight(R.dimen.notification_min_height_legacy); mNotificationMinHeight = getFontScaledHeight(R.dimen.notification_min_height); mNotificationMinHeightLarge = getFontScaledHeight( R.dimen.notification_min_height_large); mNotificationMaxHeight = getFontScaledHeight(R.dimen.notification_max_height); mNotificationAmbientHeight = getFontScaledHeight(R.dimen.notification_ambient_height); mMaxHeadsUpHeightLegacy = getFontScaledHeight( Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java +7 −6 Original line number Diff line number Diff line Loading @@ -126,13 +126,13 @@ public class NotificationData { } public boolean cacheContentViews(Context ctx, Notification updatedNotification, boolean isLowPriority) { boolean isLowPriority, boolean useIncreasedCollapsedView) { boolean applyInPlace = false; if (updatedNotification != null) { final Notification.Builder updatedNotificationBuilder = Notification.Builder.recoverBuilder(ctx, updatedNotification); final RemoteViews newContentView = createContentView(updatedNotificationBuilder, isLowPriority); isLowPriority, useIncreasedCollapsedView); final RemoteViews newBigContentView = createBigContentView( updatedNotificationBuilder, isLowPriority); final RemoteViews newHeadsUpContentView = Loading Loading @@ -162,7 +162,8 @@ public class NotificationData { final Notification.Builder builder = Notification.Builder.recoverBuilder(ctx, notification.getNotification()); cachedContentView = createContentView(builder, isLowPriority); cachedContentView = createContentView(builder, isLowPriority, useIncreasedCollapsedView); cachedBigContentView = createBigContentView(builder, isLowPriority); cachedHeadsUpContentView = builder.createHeadsUpContentView(); cachedPublicContentView = builder.makePublicContentView(); Loading @@ -188,11 +189,11 @@ public class NotificationData { } private RemoteViews createContentView(Notification.Builder builder, boolean isAmbient) { if (isAmbient) { boolean isLowPriority, boolean useLarge) { if (isLowPriority) { return builder.makeLowPriorityContentView(false /* useRegularSubtext */); } return builder.createContentView(); return builder.createContentView(useLarge); } // Returns true if the RemoteViews are the same. Loading