openlauncher icon indicating copy to clipboard operation
openlauncher copied to clipboard

Error when adding widget

Open niccokunzmann opened this issue 3 years ago • 4 comments

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

niccokunzmann avatar Aug 08 '22 21:08 niccokunzmann

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.

gsantner avatar Aug 08 '22 22:08 gsantner

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.

Ptitg avatar Sep 04 '22 09:09 Ptitg

Uhhh...... Thanks!

niccokunzmann avatar Sep 04 '22 19:09 niccokunzmann

// 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);
    }

duongpt582 avatar Dec 03 '22 03:12 duongpt582