Merge "Fix overlapping remote and recents animations" into qt-r1-dev am: b248a0343f am: dd40a0c75a

am: c7b3ff1c52

Change-Id: Iaba42814773ab7333aae3fbc90d3bbd2ea8bac87
This commit is contained in:
Jorim Jaggi
2019-08-05 12:01:12 -07:00
committed by android-build-merger
15 changed files with 187 additions and 99 deletions

View File

@@ -126,17 +126,6 @@ public abstract class ActivityManagerInternal {
*/
public abstract void setHasOverlayUi(int pid, boolean hasOverlayUi);
/**
* Sets if the given pid is currently running a remote animation, which is taken a signal for
* determining oom adjustment and scheduling behavior.
*
* @param pid The pid we are setting overlay UI for.
* @param runningRemoteAnimation True if the process is running a remote animation, false
* otherwise.
* @see RemoteAnimationAdapter
*/
public abstract void setRunningRemoteAnimation(int pid, boolean runningRemoteAnimation);
/**
* Called after the network policy rules are updated by
* {@link com.android.server.net.NetworkPolicyManagerService} for a specific {@param uid} and

View File

@@ -55,6 +55,7 @@ public class RemoteAnimationAdapter implements Parcelable {
/** @see #getCallingPid */
private int mCallingPid;
private int mCallingUid;
/**
* @param runner The interface that gets notified when we actually need to start the animation.
@@ -103,10 +104,11 @@ public class RemoteAnimationAdapter implements Parcelable {
}
/**
* To be called by system_server to keep track which pid is running this animation.
* To be called by system_server to keep track which pid and uid is running this animation.
*/
public void setCallingPid(int pid) {
public void setCallingPidUid(int pid, int uid) {
mCallingPid = pid;
mCallingUid = uid;
}
/**
@@ -116,6 +118,13 @@ public class RemoteAnimationAdapter implements Parcelable {
return mCallingPid;
}
/**
* @return The uid of the process running the animation.
*/
public int getCallingUid() {
return mCallingUid;
}
@Override
public int describeContents() {
return 0;

View File

@@ -118,9 +118,9 @@ public class RemoteAnimationDefinition implements Parcelable {
* To be called by system_server to keep track which pid is running the remote animations inside
* this definition.
*/
public void setCallingPid(int pid) {
public void setCallingPidUid(int pid, int uid) {
for (int i = mTransitionAnimationMap.size() - 1; i >= 0; i--) {
mTransitionAnimationMap.valueAt(i).adapter.setCallingPid(pid);
mTransitionAnimationMap.valueAt(i).adapter.setCallingPidUid(pid, uid);
}
}