コード例 #1
0
 private void a(MenuItem menuItem) {
   if (this.Lo != null) {
     YellowPage bl = this.Lo.bl();
     if (!(bl == null || bl.getPhones() == null)) {
       menuItem.setVisible(true);
       return;
     }
   }
   menuItem.setVisible(false);
 }
コード例 #2
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");
 }
コード例 #3
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"));
     }
   }
 }
コード例 #4
0
ファイル: E.java プロジェクト: kansifang/REMIUI
 public static com.miui.yellowpage.base.model.YellowPage i(Context context, String str) {
   com.miui.yellowpage.base.model.YellowPage yellowPage = null;
   Cursor query =
       context
           .getContentResolver()
           .query(
               YellowPage.CONTENT_URI,
               new String[] {MiniDefine.at},
               "yid = ?",
               new String[] {str},
               null);
   if (query != null) {
     try {
       if (query.moveToFirst()) {
         yellowPage = com.miui.yellowpage.base.model.YellowPage.fromJson(query.getString(0));
       } else {
         query.close();
       }
     } finally {
       query.close();
     }
   }
   return yellowPage;
 }