BeoCode/Weather
Archived
6
0
Fork
You've already forked Weather
11

[FR] export WidgetConfigurationActivity #86

Open
opened 2023年10月16日 12:10:54 +02:00 by mello7tre · 0 comments

On same device custom launcher, if the WidgetConfigurationActivity is not exported, widget cannot be added to homescreen.
Problem is that launchers do not use startAppWidgetConfigureActivityForResult but simply startActivityForResult.
So you get error like:

Permission Denial: starting Intent { act=android.appwidget.action.APPWIDGET_CONFIG
URE cmp=de.beowulf.wetter/.widget.WidgetConfigurationActivity (has extras) } from ProcessRecord{a8cba08 4600:com.hmct.vision/u0a62} (pid
=4600, uid=10062) not exported from uid 10153

Describe the solution you'd like

Changing android:exported="false" to android:exported="true" solve the problem.

Additional context

 <activity
 android:name=".widget.WidgetConfigurationActivity"
 android:exported="false">
 <intent-filter>
 <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
 </intent-filter>
 </activity>
### Is your feature request related to a problem? Please describe. On same device custom launcher, if the WidgetConfigurationActivity is not exported, widget cannot be added to homescreen. Problem is that launchers do not use `startAppWidgetConfigureActivityForResult` but simply `startActivityForResult`. So you get error like: ``` Permission Denial: starting Intent { act=android.appwidget.action.APPWIDGET_CONFIG URE cmp=de.beowulf.wetter/.widget.WidgetConfigurationActivity (has extras) } from ProcessRecord{a8cba08 4600:com.hmct.vision/u0a62} (pid =4600, uid=10062) not exported from uid 10153 ``` <!--A clear and concise description of what the problem is, or which function is missing/you want.--> ### Describe the solution you'd like <!--A clear and concise description of what you want to happen.--> Changing `android:exported="false"` to `android:exported="true"` solve the problem. ### Additional context <!--Add any other context, screenshots or design suggestions about the feature request here.--> <activity android:name=".widget.WidgetConfigurationActivity" android:exported="false"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/> </intent-filter> </activity>
Commenting is not possible because the repository is archived.
No Branch/Tag specified
main
translation
3.21-pre1
3.20
3.20-pre2
3.20-pre1
3.19.1
3.19
3.18.1
3.18
3.17
3.17-pre2
3.17-pre1
3.16
3.16-pre1
3.15
3.15-pre1
3.14
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BeoCode/Weather#86
Reference in a new issue
BeoCode/Weather
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?