Verifier: Enable and disable non-market apps
A profile owner app may now set the INSTALL_NON_MARKET_APPS setting which
changes whether apps may request packages to be installed.
Bug: 16542504
Change-Id: Ie98c7b0789c530540b4691aa5a962883070a9001
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ByodFlowTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ByodFlowTestActivity.java
index b697be8..12aa37b 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ByodFlowTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ByodFlowTestActivity.java
@@ -75,6 +75,8 @@
private TestItem mDeviceAdminVisibleTest;
private TestItem mWorkAppVisibleTest;
private TestItem mCrossProfileIntentFiltersTest;
+ private TestItem mDisableNonMarketTest;
+ private TestItem mEnableNonMarketTest;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -179,6 +181,16 @@
}
};
+ mDisableNonMarketTest = new TestItem(this, R.string.provisioning_byod_nonmarket_deny,
+ R.string.provisioning_byod_nonmarket_deny_info,
+ new Intent(ByodHelperActivity.ACTION_INSTALL_APK)
+ .putExtra(ByodHelperActivity.EXTRA_ALLOW_NON_MARKET_APPS, false));
+
+ mEnableNonMarketTest = new TestItem(this, R.string.provisioning_byod_nonmarket_allow,
+ R.string.provisioning_byod_nonmarket_allow_info,
+ new Intent(ByodHelperActivity.ACTION_INSTALL_APK)
+ .putExtra(ByodHelperActivity.EXTRA_ALLOW_NON_MARKET_APPS, true));
+
Intent intent = new Intent(CrossProfileTestActivity.ACTION_CROSS_PROFILE);
Intent chooser = Intent.createChooser(intent, getResources().getString(R.string.provisioning_cross_profile_chooser));
mCrossProfileIntentFiltersTest = new TestItem(this,
@@ -191,6 +203,8 @@
mTests.add(mDeviceAdminVisibleTest);
mTests.add(mWorkAppVisibleTest);
mTests.add(mCrossProfileIntentFiltersTest);
+ mTests.add(mDisableNonMarketTest);
+ mTests.add(mEnableNonMarketTest);
}
@Override
@@ -389,5 +403,4 @@
return view;
}
}
-
}