Merge "Removing explicit target SDK for launcher" into udc-qpr-dev

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2023-06-27 22:34:40 +00:00
commit d5b3a0a099
12 files changed
+58 -17

No files matched your search

+12
View File
@@ -24,6 +24,7 @@ import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_TYPE_MA
import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.app.ActivityOptions;
import android.app.Person;
import android.app.WallpaperManager;
import android.content.Context;
@@ -560,6 +561,17 @@ public final class Utilities {
handler.sendMessage(msg);
}
/**
* 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.
*