Code example for DialogFragment

Methods: getActivity, getString

0
   private void setUpTos() { 
      CarrierBillingProvisioning var1 = BillingLocator.getCarrierBillingStorage().getProvisioning();
      String var2 = var1.getTosVersion();
      this.mTosVersion = var2;
      String var3 = var1.getTosUrl();
      String var4 = this.getString(2131230804);
      if(!TextUtils.isEmpty(var4)) {
         var3 = var3.replace("%locale%", var4);
      } 
 
      String var5 = BillingUtils.replaceLocale(var3);
      this.mTosUrl = var5;
   } 
 
   CarrierTosDialogFragment.CarrierTosWebViewClient getCarrierTosWebViewClient(View var1, View var2) {
      return new CarrierTosDialogFragment.CarrierTosWebViewClient(var1, var2);
   } 
 
   public void onCancel(DialogInterface var1) {
      super.onCancel(var1);
      CarrierTosDialogFragment.CarrierTosResultListener var2 = this.mListener;
      CarrierTosDialogFragment.CarrierTosResultListener.TosResult var3 = CarrierTosDialogFragment.CarrierTosResultListener.TosResult.CANCELED;
      var2.onCarrierTosResult(var3);
   } 
 
   public void onClick(View var1) {
      switch(var1.getId()) {
      case 2131755094: 
         PreferenceFile.SharedPreference var3 = BillingPreferences.ACCEPTED_CARRIER_TOS_VERSION;
         String var4 = this.mTosVersion;
         var3.put(var4);
         CarrierTosDialogFragment.CarrierTosResultListener var5 = this.mListener;
         CarrierTosDialogFragment.CarrierTosResultListener.TosResult var6 = CarrierTosDialogFragment.CarrierTosResultListener.TosResult.SUCCESS;
         var5.onCarrierTosResult(var6);
         return; 
      case 2131755095: 
         CarrierTosDialogFragment.CarrierTosResultListener var7 = this.mListener;
         CarrierTosDialogFragment.CarrierTosResultListener.TosResult var8 = CarrierTosDialogFragment.CarrierTosResultListener.TosResult.CANCELED;
         var7.onCarrierTosResult(var8);
         return; 
      default: 
         Object[] var2 = new Object[0];
         FinskyLog.d("Unexpected button press.", var2);
      } 
   } 
 
   public Dialog onCreateDialog(Bundle var1) {
      FragmentActivity var2 = this.getActivity();
      View var3 = View.inflate(new ContextThemeWrapper(var2, 16973829), 2130968596, (ViewGroup)null);
      this.setUpTos();
      Button var4 = (Button)var3.findViewById(2131755094);
      this.mAcceptButton = var4;
      this.mAcceptButton.setOnClickListener(this);
      ((Button)var3.findViewById(2131755095)).setOnClickListener(this);
      WebView var5 = (WebView)var3.findViewById(2131755081);
      View var6 = var3.findViewById(2131755082);
      View var7 = var3.findViewById(2131755079);
      CarrierTosDialogFragment.CarrierTosWebViewClient var8 = this.getCarrierTosWebViewClient(var6, var7);
      this.mTosWebViewclient = var8;
      CarrierTosDialogFragment.CarrierTosWebViewClient var9 = this.mTosWebViewclient;
      var5.setWebViewClient(var9);
      String var10 = this.mTosUrl;
      var5.loadUrl(var10);
      var5.getSettings().setSupportZoom((boolean)0);
      this.mAcceptButton.setEnabled((boolean)0);
      String var11 = BillingLocator.getCarrierBillingStorage().getParams().getName();
      FragmentActivity var12 = this.getActivity();
      Builder var13 = new Builder(var12);
      Object[] var14 = new Object[]{var11};
      String var15 = this.getString(2131230803, var14);
      AlertDialog var16 = var13.setTitle(var15).create();
      byte var17 = 0;
      byte var18 = 0;
      var16.setView(var3, 0, 5, var17, var18);
      return var16;