mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Cleanup API checks for P, Q, and R.
Test: Build with gradle Flag: NA Change-Id: I3ef17090741d14bebd76cf09cf3dc5ac4f11e686
This commit is contained in:
@@ -189,16 +189,12 @@ public class ItemClickHandler {
|
||||
boolean downloadStarted) {
|
||||
ItemInfo item = (ItemInfo) v.getTag();
|
||||
CompletableFuture<SessionInfo> siFuture;
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
siFuture = CompletableFuture.supplyAsync(() ->
|
||||
InstallSessionHelper.INSTANCE.get(launcher)
|
||||
.getActiveSessionInfo(item.user, packageName),
|
||||
UI_HELPER_EXECUTOR);
|
||||
} else {
|
||||
siFuture = CompletableFuture.completedFuture(null);
|
||||
}
|
||||
siFuture = CompletableFuture.supplyAsync(() ->
|
||||
InstallSessionHelper.INSTANCE.get(launcher)
|
||||
.getActiveSessionInfo(item.user, packageName),
|
||||
UI_HELPER_EXECUTOR);
|
||||
Consumer<SessionInfo> marketLaunchAction = sessionInfo -> {
|
||||
if (sessionInfo != null && Utilities.ATLEAST_Q) {
|
||||
if (sessionInfo != null) {
|
||||
LauncherApps launcherApps = launcher.getSystemService(LauncherApps.class);
|
||||
try {
|
||||
launcherApps.startPackageInstallerSessionDetailsActivity(sessionInfo, null,
|
||||
|
||||
Reference in New Issue
Block a user