Merge "add sensitive content protection flag to developer option" into main
diff --git a/src/com/android/settings/development/SensitiveContentProtectionPreferenceController.kt b/src/com/android/settings/development/SensitiveContentProtectionPreferenceController.kt
index e627f81..8acd700 100644
--- a/src/com/android/settings/development/SensitiveContentProtectionPreferenceController.kt
+++ b/src/com/android/settings/development/SensitiveContentProtectionPreferenceController.kt
@@ -18,6 +18,7 @@
 import android.content.Context
 import android.permission.flags.Flags.sensitiveNotificationAppProtection
 import android.provider.Settings
+import android.view.flags.Flags.sensitiveContentAppProtection
 import androidx.annotation.VisibleForTesting
 import androidx.preference.Preference
 import androidx.preference.TwoStatePreference
@@ -64,6 +65,7 @@
 
     override fun isAvailable(): Boolean {
         return sensitiveNotificationAppProtection() || screenshareNotificationHiding()
+            || sensitiveContentAppProtection()
     }
 
     companion object {
diff --git a/tests/spa_unit/src/com/android/settings/development/SensitiveContentProtectionPreferenceControllerTest.kt b/tests/spa_unit/src/com/android/settings/development/SensitiveContentProtectionPreferenceControllerTest.kt
index 18acbba..023572b 100644
--- a/tests/spa_unit/src/com/android/settings/development/SensitiveContentProtectionPreferenceControllerTest.kt
+++ b/tests/spa_unit/src/com/android/settings/development/SensitiveContentProtectionPreferenceControllerTest.kt
@@ -22,6 +22,7 @@
 import android.platform.test.flag.junit.DeviceFlagsValueProvider
 import android.provider.Settings
 import android.provider.Settings.Global.DISABLE_SCREEN_SHARE_PROTECTIONS_FOR_APPS_AND_NOTIFICATIONS
+import android.view.flags.Flags.FLAG_SENSITIVE_CONTENT_APP_PROTECTION
 import androidx.preference.Preference
 import androidx.preference.PreferenceScreen
 import androidx.preference.SwitchPreference
@@ -132,7 +133,8 @@
     @Test
     @RequiresFlagsDisabled(
         FLAG_SENSITIVE_NOTIFICATION_APP_PROTECTION,
-        FLAG_SCREENSHARE_NOTIFICATION_HIDING)
+        FLAG_SCREENSHARE_NOTIFICATION_HIDING,
+        FLAG_SENSITIVE_CONTENT_APP_PROTECTION)
     fun isAvailable_flagsDisabled_returnFalse() {
         assertFalse(controller.isAvailable)
     }
@@ -148,4 +150,10 @@
     fun isAvailable_screenshareNotificationHidingEnabled_returnTrue() {
         assertTrue(controller.isAvailable)
     }
-}
\ No newline at end of file
+
+    @Test
+    @RequiresFlagsEnabled(FLAG_SENSITIVE_CONTENT_APP_PROTECTION)
+    fun isAvailable_screenshareSensitiveContentHidingEnabled_returnTrue() {
+        assertTrue(controller.isAvailable)
+    }
+}