|
@@ -41,18 +41,20 @@ public final class DeviceIdUtils {
|
|
|
private static final String SP_KEY_DEVICE_ID = "device_id";
|
|
|
|
|
|
public static String getDeviceId(Context context) {
|
|
|
- SharedPreferences sharedPreferences = context.getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
|
|
|
+ /*SharedPreferences sharedPreferences = context.getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
|
|
|
String deviceId = sharedPreferences.getString(SP_KEY_DEVICE_ID, null);
|
|
|
if (!TextUtils.isEmpty(deviceId)) {
|
|
|
return deviceId;
|
|
|
- }
|
|
|
- deviceId = getIMEI(context);
|
|
|
+ }*/
|
|
|
+
|
|
|
+ String deviceId = getIMEI(context);
|
|
|
if (TextUtils.isEmpty(deviceId)) {
|
|
|
deviceId = createUUID(context);
|
|
|
}
|
|
|
- sharedPreferences.edit()
|
|
|
+
|
|
|
+ /*sharedPreferences.edit()
|
|
|
.putString(SP_KEY_DEVICE_ID, deviceId)
|
|
|
- .apply();
|
|
|
+ .apply();*/
|
|
|
return deviceId;
|
|
|
}
|
|
|
|