diff options
| author | Jim Miller <jaggies@google.com> | 2014-11-17 19:28:59 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-17 19:29:01 +0000 |
| commit | cd75f59f8cdeda95a50155ad0c9f4abd559037ec (patch) | |
| tree | 0d1c0578a71f9ce735f9d05d11b0c593c31449ea /packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java | |
| parent | 465e996776d916d8d1b62c539142827bd96a42bc (diff) | |
| parent | 96afb6f03b87359c3bcb96c2bdb8aadc7b1c3c37 (diff) | |
| download | frameworks_base-cd75f59f8cdeda95a50155ad0c9f4abd559037ec.zip frameworks_base-cd75f59f8cdeda95a50155ad0c9f4abd559037ec.tar.gz frameworks_base-cd75f59f8cdeda95a50155ad0c9f4abd559037ec.tar.bz2 | |
Merge "Fix deadlock caused by synchronous setOccluded() method in keyguard" into lmp-mr1-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java')
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java index ee699d2..98d4112 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java @@ -22,6 +22,7 @@ import android.os.Binder; import android.os.Bundle; import android.os.Debug; import android.os.IBinder; +import android.os.Process; import android.util.Log; import android.view.MotionEvent; @@ -52,6 +53,10 @@ public class KeyguardService extends Service { } void checkPermission() { + // Avoid deadlock by avoiding calling back into the system process. + if (Binder.getCallingUid() == Process.SYSTEM_UID) return; + + // Otherwise,explicitly check for caller permission ... if (getBaseContext().checkCallingOrSelfPermission(PERMISSION) != PERMISSION_GRANTED) { Log.w(TAG, "Caller needs permission '" + PERMISSION + "' to call " + Debug.getCaller()); throw new SecurityException("Access denied to process: " + Binder.getCallingPid() |
