Merge "Revert "MediaProjection captures DisplayArea"" into sc-v2-dev am: 93a74ca03b am: 657edec50f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15432520 Change-Id: If741ec02955e5b926aa2efaacb1c4e6f08e90917
This commit is contained in:
@@ -21,7 +21,6 @@ import android.annotation.Nullable;
|
||||
import android.graphics.Point;
|
||||
import android.hardware.SensorManager;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.PowerManager;
|
||||
import android.util.IntArray;
|
||||
import android.util.Slog;
|
||||
@@ -340,28 +339,6 @@ public abstract class DisplayManagerInternal {
|
||||
*/
|
||||
public abstract List<RefreshRateLimitation> getRefreshRateLimitations(int displayId);
|
||||
|
||||
/**
|
||||
* Returns the window token of the level of the WindowManager hierarchy to mirror. Returns null
|
||||
* if layer mirroring by SurfaceFlinger should not be performed for the given displayId.
|
||||
* For now, only used for mirroring started from MediaProjection.
|
||||
*/
|
||||
public abstract IBinder getWindowTokenClientToMirror(int displayId);
|
||||
|
||||
/**
|
||||
* For the given displayId, updates the window token of the level of the WindowManager hierarchy
|
||||
* to mirror. If windowToken is null, then SurfaceFlinger performs no layer mirroring to the
|
||||
* given display.
|
||||
* For now, only used for mirroring started from MediaProjection.
|
||||
*/
|
||||
public abstract void setWindowTokenClientToMirror(int displayId, IBinder windowToken);
|
||||
|
||||
/**
|
||||
* Returns the default size of the surface associated with the display, or null if the surface
|
||||
* is not provided for layer mirroring by SurfaceFlinger.
|
||||
* For now, only used for mirroring started from MediaProjection.
|
||||
*/
|
||||
public abstract Point getDisplaySurfaceDefaultSize(int displayId);
|
||||
|
||||
/**
|
||||
* Describes the requested power state of the display.
|
||||
*
|
||||
|
||||
@@ -23,7 +23,6 @@ import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.media.projection.MediaProjection;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.view.Surface;
|
||||
@@ -92,16 +91,9 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
*/
|
||||
private int mDisplayIdToMirror = DEFAULT_DISPLAY;
|
||||
|
||||
/**
|
||||
* The window token of the level of the WindowManager hierarchy to mirror, or null if mirroring
|
||||
* should not be performed.
|
||||
*/
|
||||
@Nullable
|
||||
private IBinder mWindowTokenClientToMirror = null;
|
||||
|
||||
|
||||
|
||||
// Code below generated by codegen v1.0.23.
|
||||
// Code below generated by codegen v1.0.20.
|
||||
//
|
||||
// DO NOT MODIFY!
|
||||
// CHECKSTYLE:OFF Generated code
|
||||
@@ -123,8 +115,7 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
int flags,
|
||||
@Nullable Surface surface,
|
||||
@Nullable String uniqueId,
|
||||
int displayIdToMirror,
|
||||
@Nullable IBinder windowTokenClientToMirror) {
|
||||
int displayIdToMirror) {
|
||||
this.mName = name;
|
||||
com.android.internal.util.AnnotationValidations.validate(
|
||||
NonNull.class, null, mName);
|
||||
@@ -144,7 +135,6 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
this.mSurface = surface;
|
||||
this.mUniqueId = uniqueId;
|
||||
this.mDisplayIdToMirror = displayIdToMirror;
|
||||
this.mWindowTokenClientToMirror = windowTokenClientToMirror;
|
||||
|
||||
// onConstructed(); // You can define this method to get a callback
|
||||
}
|
||||
@@ -222,15 +212,6 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
return mDisplayIdToMirror;
|
||||
}
|
||||
|
||||
/**
|
||||
* The window token of the level of the WindowManager hierarchy to mirror, or null if mirroring
|
||||
* should not be performed.
|
||||
*/
|
||||
@DataClass.Generated.Member
|
||||
public @Nullable IBinder getWindowTokenClientToMirror() {
|
||||
return mWindowTokenClientToMirror;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DataClass.Generated.Member
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
@@ -240,7 +221,6 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
int flg = 0;
|
||||
if (mSurface != null) flg |= 0x20;
|
||||
if (mUniqueId != null) flg |= 0x40;
|
||||
if (mWindowTokenClientToMirror != null) flg |= 0x100;
|
||||
dest.writeInt(flg);
|
||||
dest.writeString(mName);
|
||||
dest.writeInt(mWidth);
|
||||
@@ -250,7 +230,6 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
if (mSurface != null) dest.writeTypedObject(mSurface, flags);
|
||||
if (mUniqueId != null) dest.writeString(mUniqueId);
|
||||
dest.writeInt(mDisplayIdToMirror);
|
||||
if (mWindowTokenClientToMirror != null) dest.writeStrongBinder(mWindowTokenClientToMirror);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -273,7 +252,6 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
Surface surface = (flg & 0x20) == 0 ? null : (Surface) in.readTypedObject(Surface.CREATOR);
|
||||
String uniqueId = (flg & 0x40) == 0 ? null : in.readString();
|
||||
int displayIdToMirror = in.readInt();
|
||||
IBinder windowTokenClientToMirror = (flg & 0x100) == 0 ? null : (IBinder) in.readStrongBinder();
|
||||
|
||||
this.mName = name;
|
||||
com.android.internal.util.AnnotationValidations.validate(
|
||||
@@ -294,7 +272,6 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
this.mSurface = surface;
|
||||
this.mUniqueId = uniqueId;
|
||||
this.mDisplayIdToMirror = displayIdToMirror;
|
||||
this.mWindowTokenClientToMirror = windowTokenClientToMirror;
|
||||
|
||||
// onConstructed(); // You can define this method to get a callback
|
||||
}
|
||||
@@ -328,7 +305,6 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
private @Nullable Surface mSurface;
|
||||
private @Nullable String mUniqueId;
|
||||
private int mDisplayIdToMirror;
|
||||
private @Nullable IBinder mWindowTokenClientToMirror;
|
||||
|
||||
private long mBuilderFieldsSet = 0L;
|
||||
|
||||
@@ -463,22 +439,10 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The window token of the level of the WindowManager hierarchy to mirror, or null if mirroring
|
||||
* should not be performed.
|
||||
*/
|
||||
@DataClass.Generated.Member
|
||||
public @NonNull Builder setWindowTokenClientToMirror(@NonNull IBinder value) {
|
||||
checkNotUsed();
|
||||
mBuilderFieldsSet |= 0x100;
|
||||
mWindowTokenClientToMirror = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Builds the instance. This builder should not be touched after calling this! */
|
||||
public @NonNull VirtualDisplayConfig build() {
|
||||
checkNotUsed();
|
||||
mBuilderFieldsSet |= 0x200; // Mark builder used
|
||||
mBuilderFieldsSet |= 0x100; // Mark builder used
|
||||
|
||||
if ((mBuilderFieldsSet & 0x10) == 0) {
|
||||
mFlags = 0;
|
||||
@@ -492,9 +456,6 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
if ((mBuilderFieldsSet & 0x80) == 0) {
|
||||
mDisplayIdToMirror = DEFAULT_DISPLAY;
|
||||
}
|
||||
if ((mBuilderFieldsSet & 0x100) == 0) {
|
||||
mWindowTokenClientToMirror = null;
|
||||
}
|
||||
VirtualDisplayConfig o = new VirtualDisplayConfig(
|
||||
mName,
|
||||
mWidth,
|
||||
@@ -503,13 +464,12 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
mFlags,
|
||||
mSurface,
|
||||
mUniqueId,
|
||||
mDisplayIdToMirror,
|
||||
mWindowTokenClientToMirror);
|
||||
mDisplayIdToMirror);
|
||||
return o;
|
||||
}
|
||||
|
||||
private void checkNotUsed() {
|
||||
if ((mBuilderFieldsSet & 0x200) != 0) {
|
||||
if ((mBuilderFieldsSet & 0x100) != 0) {
|
||||
throw new IllegalStateException(
|
||||
"This Builder should not be reused. Use a new Builder instance instead");
|
||||
}
|
||||
@@ -517,10 +477,10 @@ public final class VirtualDisplayConfig implements Parcelable {
|
||||
}
|
||||
|
||||
@DataClass.Generated(
|
||||
time = 1620657851981L,
|
||||
codegenVersion = "1.0.23",
|
||||
time = 1604456298440L,
|
||||
codegenVersion = "1.0.20",
|
||||
sourceFile = "frameworks/base/core/java/android/hardware/display/VirtualDisplayConfig.java",
|
||||
inputSignatures = "private @android.annotation.NonNull java.lang.String mName\nprivate @android.annotation.IntRange int mWidth\nprivate @android.annotation.IntRange int mHeight\nprivate @android.annotation.IntRange int mDensityDpi\nprivate int mFlags\nprivate @android.annotation.Nullable android.view.Surface mSurface\nprivate @android.annotation.Nullable java.lang.String mUniqueId\nprivate int mDisplayIdToMirror\nprivate @android.annotation.Nullable android.os.IBinder mWindowTokenClientToMirror\nclass VirtualDisplayConfig extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genParcelable=true, genAidl=true, genBuilder=true)")
|
||||
inputSignatures = "private @android.annotation.NonNull java.lang.String mName\nprivate @android.annotation.IntRange int mWidth\nprivate @android.annotation.IntRange int mHeight\nprivate @android.annotation.IntRange int mDensityDpi\nprivate int mFlags\nprivate @android.annotation.Nullable android.view.Surface mSurface\nprivate @android.annotation.Nullable java.lang.String mUniqueId\nprivate int mDisplayIdToMirror\nclass VirtualDisplayConfig extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genParcelable=true, genAidl=true, genBuilder=true)")
|
||||
@Deprecated
|
||||
private void __metadata() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user