Use the correct userId when checking if disabled by admin.
And when adding accounts if only one account type is possible and it is disabled by admin, show the admin support dialog. Bug: 26897250 Bug: 26767564 Change-Id: I5cca64491a100efc34307c45aa35c14412f043cd
This commit is contained in:
@@ -34,11 +34,14 @@ import android.widget.Toast;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settingslib.RestrictedLockUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static android.content.Intent.EXTRA_USER;
|
||||
|
||||
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
||||
|
||||
/**
|
||||
* Entry point Activity for account setup. Works as follows
|
||||
*
|
||||
@@ -171,6 +174,9 @@ public class AddAccountSettings extends Activity {
|
||||
switch (requestCode) {
|
||||
case CHOOSE_ACCOUNT_REQUEST:
|
||||
if (resultCode == RESULT_CANCELED) {
|
||||
if (data != null) {
|
||||
startActivityAsUser(data, mUserHandle);
|
||||
}
|
||||
setResult(resultCode);
|
||||
finish();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user