Revert "Unifying various model update callbacks into one"

Revert submission 31445615-model-callbacks

Reason for revert: <Droidmonitor crested revert due to b/393222548. Will be verified through ABTD for stanadard investigation.>

Reverted changes: /q/submissionid:31445615-model-callbacks

Change-Id: If6893a125756e5abfbb215af377576429bb1c91b
This commit is contained in:
Pechetty Sravani (xWF)
2025-01-29 22:46:49 -08:00
committed by Android (Google) Code Review
parent 36c3112abf
commit 72f9943f64
19 changed files with 369 additions and 441 deletions

View File

@@ -228,9 +228,10 @@ public class ItemClickHandler {
private static void onClickPendingAppItem(View v, Launcher launcher, String packageName,
boolean downloadStarted) {
ItemInfo item = (ItemInfo) v.getTag();
CompletableFuture<SessionInfo> siFuture = CompletableFuture.supplyAsync(() ->
InstallSessionHelper.INSTANCE.get(launcher)
.getActiveSessionInfo(item.user, packageName),
CompletableFuture<SessionInfo> siFuture;
siFuture = CompletableFuture.supplyAsync(() ->
InstallSessionHelper.INSTANCE.get(launcher)
.getActiveSessionInfo(item.user, packageName),
UI_HELPER_EXECUTOR);
Consumer<SessionInfo> marketLaunchAction = sessionInfo -> {
if (sessionInfo != null) {
@@ -244,8 +245,8 @@ public class ItemClickHandler {
}
}
// Fallback to using custom market intent.
Intent intent = ApiWrapper.INSTANCE.get(launcher).getMarketSearchIntent(
packageName, item.user);
Intent intent = ApiWrapper.INSTANCE.get(launcher).getAppMarketActivityIntent(
packageName, Process.myUserHandle());
launcher.startActivitySafely(v, intent, item);
};
@@ -357,7 +358,9 @@ public class ItemClickHandler {
// Check for abandoned promise
if ((v instanceof BubbleTextView) && shortcut.hasPromiseIconUi()
&& (!Flags.enableSupportForArchiving() || !shortcut.isArchived())) {
String packageName = shortcut.getTargetPackage();
String packageName = shortcut.getIntent().getComponent() != null
? shortcut.getIntent().getComponent().getPackageName()
: shortcut.getIntent().getPackage();
if (!TextUtils.isEmpty(packageName)) {
onClickPendingAppItem(
v,