Merge "Remove filtering option for display hash." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ca10b476ea
@@ -9816,7 +9816,6 @@ package android.service.displayhash {
|
||||
public final class DisplayHashParams implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method @Nullable public android.util.Size getBufferSize();
|
||||
method public boolean isBufferScaleWithFiltering();
|
||||
method public boolean isGrayscaleBuffer();
|
||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||
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 {
|
||||
ctor public DisplayHashParams.Builder();
|
||||
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 setGrayscaleBuffer(boolean);
|
||||
}
|
||||
|
||||
@@ -45,11 +45,6 @@ public final class DisplayHashParams implements Parcelable {
|
||||
@Nullable
|
||||
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.
|
||||
*/
|
||||
@@ -61,7 +56,6 @@ public final class DisplayHashParams implements Parcelable {
|
||||
public static final class Builder {
|
||||
@Nullable
|
||||
private Size mBufferSize;
|
||||
private boolean mBufferScaleWithFiltering;
|
||||
private boolean mGrayscaleBuffer;
|
||||
|
||||
/**
|
||||
@@ -79,15 +73,6 @@ public final class DisplayHashParams implements Parcelable {
|
||||
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.
|
||||
*/
|
||||
@@ -100,13 +85,13 @@ public final class DisplayHashParams implements Parcelable {
|
||||
/** Builds the instance. This builder should not be touched after calling this! */
|
||||
@NonNull
|
||||
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!
|
||||
// CHECKSTYLE:OFF Generated code
|
||||
@@ -127,8 +112,6 @@ public final class DisplayHashParams implements Parcelable {
|
||||
* buffer given to the {@link DisplayHasherService#onGenerateDisplayHash(byte[], HardwareBuffer,
|
||||
* Rect, String, DisplayHashResultCallback)} will be stretched based on the value set here.
|
||||
* If {@code null}, the buffer size will not be changed.
|
||||
* @param bufferScaleWithFiltering
|
||||
* Whether the content captured will use filtering when scaling.
|
||||
* @param grayscaleBuffer
|
||||
* Whether the content will be captured in grayscale or color.
|
||||
* @hide
|
||||
@@ -136,10 +119,8 @@ public final class DisplayHashParams implements Parcelable {
|
||||
@DataClass.Generated.Member
|
||||
public DisplayHashParams(
|
||||
@Nullable Size bufferSize,
|
||||
boolean bufferScaleWithFiltering,
|
||||
boolean grayscaleBuffer) {
|
||||
this.mBufferSize = bufferSize;
|
||||
this.mBufferScaleWithFiltering = bufferScaleWithFiltering;
|
||||
this.mGrayscaleBuffer = grayscaleBuffer;
|
||||
|
||||
// onConstructed(); // You can define this method to get a callback
|
||||
@@ -156,14 +137,6 @@ public final class DisplayHashParams implements Parcelable {
|
||||
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.
|
||||
*/
|
||||
@@ -180,7 +153,6 @@ public final class DisplayHashParams implements Parcelable {
|
||||
|
||||
return "DisplayHashParams { " +
|
||||
"bufferSize = " + mBufferSize + ", " +
|
||||
"bufferScaleWithFiltering = " + mBufferScaleWithFiltering + ", " +
|
||||
"grayscaleBuffer = " + mGrayscaleBuffer +
|
||||
" }";
|
||||
}
|
||||
@@ -192,8 +164,7 @@ public final class DisplayHashParams implements Parcelable {
|
||||
// void parcelFieldName(Parcel dest, int flags) { ... }
|
||||
|
||||
byte flg = 0;
|
||||
if (mBufferScaleWithFiltering) flg |= 0x2;
|
||||
if (mGrayscaleBuffer) flg |= 0x4;
|
||||
if (mGrayscaleBuffer) flg |= 0x2;
|
||||
if (mBufferSize != null) flg |= 0x1;
|
||||
dest.writeByte(flg);
|
||||
if (mBufferSize != null) dest.writeSize(mBufferSize);
|
||||
@@ -211,12 +182,10 @@ public final class DisplayHashParams implements Parcelable {
|
||||
// static FieldType unparcelFieldName(Parcel in) { ... }
|
||||
|
||||
byte flg = in.readByte();
|
||||
boolean bufferScaleWithFiltering = (flg & 0x2) != 0;
|
||||
boolean grayscaleBuffer = (flg & 0x4) != 0;
|
||||
boolean grayscaleBuffer = (flg & 0x2) != 0;
|
||||
Size bufferSize = (flg & 0x1) == 0 ? null : (Size) in.readSize();
|
||||
|
||||
this.mBufferSize = bufferSize;
|
||||
this.mBufferScaleWithFiltering = bufferScaleWithFiltering;
|
||||
this.mGrayscaleBuffer = grayscaleBuffer;
|
||||
|
||||
// onConstructed(); // You can define this method to get a callback
|
||||
@@ -237,10 +206,10 @@ public final class DisplayHashParams implements Parcelable {
|
||||
};
|
||||
|
||||
@DataClass.Generated(
|
||||
time = 1615565493989L,
|
||||
codegenVersion = "1.0.22",
|
||||
time = 1617735166254L,
|
||||
codegenVersion = "1.0.23",
|
||||
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
|
||||
private void __metadata() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user