Merge changes from topics "awickham-api-cleanup", "keyboard-on-back" into main

* changes:
  Cleanup API checks for P, Q, and R.
  Add a WindowInsetsAnimationCallback to listen to IME changes.
  Update minSdk to 30.
This commit is contained in:
Andy Wickham
2024-01-25 22:06:40 +00:00
committed by Android (Google) Code Review
70 changed files with 144 additions and 397 deletions
@@ -190,16 +190,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,