mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Revert^2 "Unifying various model update callbacks into one"
72f9943f64
Change-Id: I38901714947a2b7926723ea25df4a2b8216303e4
This commit is contained in:
@@ -228,10 +228,9 @@ public class ItemClickHandler {
|
||||
private static void onClickPendingAppItem(View v, Launcher launcher, String packageName,
|
||||
boolean downloadStarted) {
|
||||
ItemInfo item = (ItemInfo) v.getTag();
|
||||
CompletableFuture<SessionInfo> siFuture;
|
||||
siFuture = CompletableFuture.supplyAsync(() ->
|
||||
InstallSessionHelper.INSTANCE.get(launcher)
|
||||
.getActiveSessionInfo(item.user, packageName),
|
||||
CompletableFuture<SessionInfo> siFuture = CompletableFuture.supplyAsync(() ->
|
||||
InstallSessionHelper.INSTANCE.get(launcher)
|
||||
.getActiveSessionInfo(item.user, packageName),
|
||||
UI_HELPER_EXECUTOR);
|
||||
Consumer<SessionInfo> marketLaunchAction = sessionInfo -> {
|
||||
if (sessionInfo != null) {
|
||||
@@ -245,8 +244,8 @@ public class ItemClickHandler {
|
||||
}
|
||||
}
|
||||
// Fallback to using custom market intent.
|
||||
Intent intent = ApiWrapper.INSTANCE.get(launcher).getAppMarketActivityIntent(
|
||||
packageName, Process.myUserHandle());
|
||||
Intent intent = ApiWrapper.INSTANCE.get(launcher).getMarketSearchIntent(
|
||||
packageName, item.user);
|
||||
launcher.startActivitySafely(v, intent, item);
|
||||
};
|
||||
|
||||
@@ -358,9 +357,7 @@ public class ItemClickHandler {
|
||||
// Check for abandoned promise
|
||||
if ((v instanceof BubbleTextView) && shortcut.hasPromiseIconUi()
|
||||
&& (!Flags.enableSupportForArchiving() || !shortcut.isArchived())) {
|
||||
String packageName = shortcut.getIntent().getComponent() != null
|
||||
? shortcut.getIntent().getComponent().getPackageName()
|
||||
: shortcut.getIntent().getPackage();
|
||||
String packageName = shortcut.getTargetPackage();
|
||||
if (!TextUtils.isEmpty(packageName)) {
|
||||
onClickPendingAppItem(
|
||||
v,
|
||||
|
||||
Reference in New Issue
Block a user