Update work challenge header in Settings
* If organization name has been set for a managed profile, work challenge should display it as the header. Bug: 155274026 Test: manual testing Manual Testing Steps * Set up device with managed profile * Set organization name via TestDPC * Go Settings > Security > Work profile security and add a work profile lock * Select 'Work profile lock' and verify organization name is shown in header Change-Id: I83209383fd2cf9179c34ccfdf8c097c379ec933e
This commit is contained in:
@@ -159,6 +159,9 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||
ConfirmDeviceCredentialBaseFragment.HEADER_TEXT);
|
||||
CharSequence detailsMessage = intent.getCharSequenceExtra(
|
||||
ConfirmDeviceCredentialBaseFragment.DETAILS_TEXT);
|
||||
if (TextUtils.isEmpty(headerMessage) && mIsManagedProfile) {
|
||||
headerMessage = mDevicePolicyManager.getOrganizationNameForUser(mUserId);
|
||||
}
|
||||
if (TextUtils.isEmpty(headerMessage)) {
|
||||
headerMessage = getString(getDefaultHeader());
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@ import android.os.CountDownTimer;
|
||||
import android.os.SystemClock;
|
||||
import android.os.UserManager;
|
||||
import android.os.storage.StorageManager;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -136,6 +137,9 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
mDetailsText = intent.getCharSequenceExtra(
|
||||
ConfirmDeviceCredentialBaseFragment.DETAILS_TEXT);
|
||||
}
|
||||
if (TextUtils.isEmpty(mHeaderText) && mIsManagedProfile) {
|
||||
mHeaderText = mDevicePolicyManager.getOrganizationNameForUser(mUserId);
|
||||
}
|
||||
|
||||
mLockPatternView.setTactileFeedbackEnabled(
|
||||
mLockPatternUtils.isTactileFeedbackEnabled());
|
||||
|
Reference in New Issue
Block a user