diff options
| author | 2024-01-15 07:06:10 +0000 | |
|---|---|---|
| committer | 2024-01-15 07:06:10 +0000 | |
| commit | 6f73553a084002cf2a073fd3344d005d4327901d (patch) | |
| tree | 86d75c960688832846f11270e86419697c348a79 | |
| parent | c9b8fd51f751a6cd4a1e18186ed482e64e9e3554 (diff) | |
| parent | 7104bd817a5913ac8e09063850a24792fad61fd0 (diff) | |
Merge "Make the icon of SplashScreenView non-focusable" into main am: 7104bd817a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2909857
Change-Id: If01210d034b44d79a33101ebdfb4805a50576931
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | core/java/android/window/SplashScreenView.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/window/SplashScreenView.java b/core/java/android/window/SplashScreenView.java index bdaad2b68fc2..473b814fc4a7 100644 --- a/core/java/android/window/SplashScreenView.java +++ b/core/java/android/window/SplashScreenView.java @@ -47,6 +47,7 @@ import android.view.SurfaceView; import android.view.View; import android.view.ViewGroup; import android.view.Window; +import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.ImageView; @@ -337,7 +338,14 @@ public final class SplashScreenView extends FrameLayout { "SplashScreenView"); ImageView imageView = new ImageView(viewContext); imageView.setBackground(mIconDrawable); - viewHost.setView(imageView, mIconSize, mIconSize); + final int windowFlag = WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE + | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE + | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; + final WindowManager.LayoutParams lp = + new WindowManager.LayoutParams(mIconSize, mIconSize, + WindowManager.LayoutParams.TYPE_APPLICATION, windowFlag, + PixelFormat.TRANSPARENT); + viewHost.setView(imageView, lp); SurfaceControlViewHost.SurfacePackage surfacePackage = viewHost.getSurfacePackage(); surfaceView.setChildSurfacePackage(surfacePackage); view.mSurfacePackage = surfacePackage; |