Created
February 22, 2019 00:20
-
-
Save talenguyen/71a635ecd0654318d12cdf893323b886 to your computer and use it in GitHub Desktop.
Declare StrictMode to detect performance issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App: Application { | |
override fun onCreate() { | |
super.onCreate() | |
StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder() | |
.detectDiskReads() | |
.detectDiskWrites() | |
.detectNetwork() | |
.penaltyDeath() | |
.penaltyLog() | |
.build()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment