From 684d6efe8a4227f5f80a6f6328b565fedef53145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Mon, 9 Dec 2024 15:40:20 +0100 Subject: [PATCH] Suppress `RestrictedApi` error in DeleteProductsItemViewHolder.java and ProductsItemViewHolder.java --- .../listadapter/DeleteProductsItemViewHolder.java | 2 ++ .../ui/products/listadapter/ProductsItemViewHolder.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ui/deleteproducts/listadapter/DeleteProductsItemViewHolder.java b/app/src/main/java/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ui/deleteproducts/listadapter/DeleteProductsItemViewHolder.java index 252c1544..58ce936f 100644 --- a/app/src/main/java/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ui/deleteproducts/listadapter/DeleteProductsItemViewHolder.java +++ b/app/src/main/java/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ui/deleteproducts/listadapter/DeleteProductsItemViewHolder.java @@ -1,5 +1,6 @@ package privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.ui.deleteproducts.listadapter; +import android.annotation.SuppressLint; import android.content.res.ColorStateList; import android.content.res.Resources; import android.graphics.Paint; @@ -47,6 +48,7 @@ public void onClick(View v) } + @SuppressLint("RestrictedApi") private void updateVisibilityFormat(ProductItem item) { Resources resources = deleteProductItemCache.getProductCard().getContext().getResources(); diff --git a/app/src/main/java/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ui/products/listadapter/ProductsItemViewHolder.java b/app/src/main/java/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ui/products/listadapter/ProductsItemViewHolder.java index d93218f8..5c1872bf 100644 --- a/app/src/main/java/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ui/products/listadapter/ProductsItemViewHolder.java +++ b/app/src/main/java/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ui/products/listadapter/ProductsItemViewHolder.java @@ -1,5 +1,6 @@ package privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.ui.products.listadapter; +import android.annotation.SuppressLint; import android.content.Intent; import android.content.res.ColorStateList; import android.content.res.Resources; @@ -173,6 +174,7 @@ public boolean onLongClick(View view) } + @SuppressLint("RestrictedApi") private void updateVisibilityFormat(ProductItem item) { Resources resources = cache.getActivity().getResources();