Loading src/com/android/contacts/quickcontact/QuickContactActivity.java +20 −10 Original line number Diff line number Diff line Loading @@ -250,6 +250,8 @@ public class QuickContactActivity extends ContactsActivity { public static final String MIMETYPE_TACHYON = "vnd.android.cursor.item/com.google.android.apps.tachyon.phone"; private static final String TACHYON_CALL_ACTION = "com.google.android.apps.tachyon.action.CALL"; private static final String MIMETYPE_GPLUS_PROFILE = "vnd.android.cursor.item/vnd.googleplus.profile"; private static final String GPLUS_PROFILE_DATA_5_VIEW_PROFILE = "view"; Loading Loading @@ -443,7 +445,13 @@ public class QuickContactActivity extends ContactsActivity { final String thirdPartyAction = intent.getStringExtra(EXTRA_THIRD_PARTY_ACTION); Logger.logQuickContactEvent(mReferrer, mContactType, CardType.UNKNOWN_CARD, actionType, thirdPartyAction); ImplicitIntentsUtil.startActivityInAppIfPossible(QuickContactActivity.this, intent); // For the tachyon call action, we need to use startActivityForResult. if (TACHYON_CALL_ACTION.equals(intent.getAction())) { QuickContactActivity.this.startActivityForResult(intent, /* requestCode */ 0); } else { ImplicitIntentsUtil.startActivityInAppIfPossible(QuickContactActivity.this, intent); } } catch (SecurityException ex) { Toast.makeText(QuickContactActivity.this, R.string.missing_app, Toast.LENGTH_SHORT).show(); Loading Loading @@ -1457,6 +1465,7 @@ public class QuickContactActivity extends ContactsActivity { final String mimeType = dataItem.getMimeType(); if (mimeType == null) continue; if (!MIMETYPE_TACHYON.equals(mimeType)) { final AccountType accountType = rawContact.getAccountType(this); final DataKind dataKind = AccountTypeManager.getInstance(this) .getKindOrFallback(accountType, mimeType); Loading @@ -1468,6 +1477,7 @@ public class QuickContactActivity extends ContactsActivity { dataKind)); if (isMimeExcluded(mimeType) || !hasData) continue; } List<DataItem> dataItemListByType = dataItemsMap.get(mimeType); if (dataItemListByType == null) { Loading Loading @@ -1814,7 +1824,7 @@ public class QuickContactActivity extends ContactsActivity { && ((PhoneDataItem) dataItem).isTachyonReachable()) { thirdIcon = res.getDrawable(R.drawable.quantum_ic_videocam_vd_theme_24); thirdAction = Entry.ACTION_INTENT; thirdIntent = new Intent("com.google.android.apps.tachyon.action.CALL"); thirdIntent = new Intent(TACHYON_CALL_ACTION); thirdIntent.setData( Uri.fromParts(PhoneAccount.SCHEME_TEL, phone.getNumber(), null)); thirdContentDescription = ((PhoneDataItem) dataItem).getReachableDataItem() Loading Loading
src/com/android/contacts/quickcontact/QuickContactActivity.java +20 −10 Original line number Diff line number Diff line Loading @@ -250,6 +250,8 @@ public class QuickContactActivity extends ContactsActivity { public static final String MIMETYPE_TACHYON = "vnd.android.cursor.item/com.google.android.apps.tachyon.phone"; private static final String TACHYON_CALL_ACTION = "com.google.android.apps.tachyon.action.CALL"; private static final String MIMETYPE_GPLUS_PROFILE = "vnd.android.cursor.item/vnd.googleplus.profile"; private static final String GPLUS_PROFILE_DATA_5_VIEW_PROFILE = "view"; Loading Loading @@ -443,7 +445,13 @@ public class QuickContactActivity extends ContactsActivity { final String thirdPartyAction = intent.getStringExtra(EXTRA_THIRD_PARTY_ACTION); Logger.logQuickContactEvent(mReferrer, mContactType, CardType.UNKNOWN_CARD, actionType, thirdPartyAction); ImplicitIntentsUtil.startActivityInAppIfPossible(QuickContactActivity.this, intent); // For the tachyon call action, we need to use startActivityForResult. if (TACHYON_CALL_ACTION.equals(intent.getAction())) { QuickContactActivity.this.startActivityForResult(intent, /* requestCode */ 0); } else { ImplicitIntentsUtil.startActivityInAppIfPossible(QuickContactActivity.this, intent); } } catch (SecurityException ex) { Toast.makeText(QuickContactActivity.this, R.string.missing_app, Toast.LENGTH_SHORT).show(); Loading Loading @@ -1457,6 +1465,7 @@ public class QuickContactActivity extends ContactsActivity { final String mimeType = dataItem.getMimeType(); if (mimeType == null) continue; if (!MIMETYPE_TACHYON.equals(mimeType)) { final AccountType accountType = rawContact.getAccountType(this); final DataKind dataKind = AccountTypeManager.getInstance(this) .getKindOrFallback(accountType, mimeType); Loading @@ -1468,6 +1477,7 @@ public class QuickContactActivity extends ContactsActivity { dataKind)); if (isMimeExcluded(mimeType) || !hasData) continue; } List<DataItem> dataItemListByType = dataItemsMap.get(mimeType); if (dataItemListByType == null) { Loading Loading @@ -1814,7 +1824,7 @@ public class QuickContactActivity extends ContactsActivity { && ((PhoneDataItem) dataItem).isTachyonReachable()) { thirdIcon = res.getDrawable(R.drawable.quantum_ic_videocam_vd_theme_24); thirdAction = Entry.ACTION_INTENT; thirdIntent = new Intent("com.google.android.apps.tachyon.action.CALL"); thirdIntent = new Intent(TACHYON_CALL_ACTION); thirdIntent.setData( Uri.fromParts(PhoneAccount.SCHEME_TEL, phone.getNumber(), null)); thirdContentDescription = ((PhoneDataItem) dataItem).getReachableDataItem() Loading