Add Tapjacking Protection for SettingsHomepageActivity
Add/remove the SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS flag into/from SettingsHomepageActivity and SettingsPanelActivity with lifecycle. Bug: 138442483 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.homepage make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.panel manual test Change-Id: I72f9a947f57f74a8c09127d6c39173594c248ddc
This commit is contained in:
@@ -32,6 +32,7 @@ import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.HideNonSystemOverlayMixin;
|
||||
|
||||
/**
|
||||
* Dialog Activity to host Settings Slices.
|
||||
@@ -62,6 +63,7 @@ public class SettingsPanelActivity extends FragmentActivity {
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
createOrUpdatePanel(true /* shouldForceCreation */);
|
||||
getLifecycle().addObserver(new HideNonSystemOverlayMixin(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user