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

Commit 435ec6e6 authored by Michal Karpinski's avatar Michal Karpinski
Browse files

Adjusting getTitleFromOrganizationName() after API changes

Bug: 27531295
Change-Id: I566aae079451ea3d001fd517f5fafc0991f55ad2
parent 2b77d746
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -95,6 +95,8 @@ public class ConfirmDeviceCredentialActivity extends Activity {
    private String getTitleFromOrganizationName(int userId) {
        DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(
                Context.DEVICE_POLICY_SERVICE);
        return (dpm != null) ? dpm.getOrganizationNameForUser(userId) : null;
        CharSequence organizationNameForUser = (dpm != null)
                ? dpm.getOrganizationNameForUser(userId) : null;
        return organizationNameForUser != null ? organizationNameForUser.toString() : null;
    }
}