Merge "Fix SDK guard" into sc-dev am: e3403325a9

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14547190

Change-Id: I494905708ae56bfac778d4c9228a96774d58d203
This commit is contained in:
Cyrus Boadway
2021-05-17 21:06:35 +00:00
committed by Automerger Merge Worker
@@ -19,13 +19,13 @@ import android.app.ActivityOptions;
import android.app.ActivityTaskManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Build;
import android.os.RemoteException;
import android.util.Log;
import android.util.Pair;
import android.view.View;
import android.widget.RemoteViews;
import com.android.launcher3.Utilities;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.util.ActivityOptionsWrapper;
import com.android.launcher3.widget.LauncherAppWidgetHostView;
@@ -41,6 +41,7 @@ class QuickstepInteractionHandler implements RemoteViews.InteractionHandler {
mLauncher = launcher;
}
@SuppressWarnings("NewApi")
@Override
public boolean onInteraction(View view, PendingIntent pendingIntent,
RemoteViews.RemoteResponse remoteResponse) {
@@ -53,7 +54,7 @@ class QuickstepInteractionHandler implements RemoteViews.InteractionHandler {
Pair<Intent, ActivityOptions> options = remoteResponse.getLaunchOptions(hostView);
ActivityOptionsWrapper activityOptions = mLauncher.getAppTransitionManager()
.getActivityLaunchOptions(mLauncher, hostView);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && !pendingIntent.isActivity()) {
if (Utilities.ATLEAST_S && !pendingIntent.isActivity()) {
// In the event this pending intent eventually launches an activity, i.e. a trampoline,
// use the Quickstep transition animation.
try {