OSDN Git Service

Stop showing disclosure UI when isDisclosureEnabled is false.
authorRajeev Kumar <rajekumar@google.com>
Tue, 6 Aug 2019 19:02:47 +0000 (12:02 -0700)
committerRajeev Kumar <rajekumar@google.com>
Thu, 8 Aug 2019 03:09:38 +0000 (03:09 +0000)
Bug: 137395050
Change-Id: Ic7768f7d3306f5d9d5c5c988afda4e8710c4ccd0
Test: Manual tests

core/java/com/android/internal/app/AssistUtils.java
packages/SystemUI/src/com/android/systemui/assist/AssistManager.java

index fde01dd..750d698 100644 (file)
@@ -195,7 +195,7 @@ public class AssistUtils {
         return applicationInfo.isSystemApp() || applicationInfo.isUpdatedSystemApp();
     }
 
-    private static boolean isDisclosureEnabled(Context context) {
+    public static boolean isDisclosureEnabled(Context context) {
         return Settings.Secure.getInt(context.getContentResolver(),
                 Settings.Secure.ASSIST_DISCLOSURE_ENABLED, 0) != 0;
     }
index 38a90cf..c906240 100644 (file)
@@ -219,7 +219,7 @@ public class AssistManager implements ConfigurationChangedReceiver {
         intent.setComponent(assistComponent);
         intent.putExtras(args);
 
-        if (structureEnabled) {
+        if (structureEnabled && AssistUtils.isDisclosureEnabled(mContext)) {
             showDisclosure();
         }