mirror of https://github.com/beemdevelopment/Aegis
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
825 B
Java
35 lines
825 B
Java
8 years ago
|
package me.impy.aegis;
|
||
|
|
||
|
import android.app.Application;
|
||
|
import android.content.SharedPreferences;
|
||
|
import android.preference.PreferenceManager;
|
||
|
|
||
|
import me.impy.aegis.db.DatabaseManager;
|
||
|
|
||
|
public class AegisApplication extends Application {
|
||
|
private boolean _running = false;
|
||
|
private DatabaseManager _manager = new DatabaseManager(this);
|
||
|
|
||
|
@Override
|
||
|
public void onCreate() {
|
||
|
super.onCreate();
|
||
|
}
|
||
|
|
||
|
public DatabaseManager getDatabaseManager() {
|
||
|
return _manager;
|
||
|
}
|
||
|
|
||
|
public SharedPreferences getPreferences() {
|
||
|
return PreferenceManager.getDefaultSharedPreferences(this);
|
||
|
}
|
||
|
|
||
|
public boolean isRunning() {
|
||
|
// return false the first time this is called
|
||
|
if (_running) {
|
||
|
return true;
|
||
|
}
|
||
|
_running = true;
|
||
|
return false;
|
||
|
}
|
||
|
}
|