diff options
| author | 2023-02-04 00:43:35 -0800 | |
|---|---|---|
| committer | 2023-06-03 00:05:29 -0700 | |
| commit | f33776af679442c61257d6715194d505a10bae51 (patch) | |
| tree | c3463adf95ebb8b6aa75d0bfde53d23d25a13829 /src/android | |
| parent | android: Implement SAF support & migrate to SDK 31. (#4) (diff) | |
| download | yuzu-f33776af679442c61257d6715194d505a10bae51.tar.gz yuzu-f33776af679442c61257d6715194d505a10bae51.tar.xz yuzu-f33776af679442c61257d6715194d505a10bae51.zip | |
android: EmulationActivity: Temporarily disable running notification.
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.java | 4 | ||||
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.java | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.java index d7b75e5a6..9d4ed80b4 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.java +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.java | |||
| @@ -45,7 +45,9 @@ public class YuzuApplication extends Application { | |||
| 45 | DirectoryInitialization.start(getApplicationContext()); | 45 | DirectoryInitialization.start(getApplicationContext()); |
| 46 | 46 | ||
| 47 | NativeLibrary.LogDeviceInfo(); | 47 | NativeLibrary.LogDeviceInfo(); |
| 48 | createNotificationChannel(); | 48 | |
| 49 | // TODO(bunnei): Disable notifications until we support app suspension. | ||
| 50 | //createNotificationChannel(); | ||
| 49 | 51 | ||
| 50 | databaseHelper = new GameDatabase(this); | 52 | databaseHelper = new GameDatabase(this); |
| 51 | } | 53 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.java index f4fca40e4..41103ec5b 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.java +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.java | |||
| @@ -33,7 +33,6 @@ import org.yuzu.yuzu_emu.utils.ControllerMappingHelper; | |||
| 33 | import org.yuzu.yuzu_emu.utils.ForegroundService; | 33 | import org.yuzu.yuzu_emu.utils.ForegroundService; |
| 34 | 34 | ||
| 35 | import java.lang.annotation.Retention; | 35 | import java.lang.annotation.Retention; |
| 36 | import java.util.List; | ||
| 37 | 36 | ||
| 38 | import static java.lang.annotation.RetentionPolicy.SOURCE; | 37 | import static java.lang.annotation.RetentionPolicy.SOURCE; |
| 39 | 38 | ||
| @@ -57,7 +56,8 @@ public final class EmulationActivity extends AppCompatActivity { | |||
| 57 | private EmulationFragment mEmulationFragment; | 56 | private EmulationFragment mEmulationFragment; |
| 58 | private SharedPreferences mPreferences; | 57 | private SharedPreferences mPreferences; |
| 59 | private ControllerMappingHelper mControllerMappingHelper; | 58 | private ControllerMappingHelper mControllerMappingHelper; |
| 60 | private Intent foregroundService; | 59 | // TODO(bunnei): Disable notifications until we support app suspension. |
| 60 | // private Intent foregroundService; | ||
| 61 | private boolean activityRecreated; | 61 | private boolean activityRecreated; |
| 62 | private String mSelectedTitle; | 62 | private String mSelectedTitle; |
| 63 | private String mPath; | 63 | private String mPath; |
| @@ -73,12 +73,14 @@ public final class EmulationActivity extends AppCompatActivity { | |||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | public static void tryDismissRunningNotification(Activity activity) { | 75 | public static void tryDismissRunningNotification(Activity activity) { |
| 76 | NotificationManagerCompat.from(activity).cancel(EMULATION_RUNNING_NOTIFICATION); | 76 | // TODO(bunnei): Disable notifications until we support app suspension. |
| 77 | // NotificationManagerCompat.from(activity).cancel(EMULATION_RUNNING_NOTIFICATION); | ||
| 77 | } | 78 | } |
| 78 | 79 | ||
| 79 | @Override | 80 | @Override |
| 80 | protected void onDestroy() { | 81 | protected void onDestroy() { |
| 81 | stopService(foregroundService); | 82 | // TODO(bunnei): Disable notifications until we support app suspension. |
| 83 | // stopService(foregroundService); | ||
| 82 | super.onDestroy(); | 84 | super.onDestroy(); |
| 83 | } | 85 | } |
| 84 | 86 | ||
| @@ -131,8 +133,9 @@ public final class EmulationActivity extends AppCompatActivity { | |||
| 131 | mPreferences = PreferenceManager.getDefaultSharedPreferences(this); | 133 | mPreferences = PreferenceManager.getDefaultSharedPreferences(this); |
| 132 | 134 | ||
| 133 | // Start a foreground service to prevent the app from getting killed in the background | 135 | // Start a foreground service to prevent the app from getting killed in the background |
| 134 | foregroundService = new Intent(EmulationActivity.this, ForegroundService.class); | 136 | // TODO(bunnei): Disable notifications until we support app suspension. |
| 135 | startForegroundService(foregroundService); | 137 | // foregroundService = new Intent(EmulationActivity.this, ForegroundService.class); |
| 138 | // startForegroundService(foregroundService); | ||
| 136 | } | 139 | } |
| 137 | 140 | ||
| 138 | @Override | 141 | @Override |