private void b() {
   boolean z = 1;
   if (!(this.d == null || !this.d.isConnected() || this.c == null)) {
     AnalyticsPayload payloadList =
         this.c.getPayloadList(
             AnalyticsDatabaseManager.getInstance().getEvents(), InternalSDKUtil.getContext());
     if (payloadList.getCompletePayload() != null) {
       a(payloadList, SessionInfo.getAppId(InternalSDKUtil.getContext()));
       z = false;
     }
   }
   if (i == 0) {
     a.sendEmptyMessageDelayed(MESSAGE_PING, AnalyticsUtils.getTimeinterval());
   } else {
     AnalyticsUtils.setStartHandle(false);
   }
 }
 public void fillDeviceInfo() {
   if (a() == null) {
     String toLowerCase;
     c(Build.BRAND);
     Locale locale = Locale.getDefault();
     String language = locale.getLanguage();
     String country;
     if (language != null) {
       toLowerCase = language.toLowerCase(Locale.ENGLISH);
       country = locale.getCountry();
       if (country != null) {
         toLowerCase = toLowerCase + "_" + country.toLowerCase(Locale.ENGLISH);
       }
     } else {
       toLowerCase = (String) System.getProperties().get("user.language");
       country = (String) System.getProperties().get("user.region");
       toLowerCase =
           (toLowerCase == null || country == null) ? language : toLowerCase + "_" + country;
       if (toLowerCase == null) {
         toLowerCase = "en";
       }
     }
     b(toLowerCase);
   }
   if (InternalSDKUtil.getContext() != null) {
     a(InternalSDKUtil.getContext());
   }
   a(InternalSDKUtil.getConnectivityType(InternalSDKUtil.getContext()));
   try {
     int currentOrientationInFixedValues =
         WrapperFunctions.getCurrentOrientationInFixedValues(InternalSDKUtil.getContext());
     if (currentOrientationInFixedValues == 9) {
       a((int) GoogleScorer.CLIENT_PLUS);
     } else if (currentOrientationInFixedValues == 8) {
       a((int) GoogleScorer.CLIENT_APPSTATE);
     } else if (currentOrientationInFixedValues == 0) {
       a((int) IabHelper.BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE);
     } else {
       a(1);
     }
   } catch (Exception e) {
     Log.debug(InternalSDKUtil.LOGGING_TAG, "Error getting the orientation info ", e);
   }
 }
示例#3
0
文件: a.java 项目: fabrice999/UKRadio
 public void a(String s, c c1, INetworkListener inetworklistener) {
   b = inetworklistener;
   if (InternalSDKUtil.checkNetworkAvailibility(InternalSDKUtil.getContext())) {
     Log.internal("[InMobi]-[Monetization]", "Fetching  Ads");
     a.executeTask(c1, inetworklistener);
   } else if (b != null) {
     s = new Response(ErrorCode.NETWORK_ERROR);
     b.onRequestFailed(c1, s);
     return;
   }
 }
 public static synchronized AnalyticsNetworkManager startInstance() {
   AnalyticsNetworkManager analyticsNetworkManager;
   synchronized (AnalyticsNetworkManager.class) {
     if (b == null) {
       b = new AnalyticsNetworkManager();
     }
     if (b.c == null) {
       b.c = new AnalyticsPayloadBuilder();
     }
     if (b.d == null) {
       b.d = new AnalyticsConnectivityReceiver(InternalSDKUtil.getContext(), f);
     }
     analyticsNetworkManager = b;
   }
   return analyticsNetworkManager;
 }
 public boolean shouldOverrideUrlLoading(WebView webview, String s)
 {
     Handler handler = AdTrackerNetworkInterface.c();
     if (handler.hasMessages(9))
     {
         handler.removeMessages(9);
         AdTrackerWebViewLoader.b(a, System.currentTimeMillis() - AdTrackerWebViewLoader.b(a));
         if (s.contains("iat"))
         {
             Object obj = s.substring(7);
             obj = AdTrackerWebViewLoader.a(a, ((String) (obj)));
             FileOperations.setPreferences(InternalSDKUtil.getContext(), "IMAdTrackerStatusUpload", "errcode", Integer.toString(a(((a) (obj)))));
             Message message = Message.obtain();
             message.what = 10;
             message.arg2 = a(((a) (obj)));
             message.obj = AdTrackerWebViewLoader.c(a);
             Bundle bundle = new Bundle();
             bundle.putString("appId", AdTrackerWebViewLoader.d(a));
             message.setData(bundle);
             if (5000 == a(((a) (obj))))
             {
                 int i = AdTrackerWebViewLoader.b(a, a(((a) (obj))));
                 if (6000 == i)
                 {
                     message.what = 8;
                     message.arg2 = (int)AdTrackerWebViewLoader.e(a);
                 } else
                 {
                     message.arg2 = i;
                 }
             }
             handler.sendMessage(message);
         }
     }
     webview.loadUrl(s);
     return true;
 }