sys user split: first pass updating Settings
Update various places in Settings to use "admin" ueser flag instead of checking user id "0". This should be no-op in single user mode since the only admin user would be user 0. In split system user mode, this will correctly ACL admin user instead of non-interactive system user. Bug: 19913735 Change-Id: Ida4d59c5f689ea0dc34b3b3ff0822b087fa0afd6
This commit is contained in:
@@ -32,9 +32,8 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
@@ -206,7 +205,8 @@ public class Status extends InstrumentedPreferenceActivity {
|
||||
}
|
||||
|
||||
//Remove SimStatus and Imei for Secondary user as it access Phone b/19165700
|
||||
if (UserHandle.myUserId() != UserHandle.USER_OWNER) {
|
||||
//TODO: the bug above will surface in split system user mode.
|
||||
if (!UserManager.get(this).isAdminUser()) {
|
||||
removePreferenceFromScreen(KEY_SIM_STATUS);
|
||||
removePreferenceFromScreen(KEY_IMEI_INFO);
|
||||
}
|
||||
|
Reference in New Issue
Block a user