mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 14:52:20 +00:00
Post startService() in onResume() as a possible fix to an Android P bug.
Got confirmation that the crash we're seeing is a bug, and this might be a possible workaround.
This commit is contained in:
@@ -384,6 +384,10 @@ public class Util {
|
||||
}
|
||||
}
|
||||
|
||||
public static void postToMain(final @NonNull Runnable runnable) {
|
||||
handler.post(runnable);
|
||||
}
|
||||
|
||||
public static void runOnMain(final @NonNull Runnable runnable) {
|
||||
if (isMainThread()) runnable.run();
|
||||
else handler.post(runnable);
|
||||
|
||||
Reference in New Issue
Block a user