build: initial android 15 upgrade
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:launchMode="singleTask"
|
||||
android:allowCrossUidActivitySwitchFromBelow="false"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
|
||||
|
||||
@@ -155,6 +155,8 @@ class AuxioService :
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val ACTION_START = BuildConfig.APPLICATION_ID + ".service.START"
|
||||
|
||||
var isForeground = false
|
||||
private set
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
startService(
|
||||
Intent(this, AuxioService::class.java)
|
||||
.setAction(AuxioService.ACTION_START)
|
||||
.putExtra(AuxioService.INTENT_KEY_START_ID, IntegerTable.START_ID_ACTIVITY))
|
||||
|
||||
if (!startIntentAction(intent)) {
|
||||
|
||||
@@ -61,6 +61,7 @@ class StartActionRunner : TaskerPluginRunnerActionNoOutputOrInput() {
|
||||
ContextCompat.startForegroundService(
|
||||
context,
|
||||
Intent(context, AuxioService::class.java)
|
||||
.setAction(AuxioService.ACTION_START)
|
||||
.putExtra(AuxioService.INTENT_KEY_START_ID, IntegerTable.START_ID_TASKER))
|
||||
while (!AuxioService.isForeground) {
|
||||
Thread.sleep(100)
|
||||
|
||||
@@ -182,7 +182,7 @@ fun Context.newMainPendingIntent(): PendingIntent =
|
||||
PendingIntent.getActivity(
|
||||
this,
|
||||
IntegerTable.REQUEST_CODE,
|
||||
Intent(this, MainActivity::class.java),
|
||||
Intent(this, MainActivity::class.java).setAction(Intent.ACTION_MAIN),
|
||||
PendingIntent.FLAG_IMMUTABLE)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user