Fixed configuring widget in A10
Lawnchair (Debug) bug report Jan 28, 2024 4:43:00 PM version: 14 Dev (b585d3f) (14) commit:b585d3fbuild.brand: Xiaomi build.device: vince build.display: QQ3A.200805.001 build.fingerprint: google/angler/angler:7.1.2/N2G47H/3783593:user/release-keys build.hardware: qcom build.id: QQ3A.200805.001 build.manufacturer: Xiaomi build.model: Redmi 5 Plus build.security.level: 2023-04-05 build.product: qassa_vince build.type: user version.codename: REL version.incremental: 92d526381b version.release: 10 version.sdk_int: 29 display.density_dpi: 440 isRecentsEnabled: true error: Uncaught exception java.lang.NoSuchMethodError: No virtual method setPendingIntentBackgroundActivityStartMode(I)Landroid/app/ActivityOptions; in class Landroid/app/ActivityOptions; or its super classes (declaration of 'android.app.ActivityOptions' appears in /system/framework/framework.jar) at com.android.launcher3.widget.LauncherWidgetHolder.getConfigurationActivityOptions(LauncherWidgetHolder.java:299) at com.android.launcher3.widget.LauncherWidgetHolder.startConfigActivity(LauncherWidgetHolder.java:261) at com.android.launcher3.AppWidgetResizeFrame.lambda$setupForWidget$1(AppWidgetResizeFrame.java:255) at com.android.launcher3.AppWidgetResizeFrame.$r8$lambda$Qz8LgkHxjFnttBxFiB7ge472N5c(Unknown Source:0) at com.android.launcher3.AppWidgetResizeFrame$$ExternalSyntheticLambda3.onClick(Unknown Source:2) at android.view.View.performClick(View.java:7266) at android.view.View.performClickInternal(View.java:7243) at android.view.View.access$3600(View.java:801) at android.view.View$PerformClick.run(View.java:27904) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7396) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
This commit is contained in:
@@ -272,9 +272,7 @@ public class LauncherWidgetHolder {
|
||||
|
||||
private Bundle getDefaultConfigurationActivityOptions() {
|
||||
// Must allow background activity start for U.
|
||||
return ActivityOptions.makeBasic()
|
||||
.setPendingIntentBackgroundActivityStartMode(
|
||||
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
|
||||
return Utilities.allowBGLaunch(ActivityOptions.makeBasic())
|
||||
.toBundle();
|
||||
}
|
||||
|
||||
@@ -296,8 +294,7 @@ public class LauncherWidgetHolder {
|
||||
return getDefaultConfigurationActivityOptions();
|
||||
ActivityOptionsWrapper activityOptionsWrapper = activity.getActivityLaunchOptions(view, (ItemInfo) tag);
|
||||
// Must allow background activity start for U.
|
||||
activityOptionsWrapper.options.setPendingIntentBackgroundActivityStartMode(
|
||||
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
|
||||
Utilities.allowBGLaunch(activityOptionsWrapper.options);
|
||||
Bundle bundle = activityOptionsWrapper.toBundle();
|
||||
bundle.putInt(KEY_SPLASH_SCREEN_STYLE, SPLASH_SCREEN_STYLE_EMPTY);
|
||||
return bundle;
|
||||
|
||||
Reference in New Issue
Block a user