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

Fix crash when using icon theme with mask for unknown icons #1356

Closed
twouters opened this issue Jun 19, 2015 · 4 comments
Closed

Fix crash when using icon theme with mask for unknown icons #1356

twouters opened this issue Jun 19, 2015 · 4 comments

Comments

@twouters
Copy link

I've experienced crashes in openkeychain when using the icon theme provided by TwelF.

[snip]
W/StatusBarIconView(2244): Icon not found in 2130837623: 7f020077
W/StatusBarIconView(2244): No icon for slot org.sufficientlysecure.keychain/0x1
W/StatusBar(2244): removeNotification for unknown key: 0|org.sufficientlysecure.keychain|1|null|10101
D/NotificationService(954): onNotification error pkg=org.sufficientlysecure.keychain tag=null id=1; will crashApplication(uid=10101, pid=27442)
D/AndroidRuntime(27442): Shutting down VM
E/AndroidRuntime(27442): FATAL EXCEPTION: main
E/AndroidRuntime(27442): Process: org.sufficientlysecure.keychain:passphrase_cache, PID: 27442
E/AndroidRuntime(27442): android.app.RemoteServiceException: Bad notification posted from package org.sufficientlysecure.keychain: Couldn't create icon: StatusBarIcon(pkg=org.sufficientlysecure.keychainuser=0 id=0x7f020077 level=0 visible=true nu
m=0 )
E/AndroidRuntime(27442):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1484)
E/AndroidRuntime(27442):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(27442):     at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(27442):     at android.app.ActivityThread.main(ActivityThread.java:5289)
E/AndroidRuntime(27442):     at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(27442):     at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(27442):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime(27442):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
E/AndroidRuntime(27442):     at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:117)

This seems to be a rather common issue on mostly - if not only - cyanogenmod devices:

Apparently this is a known issue which has been reported on the TwelF issue tracker and a workaround(?) has been provided:

So you only have to change in the most common situation/for example

.setSmallIcon(R.drawable.ic_launcher)

to

.setSmallIcon(R.drawable.ic_stat_notify)
.setLargeIcon(Helpers.getBitmap(R.drawable.ic_launcher, getBaseContext()))

and add a simplified white icon as "ic_stat_notify.png".

@ghost
Copy link

ghost commented Jun 19, 2015

Ah, this would explain the endless crashes I've been experiencing! I'm running CM12 with TwelF.

I've just disabled TwelF and OK is now usable again.

Out of interest, where do you get those logs @twouters?

@twouters
Copy link
Author

@ribmo I've used catlog to catch those logs

@moparisthebest
Copy link
Contributor

Workarounds include disabling TwelF which isn't great, or applying my patch and building your own version of OpenKeychain. You can also install the apk I built/signed here but I wouldn't trust some random binary with my pgp key, so I wouldn't recommend you do that either.

dschuermann pushed a commit that referenced this issue Jun 24, 2015
New all-white status bar icon to fix issue #1356
@dschuermann
Copy link
Member

Fixed by #1360

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

3 participants