Skip to content

Commit 53c45da

Browse files
[Fix] Use a different image for notifications
Working around an Infinix bug where the icon will crash the app or cause major slowdowns, I'll need to tweak the icon size later on.
1 parent 17d50bf commit 53c45da

5 files changed

Lines changed: 4 additions & 4 deletions

File tree

298 KB
Loading

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/scoped/FolderProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public Cursor queryRoots(String[] projection) {
9595
row.add(Root.COLUMN_TITLE, applicationName);
9696
row.add(Root.COLUMN_MIME_TYPES, ALL_MIME_TYPES);
9797
row.add(Root.COLUMN_AVAILABLE_BYTES, BASE_DIR.getFreeSpace());
98-
row.add(Root.COLUMN_ICON, R.drawable.ic_pojav_full);
98+
row.add(Root.COLUMN_ICON, R.mipmap.ic_launcher);
9999
return result;
100100
}
101101

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/services/GameService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
4949
.setContentText(getString(R.string.notification_game_runs))
5050
.setContentIntent(contentIntent)
5151
.addAction(android.R.drawable.ic_menu_close_clear_cancel, getString(R.string.notification_terminate), pendingKillIntent)
52-
.setSmallIcon(R.drawable.notif_icon)
52+
.setSmallIcon(R.mipmap.ic_launcher_foreground)
5353
.setNotificationSilent();
5454

5555
Notification notification = notificationBuilder.build();

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/services/ProgressService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void onCreate() {
5050
mNotificationBuilder = new NotificationCompat.Builder(this, "channel_id")
5151
.setContentTitle(getString(R.string.lazy_service_default_title))
5252
.addAction(android.R.drawable.ic_menu_close_clear_cancel, getString(R.string.notification_terminate), pendingKillIntent)
53-
.setSmallIcon(R.drawable.notif_icon)
53+
.setSmallIcon(R.mipmap.ic_launcher_foreground)
5454
.setNotificationSilent();
5555
}
5656

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/NotificationUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static void sendBasicNotification(Context context, int contentTitle, int
3434
if(contentTitle != -1) notificationBuilder.setContentTitle(context.getString(contentTitle));
3535
if(contentText != -1) notificationBuilder.setContentText(context.getString(contentText));
3636
if(actionIntent != null) notificationBuilder.setContentIntent(pendingIntent);
37-
notificationBuilder.setSmallIcon(R.drawable.notif_icon);
37+
notificationBuilder.setSmallIcon(R.mipmap.ic_launcher_foreground);
3838

3939
notificationManager.notify(notificationId, notificationBuilder.build());
4040
}

0 commit comments

Comments
 (0)