Wifi details - handle no profile owner
* If there is no profile owner, then do no call DPM method getProfileOwnerAsUser Bug: 158284193 Test: manual testing make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiDetailPreferenceController2Test Change-Id: Ief1f0b3aa6805d69fc14da8f87a90c9b12bef8c6
This commit is contained in:
@@ -142,8 +142,10 @@ public class WifiNetworkDetailsFragment2 extends DashboardFragment implements
|
|||||||
getContext().getSystemService(Context.USER_SERVICE);
|
getContext().getSystemService(Context.USER_SERVICE);
|
||||||
final int profileOwnerUserId = Utils.getManagedProfileId(
|
final int profileOwnerUserId = Utils.getManagedProfileId(
|
||||||
um, UserHandle.myUserId());
|
um, UserHandle.myUserId());
|
||||||
admin = new EnforcedAdmin(dpm.getProfileOwnerAsUser(profileOwnerUserId),
|
if (profileOwnerUserId != UserHandle.USER_NULL) {
|
||||||
null, UserHandle.of(profileOwnerUserId));
|
admin = new EnforcedAdmin(dpm.getProfileOwnerAsUser(profileOwnerUserId),
|
||||||
|
null, UserHandle.of(profileOwnerUserId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(getContext(), admin);
|
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(getContext(), admin);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user