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

Commit 80021878 authored by Alexandra Gherghina's avatar Alexandra Gherghina Committed by Android (Google) Code Review
Browse files

Merge "Fix two potential NPEs in DeviceInfo"

parents 79cb5505 a4fcb440
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -110,11 +110,11 @@ public class DeviceOwner {
    }

    String getDeviceOwnerPackageName() {
        return mDeviceOwner.packageName;
        return mDeviceOwner != null ? mDeviceOwner.packageName : null;
    }

    String getDeviceOwnerName() {
        return mDeviceOwner.name;
        return mDeviceOwner != null ? mDeviceOwner.name : null;
    }

    void setDeviceOwner(String packageName, String ownerName) {
+1 −1
Original line number Diff line number Diff line
@@ -2828,7 +2828,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            return null;
        }
        synchronized (this) {
            if (mDeviceOwner != null) {
            if (mDeviceOwner != null && mDeviceOwner.hasDeviceOwner()) {
                return mDeviceOwner.getDeviceOwnerPackageName();
            }
        }