@Override public void read(JSONObject object) throws JSONException { super.read(object); setSdkName(object.getString(SDK_NAME)); setSdkVersion(object.getString(SDK_VERSION)); setModel(object.getString(MODEL)); setOemName(object.getString(OEM_NAME)); setOsName(object.getString(OS_NAME)); setOsVersion(object.getString(OS_VERSION)); setOsBuild(object.optString(OS_BUILD, null)); setOsApiLevel(JSONUtils.readInteger(object, OS_API_LEVEL)); setLocale(object.getString(LOCALE)); setTimeZoneOffset(object.getInt(TIME_ZONE_OFFSET)); setScreenSize(object.getString(SCREEN_SIZE)); setAppVersion(object.getString(APP_VERSION)); setCarrierName(object.optString(CARRIER_NAME, null)); setCarrierCountry(object.optString(CARRIER_COUNTRY, null)); setAppBuild(object.getString(APP_BUILD)); setAppNamespace(object.optString(APP_NAMESPACE, null)); }
String networkCountryIso = telephonyManager.getNetworkCountryIso(); if (!TextUtils.isEmpty(networkCountryIso)) { device.setCarrierCountry(networkCountryIso);
a.setCarrierCountry("a"); checkNotEquals(a, b); b.setCarrierCountry("b"); checkNotEquals(a, b); b.setCarrierCountry("a"); checkEquals(a, b);