From 532be5f4e9e2e7f3ff6edb6e6e86c8e96b72cf1b Mon Sep 17 00:00:00 2001 From: mrulhania Date: Tue, 7 May 2024 13:53:04 -0700 Subject: [PATCH] mark developer settings page as sensitive Marking the view as sensitive will black out the screen during screen share. This will help prevent scammers using remote viewing apps disable the screen share protection option. Fix: 332918161 Test: manual verification of black screen during screen share Change-Id: Icaf0aacab5dc71a49c48f561f021af8b4e2d5211 --- .../development/DevelopmentSettingsDashboardFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java index c7074bf8390..38cd30b194b 100644 --- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java @@ -18,6 +18,7 @@ package com.android.settings.development; import static android.provider.Settings.Global.DEVELOPMENT_SETTINGS_ENABLED; import static android.service.quicksettings.TileService.ACTION_QS_TILE_PREFERENCES; +import static android.view.flags.Flags.sensitiveContentAppProtectionApi; import android.app.Activity; import android.app.UiModeManager; @@ -329,7 +330,12 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra adapter.getProfileProxy(getActivity(), mBluetoothA2dpServiceListener, BluetoothProfile.A2DP); } - return super.onCreateView(inflater, container, savedInstanceState); + View root = super.onCreateView(inflater, container, savedInstanceState); + // Mark the view sensitive to black out the screen during screen share. + if (sensitiveContentAppProtectionApi()) { + root.setContentSensitivity(View.CONTENT_SENSITIVITY_SENSITIVE); + } + return root; } @Override