Skip to content

Commit

Permalink
Suppress lint warnings due to use of HW acceleration
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpoole committed Nov 3, 2024
1 parent faa900c commit 3366031
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/de/blau/android/layer/data/MapOverlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.concurrent.ThreadPoolExecutor;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
Expand Down Expand Up @@ -1278,6 +1279,7 @@ public Bitmap getIcon(@NonNull OsmElement element) {
* @param isWay if the element is a Way
* @param cache the relevant cache
*/
@TargetApi(26)
private void retrieveIcon(@NonNull OsmElement element, boolean isWay, @NonNull WeakHashMap<java.util.Map<String, String>, Bitmap> cache) {
BitmapDrawable iconDrawable = null;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/blau/android/tasks/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.Date;
import java.util.List;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
Expand Down Expand Up @@ -227,6 +228,7 @@ public void setChanged(boolean changed) {
* @param hwAccelerated true is the canvas is hw accellerated
* @return the Bitmap
*/
@TargetApi(26)
@NonNull
static BitmapWithOffset getIcon(@NonNull Context context, int icon, boolean hwAccelerated) {
BitmapWithOffset bitmap = new BitmapWithOffset();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/blau/android/views/util/MapTileProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.zip.GZIPInputStream;

import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
Expand Down Expand Up @@ -99,6 +100,7 @@ public BitmapDecoder(boolean hardwareRendering) {
this.hardwareRendering = hardwareRendering;
}

@TargetApi(26)
@Override
public Bitmap decode(@NonNull byte[] data, boolean small) {
if (hardwareRendering) {
Expand Down

0 comments on commit 3366031

Please sign in to comment.