Don't show Pin option when an locked to app is active

Also isLockToAppEnabled is renamed to isScreenPinningEnabled

Bug: 72799389
Change-Id: I46d4c57e3719f7401887e79cbb7397e23f162e44
This commit is contained in:
Tony Wickham
2018-03-01 12:36:02 -08:00
parent 22ab784dd0
commit dd535466bf
2 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@@ -182,7 +182,11 @@ public class TaskSystemShortcut<T extends SystemShortcut> extends SystemShortcut
if (sysUiProxy == null) {
return null;
}
if (!ActivityManagerWrapper.getInstance().isLockToAppEnabled()) {
if (!ActivityManagerWrapper.getInstance().isScreenPinningEnabled()) {
return null;
}
if (ActivityManagerWrapper.getInstance().isLockToAppActive()) {
// We shouldn't be able to pin while an app is locked.
return null;
}
return view -> {