kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix potential OOM when updating shortcuts.
rodzic
449ea9375e
commit
8783d150e8
|
@ -135,7 +135,7 @@ public final class ConversationUtil {
|
||||||
@RequiresApi(CONVERSATION_SUPPORT_VERSION)
|
@RequiresApi(CONVERSATION_SUPPORT_VERSION)
|
||||||
public static int getMaxShortcuts(@NonNull Context context) {
|
public static int getMaxShortcuts(@NonNull Context context) {
|
||||||
ShortcutManager shortcutManager = ServiceUtil.getShortcutManager(context);
|
ShortcutManager shortcutManager = ServiceUtil.getShortcutManager(context);
|
||||||
return shortcutManager.getMaxShortcutCountPerActivity();
|
return Math.min(shortcutManager.getMaxShortcutCountPerActivity(), 150);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Ładowanie…
Reference in New Issue