OSDN Git Service

Do not allow elevating system_server priority for remote anim
authorJorim Jaggi <jjaggi@google.com>
Wed, 18 Apr 2018 16:17:56 +0000 (18:17 +0200)
committerJorim Jaggi <jjaggi@google.com>
Mon, 23 Apr 2018 16:42:09 +0000 (18:42 +0200)
Test: go/wm-smoke
Bug: 77908520
Change-Id: I45f47d73bedb7317c9e80907930f8d4d628f212a

services/core/java/com/android/server/am/ActivityManagerService.java

index c9dbd45..cad4b85 100644 (file)
@@ -14542,6 +14542,10 @@ public class ActivityManagerService extends IActivityManager.Stub
     }
 
     void setRunningRemoteAnimation(int pid, boolean runningRemoteAnimation) {
+        if (pid == Process.myPid()) {
+            Slog.wtf(TAG, "system can't run remote animation");
+            return;
+        }
         synchronized (ActivityManagerService.this) {
             final ProcessRecord pr;
             synchronized (mPidsSelfLocked) {