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

Commit c58e44d2 authored by Benjamin Franz's avatar Benjamin Franz Committed by The Android Automerger
Browse files

Revert "Read default confirm credentials title from policy"

This reverts commit 6e2821dc.

Bug: 26895493

Change-Id: I27e7199dc25d423219d966f9f2cbd671bbf094c7
parent 32b2e1fe
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -19,8 +19,6 @@ package com.android.settings;

import android.app.Activity;
import android.app.KeyguardManager;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.Bundle;
@@ -74,10 +72,6 @@ public class ConfirmDeviceCredentialActivity extends Activity {
                Log.e(TAG, "Invalid intent extra", se);
            }
        }
        // if the client app did not hand in a title, we check whether there is a policy setting it
        if (title == null) {
            title = getTitleFromOrganizationName(userId);
        }
        ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(this);
        if (!helper.launchConfirmationActivity(0 /* request code */, null /* title */, title,
                details, false /* returnCredentials */, true /* isExternal */, userId)) {
@@ -90,10 +84,4 @@ public class ConfirmDeviceCredentialActivity extends Activity {
    private boolean isInternalActivity() {
        return this instanceof ConfirmDeviceCredentialActivity.InternalActivity;
    }

    private String getTitleFromOrganizationName(int userId) {
        DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(
                Context.DEVICE_POLICY_SERVICE);
        return (dpm != null) ? dpm.getOrganizationNameForUser(userId) : null;
    }
}