Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8bb900e authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fix optional expanders logic to not require custom views

Bug: 339523906
Fixes: 340884768
Test: n/a
Flag: android.app.notification_expansion_optional
Change-Id: Ieadd15464aba95f7beb8bb35970022c628bf3704
parent 53f5979c
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -6492,8 +6492,13 @@ public class Notification implements Parcelable
        // visual regressions.
        // visual regressions.
        @SuppressWarnings("AndroidFrameworkCompatChange")
        @SuppressWarnings("AndroidFrameworkCompatChange")
        private boolean bigContentViewRequired() {
        private boolean bigContentViewRequired() {
            if (!Flags.notificationExpansionOptional()
            if (Flags.notificationExpansionOptional()) {
                    && mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.S) {
                // Notifications without a bigContentView, style, or actions do not need to expand
                boolean exempt = mN.bigContentView == null
                        && mStyle == null && mActions.size() == 0;
                return !exempt;
            }
            if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.S) {
                return true;
                return true;
            }
            }
            // Notifications with contentView and without a bigContentView, style, or actions would
            // Notifications with contentView and without a bigContentView, style, or actions would