Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c3ba517 authored by Ivan Podogov's avatar Ivan Podogov
Browse files

Use AOSP intent for Work Policy Info

Bug: 134391103
Test: make, GTS, robotest
Change-Id: I8870621538aa7d2d4a5313efdf41119fd36daee5
parent 7d744c8f
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -415,9 +415,6 @@
    <!-- List containing the injected tile keys which are suppressed. -->
    <string-array name="config_suppress_injected_tile_keys" translatable="false"/>

    <!-- "Show work policy info" intent action. TODO(b/134391103): Replace with final SystemAPI intent when it's available. -->
    <string name="config_work_policy_info_intent_action" translatable="false"/>

    <!-- Reset application package name -->
    <string-array name="config_reset_app_package_name" translatable="false">
        <item>com.android.systemui</item>
+2 −2
Original line number Diff line number Diff line
@@ -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);
+0 −3
Original line number Diff line number Diff line
@@ -24,7 +24,4 @@
    <!-- Fake dimen value for restricted icon size - needed to get around Robolectric
         issue loading framework hidden resources -->
    <dimen name="restricted_icon_size">24dp</dimen>

    <!-- Fake string to avoid empty intent action -->
    <string name="config_work_policy_info_intent_action" translatable="false">ACTION_SHOW_WORK_POLICY_INFO</string>
</resources>
+1 −2
Original line number Diff line number Diff line
@@ -422,8 +422,7 @@ public class EnterprisePrivacyFeatureProviderImplTest {

    private Intent addWorkPolicyInfoIntent(
            String packageName, boolean deviceOwner, boolean profileOwner) {
        Intent intent =
                new Intent(mResources.getString(R.string.config_work_policy_info_intent_action));
        Intent intent = new Intent(Settings.ACTION_SHOW_WORK_POLICY_INFO);
        intent.setPackage(packageName);
        ResolveInfo resolveInfo = new ResolveInfo();
        resolveInfo.resolvePackageName = packageName;