diff options
Diffstat (limited to 'src/github/daneren2005/dsub/fragments/SubsonicFragment.java')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 07aed372..a9d62d0b 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -362,10 +362,6 @@ public class SubsonicFragment extends Fragment { }
protected int getNewId() {
- if(rootView != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
- return rootView.generateViewId();
- }
-
for (;;) {
final int result = nextGeneratedId.get();
// aapt-generated IDs have the high byte nonzero; clamp to the range under that.
@@ -376,6 +372,12 @@ public class SubsonicFragment extends Fragment { }
}
}
+ protected void maximizeIdGenerator(int id) {
+ final int result = nextGeneratedId.get();
+ if(id >= result) {
+ nextGeneratedId.set(id + 1);
+ }
+ }
public int getRootId() {
return rootView.getId();
}
|