kopia lustrzana https://github.com/ge0rg/aprsdroid
App: put global initializers where they belong
rodzic
1081975b84
commit
8602da0897
|
@ -26,6 +26,7 @@
|
|||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<application android:label="@string/app_name" android:icon="@drawable/icon"
|
||||
android:name=".APRSdroidApplication"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:theme="@style/DefaultTheme" >
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@ class APRSdroid extends Activity {
|
|||
super.onCreate(savedInstanceState)
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
|
||||
ServiceNotifier.instance.setupChannels(this)
|
||||
|
||||
MapModes.initialize(this)
|
||||
|
||||
// if this is a USB device, auto-launch the service
|
||||
if (UsbTnc.checkDeviceHandle(prefs, getIntent.getParcelableExtra("device")) && prefs.getBoolean("service_running", false))
|
||||
startService(AprsService.intent(this, AprsService.SERVICE))
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package org.aprsdroid.app
|
||||
|
||||
import android.app.Application
|
||||
|
||||
class APRSdroidApplication extends Application {
|
||||
|
||||
override def onCreate() {
|
||||
super.onCreate()
|
||||
ServiceNotifier.instance.setupChannels(this)
|
||||
MapModes.initialize(this)
|
||||
}
|
||||
}
|
Ładowanie…
Reference in New Issue