Files
caizhixingandcaizhixing bf784dc6fb fix: survive a missing restriction bypass native library (#7484)
* fix: don't crash at startup when the restriction bypass lib is missing

Unseal.unseal() loads ChickenHook's libnrb.so. Repackaged APKs and
multi-open containers can fail to load it, in which case the call throws
UnsatisfiedLinkError (an Error) that catch (Exception) does not handle. This
runs from Application.onCreate(), so the process crash-loops forever.

Catch Exception | LinkageError. A failed unseal only disables the hidden API
exemption for that launch; other Errors (OOM, etc.) still propagate.

* fix: don't crash reading allowEnterPip when the restriction bypass is broken

getAllowEnterPip() uses RestrictionBypass below SDK 35. If the native bypass
library failed to load, the bypass class is permanently broken and any further
access throws LinkageError (ExceptionInInitializerError on the first touch,
NoClassDefFoundError afterwards), which catch (ReflectiveOperationException)
does not handle.

Return false (PIP not allowed) instead of crashing the transition.

---------

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-11-06 15:19:43 +08:00
..
2024-11-02 10:55:28 +08:00
2024-11-02 10:55:28 +08:00