Closed YaoTouGe closed 4 months ago
Have you tried with just android:theme="@android:style/Theme.NoTitleBar
(i.e. no Translucent
part)? Different Android spins react to this theme in slightly different ways, so we need to minimise the changes.
Yeh I don't mind adding a workaround for broken devices in principle, but it needs to be non-invasive (which this is) and have minimal or zero impact on working devices. Can you clarify exactly what changes with this PR? On your device I know there's no comparison exactly if it crashed before, but what about on a working device?
@cmannett85-arm I have tried android:theme="@android:style/Theme.NoTitleBar
, it also works and I have changed my commit.
@baldurk What I'm changing is the theme style of android server app (renderdoccmd) which is responsible for instrumenting graphics api so renderdoc can capture and replay on android device.
Currently on Harmony OS devices, when renderdoc is launching the server app, it will crash and says it can't find the drawable icon resource so launch failed, and renderdoc can't be used on these devices.
After trying some methods, I found that if I set the android theme style to NoTitleBar, this problem is fixed. So I suspect that some thing is wrong on Harmony OS when loading icon resource for the app title bar. But actually renderdoccmd is a full screen app and it seems have no tiltle bar at all on other working android devices, so I think this style change is fine for devices which is already working correctly.
I have also tested this change on a few other android devices, they are still working correctly not been affected by this change.
Description
Hi baldurk!
I was trying to make renderdoc working on Huawei devices again in the last few days.
On Huawei mobile phone with HarmonyOS, it seems to crash when renderdoccmd's native activity is starting up and with weird crash stack says drawable icon resource is not found as described in #3091
It seems to be caused by the title bar which is trying to load icon but failed on Huawei device only for some reason. I'm not an android expert but after trying various ways, it may be fixed by specify the activity style to NoTiltleBar.
I know this is a device specific problem which is annoying, maybe Huawei should fix this problem, but it's hard to make them realize this problem I guess.
Really hope I can use renderdoc on Huawei devices again :)