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

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

Remove unused code

Bug: 181048615
Test: manual
Change-Id: I69dc97c2ced3025e7b8b9809bdb0ac7954b862d2
parent fbcde0f7
Loading
Loading
Loading
Loading
+1 −58
Original line number Diff line number Diff line
@@ -3698,7 +3698,6 @@ public class Notification implements Parcelable
        private int mTextColorsAreForBackground = COLOR_INVALID;
        private int mPrimaryTextColor = COLOR_INVALID;
        private int mSecondaryTextColor = COLOR_INVALID;
        private boolean mRebuildStyledRemoteViews;

        private boolean mTintActionButtons;
        private boolean mTintWithThemeAccent;
@@ -5729,8 +5728,7 @@ public class Notification implements Parcelable
        }

        private boolean useExistingRemoteView() {
            return mStyle == null || (!mStyle.displayCustomViewInline()
                    && !mRebuildStyledRemoteViews);
            return mStyle == null || !mStyle.displayCustomViewInline();
        }

        /**
@@ -6618,18 +6616,6 @@ public class Notification implements Parcelable
                    && targetSdkVersion < Build.VERSION_CODES.O;
        }

        /**
         * Forces all styled remoteViews to be built from scratch and not use any cached
         * RemoteViews.
         * This is needed for legacy apps that are baking in their remoteviews into the
         * notification.
         *
         * @hide
         */
        public void setRebuildStyledRemoteViews(boolean rebuild) {
            mRebuildStyledRemoteViews = rebuild;
        }

        /**
         * Get the text that should be displayed in the statusBar when heads upped. This is
         * usually just the app name, but may be different depending on the style.
@@ -8279,27 +8265,6 @@ public class Notification implements Parcelable
            return true;
        }

        private CharSequence createConversationTitleFromMessages() {
            ArraySet<CharSequence> names = new ArraySet<>();
            for (int i = 0; i < mMessages.size(); i++) {
                Message m = mMessages.get(i);
                Person sender = m.getSenderPerson();
                if (sender != null) {
                    names.add(sender.getName());
                }
            }
            SpannableStringBuilder title = new SpannableStringBuilder();
            int size = names.size();
            for (int i = 0; i < size; i++) {
                CharSequence name = names.valueAt(i);
                if (!TextUtils.isEmpty(title)) {
                    title.append(", ");
                }
                title.append(BidiFormatter.getInstance().unicodeWrap(name));
            }
            return title;
        }

        /**
         * @hide
         */
@@ -8313,11 +8278,6 @@ public class Notification implements Parcelable
            return remoteViews;
        }

        private static TextAppearanceSpan makeFontColorSpan(int color) {
            return new TextAppearanceSpan(null, 0, 0,
                    ColorStateList.valueOf(color), null);
        }

        public static final class Message {
            /** @hide */
            public static final String KEY_TEXT = "text";
@@ -9779,23 +9739,6 @@ public class Notification implements Parcelable
            // Comparison done for all custom RemoteViews, independent of style
            return false;
        }

        private RemoteViews buildIntoRemoteView(RemoteViews template, RemoteViews customContent,
                boolean headerless) {
            if (customContent != null) {
                // Need to clone customContent before adding, because otherwise it can no longer be
                // parceled independently of remoteViews.
                customContent = customContent.clone();
                customContent.overrideTextColors(mBuilder.getPrimaryTextColor(mBuilder.mParams));
                if (headerless) {
                    template.removeFromParent(R.id.notification_top_line);
                }
                template.removeAllViews(R.id.notification_main_column);
                template.addView(R.id.notification_main_column, customContent);
                template.addFlags(RemoteViews.FLAG_REAPPLY_DISALLOWED);
            }
            return template;
        }
    }

    /**