mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Removing ShortcutInfoCompat and directly using ShortcutInfo
Change-Id: I2842689e192a206c0d31558c8126eae1c7904598
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.os.UserHandle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
@@ -34,7 +35,6 @@ import com.android.launcher3.model.nano.LauncherDumpProto;
|
||||
import com.android.launcher3.model.nano.LauncherDumpProto.ContainerType;
|
||||
import com.android.launcher3.model.nano.LauncherDumpProto.DumpTarget;
|
||||
import com.android.launcher3.shortcuts.DeepShortcutManager;
|
||||
import com.android.launcher3.shortcuts.ShortcutInfoCompat;
|
||||
import com.android.launcher3.shortcuts.ShortcutKey;
|
||||
import com.android.launcher3.util.ComponentKey;
|
||||
import com.android.launcher3.util.IntArray;
|
||||
@@ -366,7 +366,7 @@ public class BgDataModel {
|
||||
* Clear all the deep shortcut counts for the given package, and re-add the new shortcut counts.
|
||||
*/
|
||||
public synchronized void updateDeepShortcutCounts(
|
||||
String packageName, UserHandle user, List<ShortcutInfoCompat> shortcuts) {
|
||||
String packageName, UserHandle user, List<ShortcutInfo> shortcuts) {
|
||||
if (packageName != null) {
|
||||
Iterator<ComponentKey> keysIter = deepShortcutMap.keySet().iterator();
|
||||
while (keysIter.hasNext()) {
|
||||
@@ -379,7 +379,7 @@ public class BgDataModel {
|
||||
}
|
||||
|
||||
// Now add the new shortcuts to the map.
|
||||
for (ShortcutInfoCompat shortcut : shortcuts) {
|
||||
for (ShortcutInfo shortcut : shortcuts) {
|
||||
boolean shouldShowInContainer = shortcut.isEnabled()
|
||||
&& (shortcut.isDeclaredInManifest() || shortcut.isDynamic());
|
||||
if (shouldShowInContainer) {
|
||||
|
||||
Reference in New Issue
Block a user