Fix IllegalArgumentException when trying to repin a disabled shortcut

This commit is contained in:
Cameron Gutman
2020-03-21 13:25:55 -07:00
parent eefc08db47
commit 977a1d4a3c
2 changed files with 15 additions and 0 deletions

View File

@@ -192,4 +192,13 @@ public class ShortcutHelper {
}
}
}
public void enableAppShortcut(ComputerDetails computer, NvApp app) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
String id = getShortcutIdForGame(computer, app);
if (getInfoForId(id) != null) {
sm.enableShortcuts(Collections.singletonList(id));
}
}
}
}