Code example for SimpleDateFormat

Methods: applyPatterntoPattern

0
    this.c = android.text.format.DateFormat.getTimeFormat(paramContext);
    this.d = paramContext.getContentResolver();
    if ((this.b instanceof SimpleDateFormat))
    { 
      SimpleDateFormat localSimpleDateFormat = (SimpleDateFormat)this.b;
      localSimpleDateFormat.applyPattern(localSimpleDateFormat.toPattern().replaceAll("\\s?[/\\-]?\\s?yyyy\\s?[/\\-\\.]?\\s?", ""));
    } 
    c(paramCursor);
  } 
 
  private void a(Cursor paramCursor, u paramu)
  { 
    String str1 = paramCursor.getString(this.g);
    String str2 = str1.substring(1, -1 + str1.length());
    if ((!TextUtils.isEmpty(str2)) && (str2.indexOf(", ") < 0))
    { 
      Uri localUri = ContactsContract.Contacts.lookupContact(this.d, Uri.parse(str2));
      InputStream localInputStream = ContactsContract.Contacts.openContactPhotoInputStream(this.d, localUri);
      if (localInputStream != null)
        u.e(paramu).setImageBitmap(BitmapFactory.decodeStream(localInputStream));