Removing explicit target SDK for launcher
> It will automatically target the latest SDK it was compiled with
Bug: 284349887
Test: Presubmit and manual
Flag: N/A
Change-Id: I32629b0dd710c3c04d8f70f988b7279e7cae6731
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 709c57c..46fe73e 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -24,6 +24,7 @@
import android.annotation.TargetApi;
import android.app.ActivityManager;
+import android.app.ActivityOptions;
import android.app.Person;
import android.app.WallpaperManager;
import android.content.Context;
@@ -561,6 +562,17 @@
}
/**
+ * Utility method to allow background activity launch for the provided activity options
+ */
+ public static ActivityOptions allowBGLaunch(ActivityOptions options) {
+ if (ATLEAST_U) {
+ options.setPendingIntentBackgroundActivityStartMode(
+ ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
+ }
+ return options;
+ }
+
+ /**
* Returns the full drawable for info without any flattening or pre-processing.
*
* @param shouldThemeIcon If true, will theme icons when applicable