Merge "RESTRICT AUTOMERGE Restrict Settings Homepage prior to provisioning" into udc-dev
This commit is contained in:
@@ -175,6 +175,16 @@ public class SettingsHomepageActivity extends FragmentActivity implements
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// Ensure device is provisioned in order to access Settings home
|
||||||
|
// TODO(b/331254029): This should later be replaced in favor of an allowlist
|
||||||
|
boolean unprovisioned = android.provider.Settings.Global.getInt(getContentResolver(),
|
||||||
|
android.provider.Settings.Global.DEVICE_PROVISIONED, 0) == 0;
|
||||||
|
if (unprovisioned) {
|
||||||
|
Log.e(TAG, "Device is not provisioned, exiting Settings");
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mIsEmbeddingActivityEnabled = ActivityEmbeddingUtils.isEmbeddingActivityEnabled(this);
|
mIsEmbeddingActivityEnabled = ActivityEmbeddingUtils.isEmbeddingActivityEnabled(this);
|
||||||
if (mIsEmbeddingActivityEnabled) {
|
if (mIsEmbeddingActivityEnabled) {
|
||||||
final UserManager um = getSystemService(UserManager.class);
|
final UserManager um = getSystemService(UserManager.class);
|
||||||
|
Reference in New Issue
Block a user