Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 787dedce authored by Sooraj Sasindran's avatar Sooraj Sasindran
Browse files

Allow device owner to configure preferential network service

Bug: 226966328
Test: CTS
Change-Id: I8caddf5e47340ed51b287017e4d5ddf8113cfdaa
parent 5f50853c
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -8662,6 +8662,13 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        }
    }
    private boolean isDeviceOwnerUserId(int userId) {
        synchronized (getLockObject()) {
            return mOwners.hasDeviceOwner()
                    && mOwners.getDeviceOwnerUserId() == userId;
        }
    }
    private boolean isDeviceOwnerPackage(String packageName, int userId) {
        synchronized (getLockObject()) {
            return mOwners.hasDeviceOwner()
@@ -18394,7 +18401,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
    private void updateNetworkPreferenceForUser(int userId,
            List<PreferentialNetworkServiceConfig> preferentialNetworkServiceConfigs) {
        if (!isManagedProfile(userId)) {
        if (!isManagedProfile(userId) && !isDeviceOwnerUserId(userId)) {
            return;
        }
        List<ProfileNetworkPreference> preferences = new ArrayList<>();