Refactoring

This commit is contained in:
M66B
2022-04-14 07:57:34 +02:00
parent ff3f9df450
commit d914c3054a
4 changed files with 14 additions and 13 deletions

View File

@@ -119,7 +119,6 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Group;
import androidx.core.content.FileProvider;
import androidx.core.content.pm.ShortcutInfoCompat;
import androidx.core.content.pm.ShortcutManagerCompat;
import androidx.core.graphics.ColorUtils;
import androidx.core.view.MenuCompat;
import androidx.fragment.app.Fragment;
@@ -4627,7 +4626,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
try {
ShortcutInfoCompat.Builder builder =
Shortcuts.getShortcut(context, (InternetAddress) message.from[0]);
ShortcutManagerCompat.requestPinShortcut(context, builder.build(), null);
Shortcuts.requestPinShortcut(context, builder.build());
} catch (Throwable ex) {
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
}
@@ -6307,7 +6306,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onExecuted(Bundle args, ContactInfo[] contactInfo) {
ShortcutInfoCompat.Builder builder =
Shortcuts.getShortcut(context, message, contactInfo);
ShortcutManagerCompat.requestPinShortcut(context, builder.build(), null);
Shortcuts.requestPinShortcut(context, builder.build());
}
@Override
@@ -6889,7 +6888,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
this.colorControlNormal = Helper.resolveColor(context, R.attr.colorControlNormal);
this.hasWebView = Helper.hasWebView(context);
this.pin = ShortcutManagerCompat.isRequestPinShortcutSupported(context);
this.pin = Shortcuts.can(context);
this.contacts = Helper.hasPermission(context, Manifest.permission.READ_CONTACTS);
this.textSize = Helper.getTextSize(context, zoom);