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

Commit 6f73553a authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Make the icon of SplashScreenView non-focusable" into main am: 7104bd81

parents c9b8fd51 7104bd81
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;