Skip to content
Snippets Groups Projects
Commit 67793366 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Remove dead code

parent 1ea71464
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment