Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac13e4d
commit 95f3899
Showing
5 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
package com.sbeve.jada | ||
|
||
import android.annotation.SuppressLint | ||
import android.app.Application | ||
import android.content.Context | ||
|
||
class MyApplication : Application() { | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
mContext = this.applicationContext | ||
context = this.applicationContext | ||
} | ||
|
||
companion object { | ||
private lateinit var mContext: Context | ||
fun getInstance() = mContext | ||
@SuppressLint("StaticFieldLeak") | ||
lateinit var context: Context | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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