Merge "Remove filtering option for display hash." into sc-dev

This commit is contained in:
Chavi Weingarten
2021-04-13 14:31:54 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 40 deletions

View File

@@ -9816,7 +9816,6 @@ package android.service.displayhash {
public final class DisplayHashParams implements android.os.Parcelable { public final class DisplayHashParams implements android.os.Parcelable {
method public int describeContents(); method public int describeContents();
method @Nullable public android.util.Size getBufferSize(); method @Nullable public android.util.Size getBufferSize();
method public boolean isBufferScaleWithFiltering();
method public boolean isGrayscaleBuffer(); method public boolean isGrayscaleBuffer();
method public void writeToParcel(@NonNull android.os.Parcel, int); method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.service.displayhash.DisplayHashParams> CREATOR; field @NonNull public static final android.os.Parcelable.Creator<android.service.displayhash.DisplayHashParams> CREATOR;
@@ -9825,7 +9824,6 @@ package android.service.displayhash {
public static final class DisplayHashParams.Builder { public static final class DisplayHashParams.Builder {
ctor public DisplayHashParams.Builder(); ctor public DisplayHashParams.Builder();
method @NonNull public android.service.displayhash.DisplayHashParams build(); method @NonNull public android.service.displayhash.DisplayHashParams build();
method @NonNull public android.service.displayhash.DisplayHashParams.Builder setBufferScaleWithFiltering(boolean);
method @NonNull public android.service.displayhash.DisplayHashParams.Builder setBufferSize(int, int); method @NonNull public android.service.displayhash.DisplayHashParams.Builder setBufferSize(int, int);
method @NonNull public android.service.displayhash.DisplayHashParams.Builder setGrayscaleBuffer(boolean); method @NonNull public android.service.displayhash.DisplayHashParams.Builder setGrayscaleBuffer(boolean);
} }

View File

@@ -45,11 +45,6 @@ public final class DisplayHashParams implements Parcelable {
@Nullable @Nullable
private final Size mBufferSize; private final Size mBufferSize;
/**
* Whether the content captured will use filtering when scaling.
*/
private final boolean mBufferScaleWithFiltering;
/** /**
* Whether the content will be captured in grayscale or color. * Whether the content will be captured in grayscale or color.
*/ */
@@ -61,7 +56,6 @@ public final class DisplayHashParams implements Parcelable {
public static final class Builder { public static final class Builder {
@Nullable @Nullable
private Size mBufferSize; private Size mBufferSize;
private boolean mBufferScaleWithFiltering;
private boolean mGrayscaleBuffer; private boolean mGrayscaleBuffer;
/** /**
@@ -79,15 +73,6 @@ public final class DisplayHashParams implements Parcelable {
return this; return this;
} }
/**
* Whether the content captured will use filtering when scaling.
*/
@NonNull
public Builder setBufferScaleWithFiltering(boolean value) {
mBufferScaleWithFiltering = value;
return this;
}
/** /**
* Whether the content will be captured in grayscale or color. * Whether the content will be captured in grayscale or color.
*/ */
@@ -100,13 +85,13 @@ public final class DisplayHashParams implements Parcelable {
/** Builds the instance. This builder should not be touched after calling this! */ /** Builds the instance. This builder should not be touched after calling this! */
@NonNull @NonNull
public DisplayHashParams build() { public DisplayHashParams build() {
return new DisplayHashParams(mBufferSize, mBufferScaleWithFiltering, mGrayscaleBuffer); return new DisplayHashParams(mBufferSize, mGrayscaleBuffer);
} }
} }
// Code below generated by codegen v1.0.22. // Code below generated by codegen v1.0.23.
// //
// DO NOT MODIFY! // DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code // CHECKSTYLE:OFF Generated code
@@ -127,8 +112,6 @@ public final class DisplayHashParams implements Parcelable {
* buffer given to the {@link DisplayHasherService#onGenerateDisplayHash(byte[], HardwareBuffer, * buffer given to the {@link DisplayHasherService#onGenerateDisplayHash(byte[], HardwareBuffer,
* Rect, String, DisplayHashResultCallback)} will be stretched based on the value set here. * Rect, String, DisplayHashResultCallback)} will be stretched based on the value set here.
* If {@code null}, the buffer size will not be changed. * If {@code null}, the buffer size will not be changed.
* @param bufferScaleWithFiltering
* Whether the content captured will use filtering when scaling.
* @param grayscaleBuffer * @param grayscaleBuffer
* Whether the content will be captured in grayscale or color. * Whether the content will be captured in grayscale or color.
* @hide * @hide
@@ -136,10 +119,8 @@ public final class DisplayHashParams implements Parcelable {
@DataClass.Generated.Member @DataClass.Generated.Member
public DisplayHashParams( public DisplayHashParams(
@Nullable Size bufferSize, @Nullable Size bufferSize,
boolean bufferScaleWithFiltering,
boolean grayscaleBuffer) { boolean grayscaleBuffer) {
this.mBufferSize = bufferSize; this.mBufferSize = bufferSize;
this.mBufferScaleWithFiltering = bufferScaleWithFiltering;
this.mGrayscaleBuffer = grayscaleBuffer; this.mGrayscaleBuffer = grayscaleBuffer;
// onConstructed(); // You can define this method to get a callback // onConstructed(); // You can define this method to get a callback
@@ -156,14 +137,6 @@ public final class DisplayHashParams implements Parcelable {
return mBufferSize; return mBufferSize;
} }
/**
* Whether the content captured will use filtering when scaling.
*/
@DataClass.Generated.Member
public boolean isBufferScaleWithFiltering() {
return mBufferScaleWithFiltering;
}
/** /**
* Whether the content will be captured in grayscale or color. * Whether the content will be captured in grayscale or color.
*/ */
@@ -180,7 +153,6 @@ public final class DisplayHashParams implements Parcelable {
return "DisplayHashParams { " + return "DisplayHashParams { " +
"bufferSize = " + mBufferSize + ", " + "bufferSize = " + mBufferSize + ", " +
"bufferScaleWithFiltering = " + mBufferScaleWithFiltering + ", " +
"grayscaleBuffer = " + mGrayscaleBuffer + "grayscaleBuffer = " + mGrayscaleBuffer +
" }"; " }";
} }
@@ -192,8 +164,7 @@ public final class DisplayHashParams implements Parcelable {
// void parcelFieldName(Parcel dest, int flags) { ... } // void parcelFieldName(Parcel dest, int flags) { ... }
byte flg = 0; byte flg = 0;
if (mBufferScaleWithFiltering) flg |= 0x2; if (mGrayscaleBuffer) flg |= 0x2;
if (mGrayscaleBuffer) flg |= 0x4;
if (mBufferSize != null) flg |= 0x1; if (mBufferSize != null) flg |= 0x1;
dest.writeByte(flg); dest.writeByte(flg);
if (mBufferSize != null) dest.writeSize(mBufferSize); if (mBufferSize != null) dest.writeSize(mBufferSize);
@@ -211,12 +182,10 @@ public final class DisplayHashParams implements Parcelable {
// static FieldType unparcelFieldName(Parcel in) { ... } // static FieldType unparcelFieldName(Parcel in) { ... }
byte flg = in.readByte(); byte flg = in.readByte();
boolean bufferScaleWithFiltering = (flg & 0x2) != 0; boolean grayscaleBuffer = (flg & 0x2) != 0;
boolean grayscaleBuffer = (flg & 0x4) != 0;
Size bufferSize = (flg & 0x1) == 0 ? null : (Size) in.readSize(); Size bufferSize = (flg & 0x1) == 0 ? null : (Size) in.readSize();
this.mBufferSize = bufferSize; this.mBufferSize = bufferSize;
this.mBufferScaleWithFiltering = bufferScaleWithFiltering;
this.mGrayscaleBuffer = grayscaleBuffer; this.mGrayscaleBuffer = grayscaleBuffer;
// onConstructed(); // You can define this method to get a callback // onConstructed(); // You can define this method to get a callback
@@ -237,10 +206,10 @@ public final class DisplayHashParams implements Parcelable {
}; };
@DataClass.Generated( @DataClass.Generated(
time = 1615565493989L, time = 1617735166254L,
codegenVersion = "1.0.22", codegenVersion = "1.0.23",
sourceFile = "frameworks/base/core/java/android/service/displayhash/DisplayHashParams.java", sourceFile = "frameworks/base/core/java/android/service/displayhash/DisplayHashParams.java",
inputSignatures = "private final @android.annotation.Nullable android.util.Size mBufferSize\nprivate final boolean mBufferScaleWithFiltering\nprivate final boolean mGrayscaleBuffer\nclass DisplayHashParams extends java.lang.Object implements [android.os.Parcelable]\nprivate @android.annotation.Nullable android.util.Size mBufferSize\nprivate boolean mBufferScaleWithFiltering\nprivate boolean mGrayscaleBuffer\npublic @android.annotation.NonNull android.service.displayhash.DisplayHashParams.Builder setBufferSize(int,int)\npublic @android.annotation.NonNull android.service.displayhash.DisplayHashParams.Builder setBufferScaleWithFiltering(boolean)\npublic @android.annotation.NonNull android.service.displayhash.DisplayHashParams.Builder setGrayscaleBuffer(boolean)\npublic @android.annotation.NonNull android.service.displayhash.DisplayHashParams build()\nclass Builder extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genAidl=true, genToString=true, genParcelable=true, genHiddenConstructor=true)") inputSignatures = "private final @android.annotation.Nullable android.util.Size mBufferSize\nprivate final boolean mGrayscaleBuffer\nclass DisplayHashParams extends java.lang.Object implements [android.os.Parcelable]\nprivate @android.annotation.Nullable android.util.Size mBufferSize\nprivate boolean mGrayscaleBuffer\npublic @android.annotation.NonNull android.service.displayhash.DisplayHashParams.Builder setBufferSize(int,int)\npublic @android.annotation.NonNull android.service.displayhash.DisplayHashParams.Builder setGrayscaleBuffer(boolean)\npublic @android.annotation.NonNull android.service.displayhash.DisplayHashParams build()\nclass Builder extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genAidl=true, genToString=true, genParcelable=true, genHiddenConstructor=true)")
@Deprecated @Deprecated
private void __metadata() {} private void __metadata() {}