Example #1
0
 protected void a() {
   if (this.e == null) {
     this.e = new HashMap();
   }
   this.e.put("Accept", "application/json");
   this.e.put("X-Chartboost-Client", CBUtility.d());
   this.e.put("X-Chartboost-API", "5.0.3");
   this.e.put("X-Chartboost-Client", CBUtility.d());
 }
Example #2
0
 protected void a(Context context) {
   Object obj = null;
   a(GCMConstants.EXTRA_APPLICATION_PENDING_INTENT, com.chartboost.sdk.b.b());
   if ("sdk".equals(Build.PRODUCT)) {
     a("model", (Object) "Android Simulator");
   } else {
     a("model", Build.MODEL);
   }
   a("device_type", Build.MANUFACTURER + " " + Build.MODEL);
   a("os", "Android " + VERSION.RELEASE);
   a(PeppermintConstant.JSON_KEY_COUNTRY, Locale.getDefault().getCountry());
   a(PeppermintConstant.JSON_KEY_LANGUAGE, Locale.getDefault().getLanguage());
   a("sdk", (Object) "5.0.3");
   a("timestamp", String.valueOf(Long.valueOf(new Date().getTime() / 1000).intValue()));
   a("session", Integer.valueOf(CBUtility.a().getInt("cbPrefSessionCount", 0)));
   a("reachability", Integer.valueOf(az.a().b()));
   b(context);
   a("scale", i.a + context.getResources().getDisplayMetrics().density);
   try {
     Object packageName = context.getPackageName();
     a(
         "bundle",
         context
             .getPackageManager()
             .getPackageInfo(packageName, ModuleConfig.ACTIVEUSER_MODULE)
             .versionName);
     a("bundle_id", packageName);
   } catch (Throwable e) {
     CBLogging.b("CBRequest", "Exception raised getting package mager object", e);
   }
   if (g == null) {
     TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
     if (telephonyManager == null || telephonyManager.getPhoneType() == 0) {
       g = com.chartboost.sdk.Libraries.e.a.a();
     } else {
       Object obj2;
       String simOperator = telephonyManager.getSimOperator();
       if (TextUtils.isEmpty(simOperator)) {
         obj2 = null;
       } else {
         obj2 = simOperator.substring(0, 3);
         obj = simOperator.substring(3);
       }
       g =
           e.a(
               e.a("carrier-name", telephonyManager.getNetworkOperatorName()),
               e.a("mobile-country-code", obj2),
               e.a("mobile-network-code", obj),
               e.a("iso-country-code", telephonyManager.getNetworkCountryIso()),
               e.a("phone-type", Integer.valueOf(telephonyManager.getPhoneType())));
     }
   }
   a("carrier", g);
   a("custom-id", com.chartboost.sdk.b.j());
 }
Example #3
0
 public String e() {
   return g() + CBUtility.a(this.d);
 }