public static void setApplicationLink(EnterpriseMobileBanking paramEnterpriseMobileBanking) {
   application = paramEnterpriseMobileBanking;
   application.getWindowManager().getDefaultDisplay().getMetrics(metrics);
   Log.d("AppHelper", "Density: " + metricswidthPixels);
   myDensity = metricswidthPixels / 320.0F;
   if (gothicFace == null) {
     gothicFace =
         Typeface.createFromAsset(application.getAssets(), "fonts/Trade-Gothic-LT-Bold.ttf");
   }
 }
 public static void setNavigationEnabled(boolean paramBoolean) {
   application.getAppHeader().getNavButton().setEnabled(paramBoolean);
   application.getAppHeader().getGlobalButton().setEnabled(paramBoolean);
   application.findViewById(2131230758).setEnabled(paramBoolean);
   application.findViewById(2131230753).setEnabled(paramBoolean);
   application.findViewById(2131230880).setEnabled(paramBoolean);
   application.findViewById(2131230881).setEnabled(paramBoolean);
   application.findViewById(2131230758).setClickable(paramBoolean);
   application.findViewById(2131230753).setClickable(paramBoolean);
   application.getAppHeader().getNavButton().setClickable(paramBoolean);
   application.getAppHeader().getGlobalButton().setClickable(paramBoolean);
 }
 public static void switchLobFinish(String paramString1, final String paramString2) {
   Log.v("AppHelper", "in native.switchLobFinish: " + paramString1);
   application.runOnUiThread(
       new Runnable() {
         public void run() {
           View localView = null;
           if (val$actionLob.startsWith("card")) {
             localView = AppHelper.application.findViewById(2131230847);
           }
           while (localView != null) {
             Log.v("AppHelper", "toLob not null: " + localView.toString());
             AppHelper.application.clearLastCarpet();
             AppHelper.application.setNextCarpet(paramString2);
             AppHelper.application.handleLob(localView.findViewById(2131230873));
             return;
             if (val$actionLob.startsWith("bank")) {
               localView = AppHelper.application.findViewById(2131230848);
             } else if ((val$actionLob.startsWith("360"))
                 || (val$actionLob.startsWith("threesixty"))) {
               localView = AppHelper.application.findViewById(2131230849);
             }
           }
           EnterpriseMobileBanking.setAuthenticated(false);
           AppHelper.application.returnToHome(AppHelper.application.findViewById(2131230753));
         }
       });
 }
 public static void returnToHome() {
   application.runOnUiThread(
       new Runnable() {
         public void run() {
           AppHelper.application.returnToHome(null);
         }
       });
 }
 public static void showBackButton() {
   application.runOnUiThread(
       new Runnable() {
         public void run() {
           AppHelper.application.showBackButton();
         }
       });
 }
 public static void genericError(int paramInt) {
   long l2 = Math.abs(paramInt) * 100 + Build.VERSION.SDK_INT;
   long l1 = l2;
   if (paramInt < 0) {
     l1 = l2 * -1L;
   }
   String str =
       String.format(
           application.getResources().getString(2131296586),
           new Object[] {
             String.format(application.getString(2131296585), new Object[] {String.valueOf(l1)})
           });
   application.runOnUiThread(
       new Runnable() {
         public void run() {
           AppHelper.application.getAppView().loadData(val$htmlError, "text/html", "UTF-8");
         }
       });
 }
 private static void switchLob(String paramString1, String paramString2) {
   if (showingMenu()) {
     WebView localWebView = getAppView();
     if (localWebView != null) {
       application.handleNavigation(localWebView.getRootView());
     }
   }
   Log.v("AppHelper", "in SwitchLOB: " + paramString2);
   logoutUser(paramString1, paramString2);
 }
 public static void hideMenu() {
   if (showingMenu()) {
     application.runOnUiThread(
         new Runnable() {
           public void run() {
             AppHelper.application.handleNavigation(
                 AppHelper.application.getAppHeader().getNavButton());
           }
         });
   }
 }
 public static void changeButtonImage(boolean paramBoolean) {
   ImageButton localImageButton1 = application.getAppHeader().getGlobalButton();
   ImageButton localImageButton2 = application.getAppHeader().getNavButton();
   if (!paramBoolean) {
     localImageButton1.setImageResource(2130837681);
     localImageButton2.setImageResource(2130837688);
     return;
   }
   localImageButton1.setImageResource(2130837680);
   localImageButton2.setImageResource(2130837687);
 }
 public static void setSignOut(boolean paramBoolean) {
   Log.d("AppHelper", "Signout: " + paramBoolean);
   View localView = application.findViewById(2131230895);
   localView.setEnabled(paramBoolean);
   Drawable localDrawable = localView.getBackground();
   if (paramBoolean) {}
   for (int i = 255; ; i = 79) {
     localDrawable.setAlpha(i);
     localView.postInvalidate();
     return;
   }
 }
 public static boolean isNewApp() {
   SharedPreferences localSharedPreferences = application.getPreferences(0);
   try {
     long l1 =
         new File(
                 applicationgetPackageManagergetApplicationInfoapplicationgetPackageName0sourceDir)
             .lastModified();
     long l2 = localSharedPreferences.getLong("appInstallTime", 0L);
     return l1 > l2;
   } catch (Exception localException) {
   }
   return true;
 }
 public static String appVersion() {
   PackageManager localPackageManager;
   if (appVersion == null) {
     localPackageManager = application.getPackageManager();
   }
   try {
     appVersion = getPackageInfoapplicationgetPackageName0versionName;
     return appVersion;
   } catch (PackageManager.NameNotFoundException localNameNotFoundException) {
     for (; ; ) {
       localNameNotFoundException.printStackTrace();
     }
   }
 }
 public static void sendJavascript(String paramString) {
   paramString =
       "(function() { try { "
           + paramString
           + " } catch( e ) { console.log( 'Error running: \""
           + TextUtils.htmlEncode(paramString)
           + "\" -- ' + e ); } })()";
   application.runOnUiThread(
       new Runnable() {
         public void run() {
           WebView localWebView = AppHelper.getAppView();
           if ((localWebView != null)
               && (localWebView.getUrl() != null)
               && (!localWebView.getUrl().contains("about:blank"))) {
             Log.d("AppHelper", "Javascript: " + val$js);
             AppHelper.application.sendJavascript(val$js);
             return;
           }
           Log.d("AppHelper", "No Target for JS!");
         }
       });
 }
 public static void showError(String paramString1, final String paramString2) {
   application.runOnUiThread(
       new Runnable() {
         public void run() {
           AlertDialog.Builder localBuilder = new AlertDialog.Builder(AppHelper.application);
           localBuilder.setTitle(val$title);
           localBuilder.setMessage(paramString2);
           localBuilder.setCancelable(true);
           localBuilder.setNegativeButton(
               "OK",
               new DialogInterface.OnClickListener() {
                 public void onClick(
                     DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {
                   AppHelper.logout.cancel();
                   AppHelper.access$202(null);
                 }
               });
           AppHelper.access$202(localBuilder.create());
           AppHelper.logout.show();
         }
       });
 }
 public static void startActivity(Intent paramIntent) {
   application.startActivity(paramIntent);
 }
 public static boolean showingMenu() {
   View localView = application.findViewById(2131230756);
   return (localView.isEnabled()) && (localView.getLeft() != 0);
 }
 public static void showRelContainer() {
   application.findViewById(2131230756).setVisibility(0);
   application.findViewById(2131230876).setVisibility(8);
 }
 public static String getProductsUri() {
   if (application != null) {
     return application.getWebUrl() + application.getString(2131296541);
   }
   return "";
 }
 public static List<MenuItem> getMenuItems() {
   return application.getMenuItems();
 }
 public static TransiteWebView getTransiteView() {
   return (TransiteWebView) application.findViewById(2131230881);
 }
 public static void minimize() {
   application.sendJavascript("INGDirectApp.hideBusyIndicator();");
   application.moveTaskToBack(true);
 }
 public static String getAppString(int paramInt) {
   return application.getString(paramInt);
 }
 public static void setLastItem(MenuItem paramMenuItem) {
   application.setLastItem(paramMenuItem);
 }
 public static int getLastLob() {
   return application.getLastLob();
 }
 public static void runOnUiThread(Runnable paramRunnable) {
   application.runOnUiThread(paramRunnable);
 }
 public static boolean handleNative(String paramString) {
   int j = 8;
   int k = 0;
   paramString = paramString.toLowerCase();
   boolean bool = paramString.startsWith("cmd:");
   Log.d("AppHelper", "handleNative: " + paramString);
   if (bool) {
     paramString = paramString.replace("cmd:", "");
     if (!paramString.startsWith("switch:")) {
       break label324;
     }
     Log.d("AppHelper", "Switch command found");
     str = paramString.replace("switch:", "");
     localObject = NativeCache.staticRead(application.getString(2131296502));
     i = k;
     if (EnterpriseMobileBanking.getAuthenticated()) {
       if (localObject != null) {
         i = k;
         if (((String) localObject).equals("1")) {}
       } else {
         i = 1;
       }
     }
     localStringBuilder =
         new StringBuilder()
             .append("authed: ")
             .append(EnterpriseMobileBanking.getAuthenticated())
             .append(" -- ");
     paramString = (String) localObject;
     if (localObject == null) {
       paramString = "NULL";
     }
     Log.d("AppHelper", paramString);
     if (!str.startsWith("confirmation:")) {
       break label269;
     }
     paramString = str.replace("confirmation:", "");
     Log.d("AppHelper", "Calling for confirmation: " + paramString);
     switchLob("confirmSwitch", paramString);
   }
   label269:
   label324:
   while (!paramString.startsWith("contact:")) {
     for (; ; ) {
       String str;
       StringBuilder localStringBuilder;
       Log.v("AppHelper", "isNative: " + bool);
       return bool;
       if (i != 0) {
         promptForLogout(application.getString(2131296502), str);
       } else {
         Log.d("AppHelper", "Going to switchLob: " + str);
         switchLob(str);
       }
     }
   }
   hideMenu();
   paramString = paramString.replace("contact:", "");
   Log.d("AppHelper", "Action: " + paramString);
   application.initializeContactUs();
   application.findViewById(2131230882).setVisibility(0);
   application.hideBackButton();
   Object localObject = application.findViewById(2131230777);
   if ((!paramString.equalsIgnoreCase("360")) && (!paramString.equalsIgnoreCase("threesixty"))) {}
   for (int i = 0; ; i = 8) {
     ((View) localObject).setVisibility(i);
     localObject = application.findViewById(2131230789);
     if (!paramString.equalsIgnoreCase("360")) {
       i = j;
       if (!paramString.equalsIgnoreCase("threesixty")) {}
     } else {
       i = 0;
     }
     ((View) localObject).setVisibility(i);
     break;
   }
 }
 public static String getLobPage() {
   return application.getLastCarpet();
 }
 public static void setSelectedMenuItem(int paramInt) {
   application.setSelectedMenuItem(paramInt);
 }
 public static WebView getAppView() {
   if (application != null) {
     return application.getAppView();
   }
   return null;
 }
 public static boolean isAuthenticated() {
   return EnterpriseMobileBanking.getAuthenticated();
 }