Refactored TrustAgentUtils to allow agent check injection.
Notes: - TrustAgentUtils defined a method that allowed callers to determine if a Trust Agent package is allowed to provide trust. If it is, it adds it to the list of available trust agents that can be displayed in the Settings->Security screen. - The logic used to define what agents are permitted on the device can now be injected. Test: Ran 'm RunSettingsRoboTest' and added a new test for the TrustAgentFeatureProviderImpl. Bug: 34354635 Change-Id: I24c54c14bde26073ce6fa907379b86aae2841600
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.security;
|
||||
import android.content.Context;
|
||||
import android.support.v7.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.trustagent.TrustAgentManager;
|
||||
import com.android.settingslib.drawer.DashboardCategory;
|
||||
|
||||
|
||||
@@ -28,4 +29,7 @@ public interface SecurityFeatureProvider {
|
||||
/** Update preferences with data from associated tiles. */
|
||||
void updatePreferences(Context context, PreferenceScreen preferenceScreen,
|
||||
DashboardCategory dashboardCategory);
|
||||
|
||||
/** Returns the {@link TrustAgentManager} bound to this {@link SecurityFeatureProvider}. */
|
||||
TrustAgentManager getTrustAgentManager();
|
||||
}
|
||||
|
Reference in New Issue
Block a user