コード例 #1
0
 public void b(YellowPage yellowPage) {
   Log.d("YellowPageActivity", "onYellowPageLoaded");
   if (yellowPage != null) {
     this.ld = yellowPage.getId();
     this.mTitle.setText(yellowPage.getName());
     if (TextUtils.isEmpty(yellowPage.getAuthIconName())) {
       this.uX.setVisibility(8);
       return;
     }
     this.uX.setVisibility(0);
     YellowPageImgLoader.loadImage(
         this, this.uX, null, ImageFormat.PNG, yellowPage.getAuthIconName(), this.Lr, this.Lr, 0);
     return;
   }
   Log.e("YellowPageActivity", "The yellow page is null");
 }
コード例 #2
0
 private void ir() {
   int i = 0;
   YellowPage bl = this.Lo.bl();
   if (bl != null) {
     List phones = bl.getPhones();
     if (phones != null) {
       int i2;
       Intent intent = new Intent("android.intent.action.INSERT", Contacts.CONTENT_URI);
       intent.putExtra(MiniDefine.l, bl.getName());
       CharSequence bm = this.Lo.bm();
       if (TextUtils.isEmpty(bm)) {
         i2 = 0;
       } else {
         intent.putExtra("phone", bm);
         i2 = 1;
       }
       int i3 = i2;
       while (phones.size() > i && i3 < 4) {
         String number = ((YellowPagePhone) phones.get(i)).getNumber();
         if (!TextUtils.equals(bm, number)) {
           switch (i3) {
             case TransactionXMLFile.MODE_PRIVATE /*0*/:
               intent.putExtra("phone", number);
               i2 = i3 + 1;
               continue;
             case TransactionXMLFile.MODE_WORLD_READABLE /*1*/:
               intent.putExtra("secondary_phone", number);
               i2 = i3 + 1;
               continue;
             case TransactionXMLFile.MODE_WORLD_WRITEABLE /*2*/:
               intent.putExtra("tertiary_phone", number);
               i2 = i3 + 1;
               continue;
           }
         }
         i2 = i3;
         i++;
         i3 = i2;
       }
       startActivity(IntentScope.processIntentScope(this, intent, "com.android.contacts"));
     }
   }
 }