M66B 3 years ago
parent eb954c303a
commit f4fde96377

@ -103,6 +103,7 @@ class Shortcuts {
EntityLog.log(context, "Shortcut email=" + email); EntityLog.log(context, "Shortcut email=" + email);
ShortcutInfoCompat.Builder builder = getShortcut(context, email, name, avatar); ShortcutInfoCompat.Builder builder = getShortcut(context, email, name, avatar);
builder.setLongLived(true);
builder.setRank(shortcuts.size() + 1); builder.setRank(shortcuts.size() + 1);
shortcuts.add(builder.build()); shortcuts.add(builder.build());
} }
@ -264,6 +265,7 @@ class Shortcuts {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Person.Builder person = new Person.Builder() Person.Builder person = new Person.Builder()
.setIcon(icon) .setIcon(icon)
.setKey(email)
.setName(name == null ? email : name) .setName(name == null ? email : name)
.setImportant(true); .setImportant(true);
if (avatar != null) if (avatar != null)

Loading…
Cancel
Save