Add settings for individual NAS components

Test: robotest
Bug: 127825514
Change-Id: I4359bb548d10b39652bb8c263fa685d595d7a9ea
This commit is contained in:
Julia Reynolds
2019-03-19 14:51:44 -04:00
parent dc7683b3a4
commit 05eff1c6a7
5 changed files with 289 additions and 0 deletions

View File

@@ -339,6 +339,27 @@ public class NotificationBackend {
}
}
public void allowAssistantCapability(String capability, boolean allowed) {
try {
if (allowed) {
sINM.allowAssistantCapability(capability);
} else {
sINM.disallowAssistantCapability(capability);
}
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
}
}
public List<String> getAssistantCapabilities(String pkg) {
try {
return sINM.getAllowedAssistantCapabilities(pkg);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
}
return new ArrayList<>();
}
protected void recordAggregatedUsageEvents(Context context, AppRow appRow) {
long now = System.currentTimeMillis();
long startTime = now - (DateUtils.DAY_IN_MILLIS * DAYS_TO_CHECK);