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

Commit d5b8f059 authored by Wu Ahan's avatar Wu Ahan Committed by Android (Google) Code Review
Browse files

Merge "Make some apis @TestApi and @hide for usage in tests"

parents 2c72e9d8 c54169a0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -471,7 +471,10 @@ package android.app {
  }

  public class WallpaperManager {
    method @Nullable public android.graphics.Bitmap getBitmap();
    method @RequiresPermission("android.permission.SET_WALLPAPER_COMPONENT") public boolean setWallpaperComponent(android.content.ComponentName);
    method public boolean shouldEnableWideColorGamut();
    method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public boolean wallpaperSupportsWcg(int);
  }

  public class WindowConfiguration implements java.lang.Comparable<android.app.WindowConfiguration> android.os.Parcelable {
@@ -4379,6 +4382,7 @@ package android.view {
  }

  public final class Display {
    method @NonNull public android.graphics.ColorSpace[] getSupportedWideColorGamut();
    method public boolean hasAccess(int);
  }

+6 −1
Original line number Diff line number Diff line
@@ -568,8 +568,10 @@ public class WallpaperManager {
     *
     * @see Configuration#isScreenWideColorGamut()
     * @return True if wcg should be enabled for this device.
     * @hide
     */
    private boolean shouldEnableWideColorGamut() {
    @TestApi
    public boolean shouldEnableWideColorGamut() {
        return mWcgEnabled;
    }

@@ -877,6 +879,7 @@ public class WallpaperManager {
     * @see #FLAG_SYSTEM
     * @hide
     */
    @TestApi
    @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE)
    public boolean wallpaperSupportsWcg(int which) {
        if (!shouldEnableWideColorGamut()) {
@@ -893,6 +896,8 @@ public class WallpaperManager {
     *
     * @hide
     */
    @TestApi
    @Nullable
    @UnsupportedAppUsage
    public Bitmap getBitmap() {
        return getBitmap(false);
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.view;
import static android.Manifest.permission.CONFIGURE_DISPLAY_COLOR_MODE;

import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
@@ -1010,6 +1011,9 @@ public final class Display {
     * @return Supported WCG color spaces.
     * @hide
     */
    @SuppressLint("VisiblySynchronized")
    @NonNull
    @TestApi
    public @ColorMode ColorSpace[] getSupportedWideColorGamut() {
        synchronized (this) {
            final ColorSpace[] defaultColorSpaces = new ColorSpace[0];