Stop showing disclosure UI when isDisclosureEnabled is false.

Bug: 137395050
Change-Id: Ic7768f7d3306f5d9d5c5c988afda4e8710c4ccd0
Test: Manual tests
This commit is contained in:
Rajeev Kumar
2019-08-06 12:02:47 -07:00
parent d7f82d5766
commit cd497ef6f3
2 changed files with 2 additions and 2 deletions

View 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;
}

View File

@@ -219,7 +219,7 @@ public class AssistManager implements ConfigurationChangedReceiver {
intent.setComponent(assistComponent);
intent.putExtras(args);
if (structureEnabled) {
if (structureEnabled && AssistUtils.isDisclosureEnabled(mContext)) {
showDisclosure();
}