[Android] Remove dead code
Geoffrey Métais
git at videolan.org
Fri Nov 24 11:13:33 CET 2017
vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Nov 24 11:12:11 2017 +0100| [4371413df99cb033fa18ead390ade3d0fadf5756] | committer: Geoffrey Métais
Remove dead code
(cherry picked from commit 6779336623e994aa3d7df387c0edb1ef107b8942)
> https://code.videolan.org/videolan/vlc-android/commit/4371413df99cb033fa18ead390ade3d0fadf5756
---
.../src/org/videolan/vlc/gui/helpers/UiTools.java | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
index db89dafc3..af06fd3e9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
@@ -77,7 +77,6 @@ import org.videolan.vlc.util.FileUtils;
import org.videolan.vlc.util.MediaLibraryItemComparator;
import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
public class UiTools {
private static final String TAG = "VLC/UiTools";
@@ -88,8 +87,6 @@ public class UiTools {
public static final int ITEM_SELECTION_ON = ContextCompat.getColor(VLCApplication.getAppContext(), R.color.orange200transparent);
}
- private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1);
-
private static final Handler sHandler = new Handler(Looper.getMainLooper());
public static final int DELETE_DURATION = 3000;
@@ -182,24 +179,6 @@ public class UiTools {
}
}
- /**
- * Generate a value suitable for use in {@link #setId(int)}.
- * This value will not collide with ID values generated at build time by aapt for R.id.
- *
- * @return a generated ID value
- */
- public static int generateViewId() {
- for (;;) {
- final int result = sNextGeneratedId.get();
- // aapt-generated IDs have the high byte nonzero; clamp to the range under that.
- int newValue = result + 1;
- if (newValue > 0x00FFFFFF) newValue = 1; // Roll over to 1, not 0.
- if (sNextGeneratedId.compareAndSet(result, newValue)) {
- return result;
- }
- }
- }
-
public static void setViewVisibility(View v, int visibility) {
if (v != null)
v.setVisibility(visibility);
More information about the Android
mailing list