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

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

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.
*