Require explicit userId in LockPatternUtils

Bug: 18931518
Change-Id: Ie2faa18918aaadf17a84287898438549a693b0cc
This commit is contained in:
Adrian Roos
2015-04-16 17:11:22 -07:00
parent bc95630994
commit 5437588abd
18 changed files with 112 additions and 69 deletions

View File

@@ -26,6 +26,7 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.os.UserHandle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.SwitchPreference;
@@ -191,7 +192,8 @@ public class AppNotificationSettings extends SettingsPreferenceFragment {
}
private void updateDependents(boolean banned) {
final boolean lockscreenSecure = new LockPatternUtils(getActivity()).isSecure();
final boolean lockscreenSecure = new LockPatternUtils(getActivity()).isSecure(
UserHandle.myUserId());
final boolean lockscreenNotificationsEnabled = getLockscreenNotificationsEnabled();
final boolean allowPrivate = getLockscreenAllowPrivateNotifications();