Allow DPMs to restrict Remote Input on Keyguard

Change-Id: I84b90b4047129794f1397351f9c8624f0048ad41
Fixes: 26981262
This commit is contained in:
Adrian Roos
2016-05-11 15:49:20 -04:00
parent 43a4e5f4ea
commit 059b0fa060
8 changed files with 138 additions and 11 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.notification;
import android.app.admin.DevicePolicyManager;
import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
@@ -177,6 +178,9 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment {
KEYGUARD_DISABLE_SECURE_NOTIFICATIONS);
}
mLockscreen.setRemoteInputRestricted(RestrictedLockUtils.checkIfKeyguardFeaturesDisabled(
mContext, DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT, UserHandle.myUserId()));
mLockscreen.setEntries(entries.toArray(new CharSequence[entries.size()]));
mLockscreen.setEntryValues(values.toArray(new CharSequence[values.size()]));
updateLockscreenNotifications();
@@ -239,6 +243,10 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment {
KEYGUARD_DISABLE_SECURE_NOTIFICATIONS);
}
mLockscreen.setRemoteInputRestricted(RestrictedLockUtils.checkIfKeyguardFeaturesDisabled(
mContext, DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT,
mProfileChallengeUserId));
mLockscreenProfile.setEntries(entries.toArray(new CharSequence[entries.size()]));
mLockscreenProfile.setEntryValues(values.toArray(new CharSequence[values.size()]));
// Work profile does not support this settings as we do not have a policy to enforce it yet