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

Commit decc51eb authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge "Deprecate Notification.Builder.createContentView APIs" into main

parents 121eff02 b21759fb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -6674,9 +6674,9 @@ package android.app {
    method @Deprecated public android.app.Notification.Builder addPerson(String);
    method @NonNull public android.app.Notification.Builder addPerson(android.app.Person);
    method @NonNull public android.app.Notification build();
    method public android.widget.RemoteViews createBigContentView();
    method public android.widget.RemoteViews createContentView();
    method public android.widget.RemoteViews createHeadsUpContentView();
    method @Deprecated public android.widget.RemoteViews createBigContentView();
    method @Deprecated public android.widget.RemoteViews createContentView();
    method @Deprecated public android.widget.RemoteViews createHeadsUpContentView();
    method @NonNull public android.app.Notification.Builder extend(android.app.Notification.Extender);
    method public android.os.Bundle getExtras();
    method @Deprecated public android.app.Notification getNotification();
+36 −6
Original line number Diff line number Diff line
@@ -6068,11 +6068,19 @@ public class Notification implements Parcelable
        }
        /**
         * Construct a RemoteViews for the final 1U notification layout. In order:
         *   1. Custom contentView from the caller
         *   2. Style's proposed content view
         *   3. Standard template view
         * Construct a RemoteViews representing the standard notification layout.
         *
         * @deprecated For performance and system health reasons, this API is no longer required to
         *  be used directly by the System UI when rendering Notifications to the user. While the UI
         *  returned by this method will still represent the content of the Notification being
         *  built, it may differ from the visual style of the system.
         *
         *  NOTE: this API has always had severe limitations; for example it does not support any
         *  interactivity, it ignores the app theme, it hard-codes the colors from the system theme
         *  at the time it is called, and it does Bitmap decoding on the main thread which can cause
         *  UI jank.
         */
        @Deprecated
        public RemoteViews createContentView() {
            return createContentView(false /* increasedheight */ );
        }
@@ -6181,8 +6189,19 @@ public class Notification implements Parcelable
        }
        /**
         * Construct a RemoteViews for the final big notification layout.
         * Construct a RemoteViews representing the expanded notification layout.
         *
         * @deprecated For performance and system health reasons, this API is no longer required to
         *  be used directly by the System UI when rendering Notifications to the user. While the UI
         *  returned by this method will still represent the content of the Notification being
         *  built, it may differ from the visual style of the system.
         *
         *  NOTE: this API has always had severe limitations; for example it does not support any
         *  interactivity, it ignores the app theme, it hard-codes the colors from the system theme
         *  at the time it is called, and it does Bitmap decoding on the main thread which can cause
         *  UI jank.
         */
        @Deprecated
        public RemoteViews createBigContentView() {
            RemoteViews result = null;
            if (useExistingRemoteView(mN.bigContentView)) {
@@ -6315,8 +6334,19 @@ public class Notification implements Parcelable
        }
        /**
         * Construct a RemoteViews for the final heads-up notification layout.
         * Construct a RemoteViews representing the heads up notification layout.
         *
         * @deprecated For performance and system health reasons, this API is no longer required to
         *  be used directly by the System UI when rendering Notifications to the user. While the UI
         *  returned by this method will still represent the content of the Notification being
         *  built, it may differ from the visual style of the system.
         *
         *  NOTE: this API has always had severe limitations; for example it does not support any
         *  interactivity, it ignores the app theme, it hard-codes the colors from the system theme
         *  at the time it is called, and it does Bitmap decoding on the main thread which can cause
         *  UI jank.
         */
        @Deprecated
        public RemoteViews createHeadsUpContentView() {
            return createHeadsUpContentView(false /* useIncreasedHeight */);
        }