Skip to content
This repository has been archived by the owner on Nov 16, 2024. It is now read-only.

Commit

Permalink
android: Removed foreground service leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenSauce04 committed Aug 16, 2024
1 parent dee80da commit b615d92
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 88 deletions.
6 changes: 0 additions & 6 deletions src/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
Expand Down Expand Up @@ -80,10 +78,6 @@

</activity>

<service android:name="io.github.lime3ds.android.utils.ForegroundService" android:foregroundServiceType="specialUse">
<property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE" android:value="Keep emulation running in background"/>
</service>

<activity
android:name="io.github.lime3ds.android.features.cheats.ui.CheatsActivity"
android:exported="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import io.github.lime3ds.android.fragments.EmulationFragment
import io.github.lime3ds.android.fragments.MessageDialogFragment
import io.github.lime3ds.android.utils.ControllerMappingHelper
import io.github.lime3ds.android.utils.FileBrowserHelper
import io.github.lime3ds.android.utils.ForegroundService
import io.github.lime3ds.android.utils.EmulationLifecycleUtil
import io.github.lime3ds.android.utils.EmulationMenuSettings
import io.github.lime3ds.android.utils.ThemeUtil
Expand All @@ -49,7 +48,6 @@ import io.github.lime3ds.android.viewmodel.EmulationViewModel
class EmulationActivity : AppCompatActivity() {
private val preferences: SharedPreferences
get() = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
private var foregroundService: Intent? = null
var isActivityRecreated = false
private val emulationViewModel: EmulationViewModel by viewModels()
private val settingsViewModel: SettingsViewModel by viewModels()
Expand Down Expand Up @@ -485,11 +483,5 @@ class EmulationActivity : AppCompatActivity() {
fun isRunning(): Boolean {
return instance?.isEmulationRunning ?: false
}

fun stopForegroundService(activity: Activity) {
val startIntent = Intent(activity, ForegroundService::class.java)
startIntent.action = ForegroundService.ACTION_STOP
activity.startForegroundService(startIntent)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
}
}

// Dismiss previous notifications (should not happen unless a crash occurred)
EmulationActivity.stopForegroundService(this)

setInsets()
}

Expand All @@ -170,7 +167,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
}

override fun onDestroy() {
EmulationActivity.stopForegroundService(this)
super.onDestroy()
}

Expand Down

This file was deleted.

0 comments on commit b615d92

Please sign in to comment.