Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
47c30459
Commit
47c30459
authored
Jan 14, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log full stack trace for unhandled exception
parent
dd50c19b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
App.kt
app/src/main/java/com/topjohnwu/magisk/core/App.kt
+8
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/core/App.kt
View file @
47c30459
...
@@ -27,6 +27,7 @@ import com.topjohnwu.superuser.Shell
...
@@ -27,6 +27,7 @@ import com.topjohnwu.superuser.Shell
import
org.koin.android.ext.koin.androidContext
import
org.koin.android.ext.koin.androidContext
import
org.koin.core.context.startKoin
import
org.koin.core.context.startKoin
import
timber.log.Timber
import
timber.log.Timber
import
kotlin.system.exitProcess
open
class
App
()
:
Application
()
{
open
class
App
()
:
Application
()
{
...
@@ -49,13 +50,19 @@ open class App() : Application() {
...
@@ -49,13 +50,19 @@ open class App() : Application() {
else
->
null
else
->
null
}
}
}
}
// Always log full stack trace with Timber
Timber
.
plant
(
Timber
.
DebugTree
())
Thread
.
setDefaultUncaughtExceptionHandler
{
_
,
e
->
Timber
.
e
(
e
)
exitProcess
(
1
)
}
}
}
override
fun
attachBaseContext
(
base
:
Context
)
{
override
fun
attachBaseContext
(
base
:
Context
)
{
// Basic setup
// Basic setup
if
(
BuildConfig
.
DEBUG
)
if
(
BuildConfig
.
DEBUG
)
MultiDex
.
install
(
base
)
MultiDex
.
install
(
base
)
Timber
.
plant
(
Timber
.
DebugTree
())
// Some context magic
// Some context magic
val
app
:
Application
val
app
:
Application
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment