mirror of
https://github.com/hmalik144/EasyCC_Master.git
synced 2025-12-10 03:05:29 +00:00
- fixed WidgetServiceIntent.kt error
Took 28 minutes
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<supports-screens
|
||||
android:smallScreens="true"
|
||||
android:normalScreens="true"
|
||||
android:anyDensity="true"
|
||||
android:largeScreens="true"
|
||||
android:xlargeScreens="true"
|
||||
android:anyDensity="true" />
|
||||
android:normalScreens="true"
|
||||
android:smallScreens="true"
|
||||
android:xlargeScreens="true" />
|
||||
|
||||
<application
|
||||
android:name="com.appttude.h_mal.easycc.application.AppClass"
|
||||
@@ -43,6 +43,10 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name=".widget.WidgetServiceIntent"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -47,7 +47,7 @@ class CurrencyAppWidgetKotlin : AppWidgetProvider() {
|
||||
}
|
||||
|
||||
private fun loadWidget(context: Context) {
|
||||
val mIntent = Intent(context, CurrencyAppWidgetKotlin::class.java)
|
||||
val mIntent = Intent(context, WidgetServiceIntent::class.java)
|
||||
enqueueWork(context, mIntent)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.appttude.h_mal.easycc.utils.transformIntToArray
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import org.kodein.di.KodeinAware
|
||||
import org.kodein.di.LateInitKodein
|
||||
import org.kodein.di.generic.instance
|
||||
|
||||
@@ -24,7 +25,7 @@ class WidgetServiceIntent : JobIntentService() {
|
||||
private val repository: WidgetHelper by kodein.instance()
|
||||
|
||||
override fun onHandleWork(intent: Intent) {
|
||||
kodein.baseKodein = this.kodein
|
||||
kodein.baseKodein = (application as KodeinAware).kodein
|
||||
|
||||
val appWidgetManager = AppWidgetManager.getInstance(this)
|
||||
val thisAppWidget = ComponentName(packageName, CurrencyAppWidgetKotlin::class.java.name)
|
||||
|
||||
Reference in New Issue
Block a user