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

Commit 1388e5b4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE when display is not connected when onSecureWindowShown is called" into main

parents c92d93f8 7d75ee7b
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -301,6 +301,7 @@ final class VirtualDeviceImpl extends IVirtualDevice.Stub
            // if the secure window is shown on a non-secure virtual display.
            DisplayManager displayManager = mContext.getSystemService(DisplayManager.class);
            Display display = displayManager.getDisplay(displayId);
            if (display != null) {
                if ((display.getFlags() & Display.FLAG_SECURE) == 0) {
                    showToastWhereUidIsRunning(activityInfo.applicationInfo.uid,
                            com.android.internal.R.string.vdm_secure_window,
@@ -310,6 +311,10 @@ final class VirtualDeviceImpl extends IVirtualDevice.Stub
                            "virtual_devices.value_secure_window_blocked_count",
                            mAttributionSource.getUid());
                }
            } else {
                Slog.e(TAG, "Calling onSecureWindowShown on a non existent/connected display: "
                        + displayId);
            }
        }

        @Override