Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ce4669b authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Make the icon of SplashScreenView non-focusable" into main

parents 6052151c ab3b0abc
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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;