From f2f29ab20fddffa10cccb1c4781eb5d2a37955f6 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Fri, 17 Nov 2023 11:42:43 -0800 Subject: [PATCH] Flag guard the quarantined apps screen Ensure the screen itself is flag-guarded, not just the entry point in Developer Options. Fixes: 311724167 Test: m -j flash, ensure feature is off, search for quarantined in Settings search, ensure no results Change-Id: I4efaf1f7c6452d2ce6115f40fffa16963ee7c244 --- .../quarantine/QuarantinedAppsScreenController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/development/quarantine/QuarantinedAppsScreenController.java b/src/com/android/settings/development/quarantine/QuarantinedAppsScreenController.java index c3cb38dfe30..4d4834b6546 100644 --- a/src/com/android/settings/development/quarantine/QuarantinedAppsScreenController.java +++ b/src/com/android/settings/development/quarantine/QuarantinedAppsScreenController.java @@ -18,6 +18,7 @@ package com.android.settings.development.quarantine; import android.app.Application; import android.content.Context; +import android.content.pm.Flags; import android.content.pm.PackageManager; import android.content.pm.SuspendDialogInfo; import android.os.UserHandle; @@ -198,7 +199,7 @@ public class QuarantinedAppsScreenController extends BasePreferenceController im @Override public int getAvailabilityStatus() { - return AVAILABLE; + return Flags.quarantinedEnabled() ? AVAILABLE : CONDITIONALLY_UNAVAILABLE; } @Override