Skip to content

Commit 143205f

Browse files
committed
add null safety for instance
1 parent a93e2cc commit 143205f

File tree

1 file changed

+6
-0
lines changed
  • app/src/main/java/io/github/ratul/topactivity

1 file changed

+6
-0
lines changed

app/src/main/java/io/github/ratul/topactivity/App.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ public class App extends Application {
3838
private SharedPreferences sharedPreferences;
3939
private NotificationManagerCompat notificationManager;
4040

41+
@Override
42+
protected void attachBaseContext(Context base) {
43+
super.attachBaseContext(base);
44+
instance = this;
45+
}
46+
4147
@Override
4248
public void onCreate() {
4349
super.onCreate();

0 commit comments

Comments
 (0)