Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when adding widget #692

Open
niccokunzmann opened this issue Aug 8, 2022 · 4 comments
Open

Error when adding widget #692

niccokunzmann opened this issue Aug 8, 2022 · 4 comments

Comments

@niccokunzmann
Copy link

General Information

  • OpenLauncher Version: see log
  • Android Version: 6?
  • Custom ROM: None
  • Install Source: F-Droid!

Description

When I choose a widget myhackerspace (installed from android studio), it crashes.

Log

This is only needed for crashes or other issues you notice in your system logs from OpenLauncher.

Build version: 0.7.4 
Build date: 1980-01-01 00:00:00 
Current date: 2022-08-08 22:33:03 
Device: Motorola MotoG3 
 
Stack trace:  
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9848, result=-1, data=Intent { (has extras) }} to activity {com.benny.openlauncher/com.benny.openlauncher.activity.HomeActivity}: java.lang.SecurityException: Permission Denial: starting Intent { act=android.appwidget.action.APPWIDGET_CONFIGURE cmp=io.spaceapi.community.myhackerspace/.Widget_config (has extras) } from ProcessRecord{788346d 25564:com.benny.openlauncher/u0a268} (pid=25564, uid=10268) not exported from uid 10108
	at android.app.ActivityThread.deliverResults(ActivityThread.java:3720)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763)
	at android.app.ActivityThread.-wrap16(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5443)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: java.lang.SecurityException: Permission Denial: starting Intent { act=android.appwidget.action.APPWIDGET_CONFIGURE cmp=io.spaceapi.community.myhackerspace/.Widget_config (has extras) } from ProcessRecord{788346d 25564:com.benny.openlauncher/u0a268} (pid=25564, uid=10268) not exported from uid 10108
	at android.os.Parcel.readException(Parcel.java:1620)
	at android.os.Parcel.readException(Parcel.java:1573)
	at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:2679)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1574)
	at android.app.Activity.startActivityForResult(Activity.java:3934)
	at android.app.Activity.startActivityForResult(Activity.java:3894)
	at com.benny.openlauncher.activity.homeparts.HpDesktopOption.configureWidget(HpDesktopOption.java:79)
	at com.benny.openlauncher.activity.HomeActivity.onActivityResult(HomeActivity.java:487)
	at android.app.Activity.dispatchActivityResult(Activity.java:6470)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:3716)
	... 9 more

@gsantner
Copy link
Contributor

gsantner commented Aug 8, 2022

OpenLauncher is not active developed. If you need something, you need to do it on your own or find somebody to do it for you. Merge requests welcome.

@Ptitg
Copy link
Contributor

Ptitg commented Sep 4, 2022

I think that it is not a bug in OpenLauncher but in myhackerspace. Widget configuration activity must declare android:exported="true" in its AndroidManifest.xml.

@niccokunzmann
Copy link
Author

Uhhh...... Thanks!

@duongpt582
Copy link

// display dialog to confirm accept
if (!appWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, appWidgetInfo.provider, extras)) {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_BIND);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_PROVIDER, appWidgetInfo.provider);
_homeActivity.startActivityForResult(intent, REQUEST_BIND_APPWIDGET);
}

    if (appWidgetInfo.configure != null && appWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, appWidgetInfo.provider, extras)) {
        Intent intent2 = new Intent("android.appwidget.action.APPWIDGET_CONFIGURE");
        intent2.setComponent(appWidgetInfo.configure);
        intent2.putExtra("appWidgetId", appWidgetId);
        _homeActivity.startActivityForResult(intent2, REQUEST_CREATE_APPWIDGET);
    } else {
        createWidget(data);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants