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

Commit 5ed53c5f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make RemoteViews.DrawInstructions immutable." into main

parents e6501580 b646c557
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -59545,7 +59545,6 @@ package android.widget {
  }
  @FlaggedApi("android.appwidget.flags.draw_data_parcel") public static final class RemoteViews.DrawInstructions {
    method @FlaggedApi("android.appwidget.flags.draw_data_parcel") public void appendInstructions(@NonNull byte[]);
  }
  @FlaggedApi("android.appwidget.flags.draw_data_parcel") public static final class RemoteViews.DrawInstructions.Builder {
+0 −8
Original line number Diff line number Diff line
@@ -7596,14 +7596,6 @@ public class RemoteViews implements Parcelable, Filter {
            }
        }

        /**
         * Append additional instructions to this {@link DrawInstructions} object.
         */
        @FlaggedApi(FLAG_DRAW_DATA_PARCEL)
        public void appendInstructions(@NonNull final byte[] instructions) {
            mInstructions.add(instructions);
        }

        /**
         * Builder class for {@link DrawInstructions} objects.
         */
+2 −7
Original line number Diff line number Diff line
@@ -450,13 +450,8 @@ public class RemoteViewsTest {
    }

    private RemoteViews.DrawInstructions getDrawInstructions() {
        final byte[] first = new byte[] {'f', 'i', 'r', 's', 't'};
        final byte[] second = new byte[] {'s', 'e', 'c', 'o', 'n', 'd'};
        final RemoteViews.DrawInstructions drawInstructions =
                new RemoteViews.DrawInstructions.Builder(
                        Collections.singletonList(first)).build();
        drawInstructions.appendInstructions(second);
        return drawInstructions;
        final byte[] bytes = new byte[] {'h', 'e', 'l', 'l', 'o'};
        return new RemoteViews.DrawInstructions.Builder(Collections.singletonList(bytes)).build();
    }

    private RemoteViews createViewChained(int depth, String... texts) {