From b034c8b4aea76979cf7bce841dbb627eec507d3d Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Mon, 15 Oct 2012 21:07:19 -0700 Subject: Fix Beam animation for non-owner user. The Beam animation adds a system window on top of the current window stack, and does this from a process run as the owner user. Added required permission that allows showing the window for all users. Also added a glClear() to fix a rendering glitch on Manta. Bug: 7351616 Bug: 7310663 Change-Id: I06960ee9d843c2413fcfd36a81bc7161fed5ef98 --- src/com/android/nfc/FireflyRenderer.java | 1 + src/com/android/nfc/SendUi.java | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src/com/android/nfc') diff --git a/src/com/android/nfc/FireflyRenderer.java b/src/com/android/nfc/FireflyRenderer.java index 4ce58b4..40c931d 100644 --- a/src/com/android/nfc/FireflyRenderer.java +++ b/src/com/android/nfc/FireflyRenderer.java @@ -200,6 +200,7 @@ public class FireflyRenderer { for (int i = 0; i < 3; i++) { // Call eglSwapBuffers 3 times - this will allocate the necessary // buffers, and make sure the animation looks smooth from the start. + mGL.glClear(GL10.GL_COLOR_BUFFER_BIT); if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) { Log.e(LOG_TAG, "Could not swap buffers"); mFinished = true; diff --git a/src/com/android/nfc/SendUi.java b/src/com/android/nfc/SendUi.java index c54f54e..a12aabb 100644 --- a/src/com/android/nfc/SendUi.java +++ b/src/com/android/nfc/SendUi.java @@ -194,6 +194,8 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener, | hwAccelerationFlags | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, PixelFormat.OPAQUE); + mWindowLayoutParams.privateFlags |= + WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; mWindowLayoutParams.token = new Binder(); mFrameCounterAnimator = new TimeAnimator(); -- cgit v1.1