mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Fix SDK guard
Use dev-friendly utility instead of Build version codes. Bug: 169042867 Test: manual Change-Id: I528bafdcad8644e6f96caf5ada4f44ed2b8dff06
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user