Use AOSP intent for Work Policy Info

Bug: 134391103
Test: make, GTS, robotest
Change-Id: I8870621538aa7d2d4a5313efdf41119fd36daee5
This commit is contained in:
Ivan Podogov
2019-08-02 13:34:33 +01:00
parent 7d744c8f18
commit 2c3ba517fe
4 changed files with 3 additions and 10 deletions

View File

@@ -278,7 +278,7 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
// Only search for the required action in the Device Owner's package
final Intent intent =
new Intent(mResources.getString(R.string.config_work_policy_info_intent_action))
new Intent(Settings.ACTION_SHOW_WORK_POLICY_INFO)
.setPackage(ownerComponent.getPackageName())
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final List<ResolveInfo> activities = mPm.queryIntentActivities(intent, 0);
@@ -302,7 +302,7 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
// Only search for the required action in the Profile Owner's package
final Intent intent =
new Intent(mResources.getString(R.string.config_work_policy_info_intent_action))
new Intent(Settings.ACTION_SHOW_WORK_POLICY_INFO)
.setPackage(ownerComponent.getPackageName())
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final List<ResolveInfo> activities = mPm.queryIntentActivitiesAsUser(intent, 0, userId);