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

Commit 633c7969 authored by Hai Zhang's avatar Hai Zhang
Browse files

Add SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS for role UI.

Bug: 124452117
Test: build
Change-Id: I7f15f53a2b478f038880a4be12d1884aff16ff97
parent d2d08d32
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.os.Bundle;
import android.os.Process;
import android.os.UserHandle;
import android.util.Log;
import android.view.WindowManager;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -58,6 +59,9 @@ public class DefaultAppActivity extends FragmentActivity {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getWindow().addSystemFlags(
                WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        Intent intent = getIntent();
        String roleName = intent.getStringExtra(Intent.EXTRA_ROLE_NAME);
        UserHandle user = intent.getParcelableExtra(Intent.EXTRA_USER);
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.packageinstaller.role.ui;

import android.os.Bundle;
import android.view.WindowManager;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;
@@ -30,6 +31,9 @@ public class DefaultAppListActivity extends FragmentActivity {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getWindow().addSystemFlags(
                WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        if (savedInstanceState == null) {
            DefaultAppListFragment fragment = DefaultAppListFragment.newInstance();
            getSupportFragmentManager().beginTransaction()
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.WindowManager;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -53,6 +54,9 @@ public class SpecialAppAccessActivity extends FragmentActivity {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getWindow().addSystemFlags(
                WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        String roleName = getIntent().getStringExtra(Intent.EXTRA_ROLE_NAME);

        Role role = Roles.get(this).get(roleName);
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.packageinstaller.role.ui;

import android.os.Bundle;
import android.view.WindowManager;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;
@@ -30,6 +31,9 @@ public class SpecialAppAccessListActivity extends FragmentActivity {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getWindow().addSystemFlags(
                WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        if (savedInstanceState == null) {
            SpecialAppAccessListFragment fragment = SpecialAppAccessListFragment.newInstance();
            getSupportFragmentManager().beginTransaction()