Merge "Restoring old methods for compatibility." into oc-dev
This commit is contained in:
@@ -29,6 +29,8 @@ package android.app {
|
||||
}
|
||||
|
||||
public final deprecated class PictureInPictureArgs implements android.os.Parcelable {
|
||||
ctor public deprecated PictureInPictureArgs();
|
||||
ctor public deprecated PictureInPictureArgs(float, java.util.List<android.app.RemoteAction>);
|
||||
method public static android.app.PictureInPictureArgs convert(android.app.PictureInPictureParams);
|
||||
method public static android.app.PictureInPictureParams convert(android.app.PictureInPictureArgs);
|
||||
method public void copyOnlySet(android.app.PictureInPictureArgs);
|
||||
@@ -41,6 +43,9 @@ package android.app {
|
||||
method public boolean hasSetAspectRatio();
|
||||
method public boolean hasSourceBoundsHint();
|
||||
method public boolean hasSourceBoundsHintInsets();
|
||||
method public deprecated void setActions(java.util.List<android.app.RemoteAction>);
|
||||
method public deprecated void setAspectRatio(float);
|
||||
method public deprecated void setSourceRectHint(android.graphics.Rect);
|
||||
method public deprecated void setSourceRectHintInsets(android.graphics.Rect);
|
||||
method public void truncateActions(int);
|
||||
field public static final android.os.Parcelable.Creator<android.app.PictureInPictureArgs> CREATOR;
|
||||
|
||||
@@ -29,6 +29,8 @@ package android.app {
|
||||
}
|
||||
|
||||
public final deprecated class PictureInPictureArgs implements android.os.Parcelable {
|
||||
ctor public deprecated PictureInPictureArgs();
|
||||
ctor public deprecated PictureInPictureArgs(float, java.util.List<android.app.RemoteAction>);
|
||||
method public static android.app.PictureInPictureArgs convert(android.app.PictureInPictureParams);
|
||||
method public static android.app.PictureInPictureParams convert(android.app.PictureInPictureArgs);
|
||||
method public void copyOnlySet(android.app.PictureInPictureArgs);
|
||||
@@ -41,6 +43,9 @@ package android.app {
|
||||
method public boolean hasSetAspectRatio();
|
||||
method public boolean hasSourceBoundsHint();
|
||||
method public boolean hasSourceBoundsHintInsets();
|
||||
method public deprecated void setActions(java.util.List<android.app.RemoteAction>);
|
||||
method public deprecated void setAspectRatio(float);
|
||||
method public deprecated void setSourceRectHint(android.graphics.Rect);
|
||||
method public deprecated void setSourceRectHintInsets(android.graphics.Rect);
|
||||
method public void truncateActions(int);
|
||||
field public static final android.os.Parcelable.Creator<android.app.PictureInPictureArgs> CREATOR;
|
||||
|
||||
@@ -29,6 +29,8 @@ package android.app {
|
||||
}
|
||||
|
||||
public final deprecated class PictureInPictureArgs implements android.os.Parcelable {
|
||||
ctor public deprecated PictureInPictureArgs();
|
||||
ctor public deprecated PictureInPictureArgs(float, java.util.List<android.app.RemoteAction>);
|
||||
method public static android.app.PictureInPictureArgs convert(android.app.PictureInPictureParams);
|
||||
method public static android.app.PictureInPictureParams convert(android.app.PictureInPictureArgs);
|
||||
method public void copyOnlySet(android.app.PictureInPictureArgs);
|
||||
@@ -41,6 +43,9 @@ package android.app {
|
||||
method public boolean hasSetAspectRatio();
|
||||
method public boolean hasSourceBoundsHint();
|
||||
method public boolean hasSourceBoundsHintInsets();
|
||||
method public deprecated void setActions(java.util.List<android.app.RemoteAction>);
|
||||
method public deprecated void setAspectRatio(float);
|
||||
method public deprecated void setSourceRectHint(android.graphics.Rect);
|
||||
method public deprecated void setSourceRectHintInsets(android.graphics.Rect);
|
||||
method public void truncateActions(int);
|
||||
field public static final android.os.Parcelable.Creator<android.app.PictureInPictureArgs> CREATOR;
|
||||
|
||||
@@ -133,7 +133,20 @@ public final class PictureInPictureArgs implements Parcelable {
|
||||
@Nullable
|
||||
private Rect mSourceRectHintInsets;
|
||||
|
||||
private PictureInPictureArgs() {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public PictureInPictureArgs() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public PictureInPictureArgs(float aspectRatio, List<RemoteAction> actions) {
|
||||
setAspectRatio(aspectRatio);
|
||||
setActions(actions);
|
||||
}
|
||||
|
||||
private PictureInPictureArgs(Parcel in) {
|
||||
@@ -159,6 +172,40 @@ public final class PictureInPictureArgs implements Parcelable {
|
||||
mSourceRectHint = sourceRectHint;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public void setAspectRatio(float aspectRatio) {
|
||||
// Temporary workaround
|
||||
mAspectRatio = new Rational((int) (aspectRatio * 1000000000), 1000000000);
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public void setActions(List<RemoteAction> actions) {
|
||||
if (mUserActions != null) {
|
||||
mUserActions = null;
|
||||
}
|
||||
if (actions != null) {
|
||||
mUserActions = new ArrayList<>(actions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public void setSourceRectHint(Rect launchBounds) {
|
||||
if (launchBounds == null) {
|
||||
mSourceRectHint = null;
|
||||
} else {
|
||||
mSourceRectHint = new Rect(launchBounds);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the set parameters from the other picture-in-picture args.
|
||||
* @hide
|
||||
|
||||
Reference in New Issue
Block a user