From 2c42c79482554320bc8f5d0f02c6cd6c74bc17ba Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 24 Dec 2018 21:04:58 +0800 Subject: [PATCH] Fix crashes on OOS --- core/src/main/java/com/topjohnwu/core/App.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/topjohnwu/core/App.java b/core/src/main/java/com/topjohnwu/core/App.java index d19d7e0e8..b133768f4 100644 --- a/core/src/main/java/com/topjohnwu/core/App.java +++ b/core/src/main/java/com/topjohnwu/core/App.java @@ -1,5 +1,6 @@ package com.topjohnwu.core; +import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; @@ -32,8 +33,9 @@ public class App extends ContainerApp { } @Override - public void onCreate() { - super.onCreate(); + protected void attachBaseContext(Context base) { + super.attachBaseContext(base); + mResource = base.getResources(); Shell.Config.setFlags(Shell.FLAG_MOUNT_MASTER); Shell.Config.verboseLogging(BuildConfig.DEBUG);