mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 22:59:25 +00:00
Compare against existing Build.VERSION_CODES.
The 1.X Android versions don't have the 2.X VERSION_CODE symbols, so comparing against them in order to make 1.6 choices will throw runtime exceptions.
This commit is contained in:
@@ -50,7 +50,7 @@ public abstract class ContactAccessor {
|
||||
if (sInstance == null) {
|
||||
String className;
|
||||
|
||||
if (Integer.parseInt(Build.VERSION.SDK) < Build.VERSION_CODES.ECLAIR)
|
||||
if (Integer.parseInt(Build.VERSION.SDK) <= Build.VERSION_CODES.DONUT)
|
||||
className = "ContactAccessorOldApi";
|
||||
else
|
||||
className = "ContactAccessorNewApi";
|
||||
|
||||
Reference in New Issue
Block a user