Icons (pictures) of complications are not displayed
Irriius opened this issue · 3 comments
The correct display of icons does not work on this dial. For example, if the complication of the Moon Phase is selected (where images of the moon are used) Then instead of the moon there is an empty space.
Also, if a complication is set for the background of the dial, it also does not replace the background.
Log for exaple...
2021-11-20 02:06:19.606 9118-9118/com.vlad1m1r.watchface E/Icon: Unable to find pkg=de.ludetis.wear2moonphase for icon Icon(typ=RESOURCE pkg=de.ludetis.wear2moonphase id=0x7f08003e)
android.content.pm.PackageManager$NameNotFoundException: de.ludetis.wear2moonphase
at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:436)
at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:425)
at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:366)
at android.graphics.drawable.Icon.loadDrawable(Icon.java:334)
at android.widget.ImageView.setImageIcon(ImageView.java:618)
at com.vlad1m1r.watchface.settings.complications.picker.ComplicationPickerActivity.setComplication(ComplicationPickerActivity.kt:130)
at com.vlad1m1r.watchface.settings.complications.picker.ComplicationPickerActivity.updateComplicationViews(ComplicationPickerActivity.kt:112)
at com.vlad1m1r.watchface.settings.complications.picker.ComplicationPickerActivity.onCreate$lambda-5(ComplicationPickerActivity.kt:78)
at com.vlad1m1r.watchface.settings.complications.picker.ComplicationPickerActivity.$r8$lambda$OvoFmNp9Cizod5ABTlwLD0i_zVs(Unknown Source:0)
at com.vlad1m1r.watchface.settings.complications.picker.ComplicationPickerActivity$$ExternalSyntheticLambda0.onActivityResult(Unknown Source:4)
I tried to add this:
uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
And that solved the problem of loading Icons and Watch Face Backgrounds from a third party complication. That is, the problem is at the level of requesting permissions from third-party complications.
Thank you very much for opening the issue! :) I have created a pull request with the changes that you proposed.
The fix will be available in a couple of days in the next release.
I will have to remove QUERY_ALL_PACKAGES permission in the next version of the app to comply with Google's policies, so I will have to add packages manually. If you notice that something isn't working, ping me and I will add missing packages.