Loading src/com/android/contacts/CallDetailActivity.java +5 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public class CallDetailActivity extends ListActivity implements CallLog.Calls.NUMBER, CallLog.Calls.TYPE, CallLog.Calls.COUNTRY_ISO, CallLog.Calls.GEOCODED_LOCATION, }; static final int DATE_COLUMN_INDEX = 0; Loading @@ -123,6 +124,7 @@ public class CallDetailActivity extends ListActivity implements static final int NUMBER_COLUMN_INDEX = 2; static final int CALL_TYPE_COLUMN_INDEX = 3; static final int COUNTRY_ISO_COLUMN_INDEX = 4; static final int GEOCODED_LOCATION_COLUMN_INDEX = 5; static final String[] PHONES_PROJECTION = new String[] { PhoneLookup._ID, Loading Loading @@ -403,6 +405,8 @@ public class CallDetailActivity extends ListActivity implements long duration = callCursor.getLong(DURATION_COLUMN_INDEX); int callType = callCursor.getInt(CALL_TYPE_COLUMN_INDEX); String countryIso = callCursor.getString(COUNTRY_ISO_COLUMN_INDEX); final String geocode = callCursor.getString(GEOCODED_LOCATION_COLUMN_INDEX); if (TextUtils.isEmpty(countryIso)) { countryIso = mDefaultCountryIso; } Loading Loading @@ -448,7 +452,7 @@ public class CallDetailActivity extends ListActivity implements numberText = candidateNumberText; } } return new PhoneCallDetails(number, numberText, countryIso, return new PhoneCallDetails(number, numberText, countryIso, geocode, new int[]{ callType }, date, duration, nameText, numberType, numberLabel, personId, photoUri); } finally { Loading src/com/android/contacts/PhoneCallDetails.java +7 −3 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ public class PhoneCallDetails { public final CharSequence formattedNumber; /** The country corresponding with the phone number. */ public final String countryIso; /** The geocoded location for the phone number. */ public final String geocode; /** * The type of calls, as defined in the call log table, e.g., {@link Calls#INCOMING_TYPE}. * <p> Loading @@ -56,18 +58,20 @@ public class PhoneCallDetails { /** Create the details for a call with a number not associated with a contact. */ public PhoneCallDetails(CharSequence number, CharSequence formattedNumber, String countryIso, int[] callTypes, long date, long duration) { this(number, formattedNumber, countryIso, callTypes, date, duration, "", 0, "", -1L, null); String countryIso, String geocode, int[] callTypes, long date, long duration) { this(number, formattedNumber, countryIso, geocode, callTypes, date, duration, "", 0, "", -1L, null); } /** Create the details for a call with a number associated with a contact. */ public PhoneCallDetails(CharSequence number, CharSequence formattedNumber, String countryIso, int[] callTypes, long date, long duration, String countryIso, String geocode, int[] callTypes, long date, long duration, CharSequence name, int numberType, CharSequence numberLabel, long personId, Uri photoUri) { this.number = number; this.formattedNumber = formattedNumber; this.countryIso = countryIso; this.geocode = geocode; this.callTypes = callTypes; this.date = date; this.duration = duration; Loading src/com/android/contacts/PhoneCallDetailsHelper.java +2 −4 Original line number Diff line number Diff line Loading @@ -107,12 +107,10 @@ public class PhoneCallDetailsHelper { mPhoneNumberHelper.getDisplayNumber(details.number, details.formattedNumber); if (TextUtils.isEmpty(details.name)) { nameText = displayNumber; String geocode = mPhoneNumberHelper.getGeocodeForNumber( details.number.toString(), details.countryIso); if (TextUtils.isEmpty(geocode)) { if (TextUtils.isEmpty(details.geocode)) { numberText = mResources.getString(R.string.call_log_empty_gecode); } else { numberText = geocode; numberText = details.geocode; } } else { nameText = details.name; Loading src/com/android/contacts/calllog/CallLogFragment.java +6 −3 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility Calls.TYPE, Calls.COUNTRY_ISO, Calls.VOICEMAIL_URI, Calls.GEOCODED_LOCATION, }; public static final int ID = 0; Loading @@ -98,6 +99,7 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility public static final int CALL_TYPE = 4; public static final int COUNTRY_ISO = 5; public static final int VOICEMAIL_URI = 6; public static final int GEOCODED_LOCATION = 7; /** * The name of the synthetic "section" column. Loading @@ -107,7 +109,7 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility */ public static final String SECTION_NAME = "section"; /** The index of the "section" column in the projection. */ public static final int SECTION = 7; public static final int SECTION = 8; /** The value of the "section" column for the header of the new section. */ public static final int SECTION_NEW_HEADER = 0; /** The value of the "section" column for the items of the new section. */ Loading Loading @@ -754,12 +756,13 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility final Uri thumbnailUri = info.thumbnailUri; final String lookupKey = info.lookupKey; final int[] callTypes = getCallTypes(c, count); final String geocode = c.getString(CallLogQuery.GEOCODED_LOCATION); final PhoneCallDetails details; if (TextUtils.isEmpty(name)) { details = new PhoneCallDetails(number, formattedNumber, countryIso, details = new PhoneCallDetails(number, formattedNumber, countryIso, geocode, callTypes, date, duration); } else { details = new PhoneCallDetails(number, formattedNumber, countryIso, details = new PhoneCallDetails(number, formattedNumber, countryIso, geocode, callTypes, date, duration, name, ntype, label, personId, thumbnailUri); } Loading src/com/android/contacts/calllog/CallLogQueryHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ import javax.annotation.concurrent.GuardedBy; new MatrixCursor(CallLogFragment.CallLogQuery.EXTENDED_PROJECTION); // The values in this row correspond to default values for _PROJECTION from CallLogQuery // plus the section value. matrixCursor.addRow(new Object[]{ -1L, "", 0L, 0L, 0, "", "", section }); matrixCursor.addRow(new Object[]{ -1L, "", 0L, 0L, 0, "", "", "", section }); return matrixCursor; } Loading Loading
src/com/android/contacts/CallDetailActivity.java +5 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public class CallDetailActivity extends ListActivity implements CallLog.Calls.NUMBER, CallLog.Calls.TYPE, CallLog.Calls.COUNTRY_ISO, CallLog.Calls.GEOCODED_LOCATION, }; static final int DATE_COLUMN_INDEX = 0; Loading @@ -123,6 +124,7 @@ public class CallDetailActivity extends ListActivity implements static final int NUMBER_COLUMN_INDEX = 2; static final int CALL_TYPE_COLUMN_INDEX = 3; static final int COUNTRY_ISO_COLUMN_INDEX = 4; static final int GEOCODED_LOCATION_COLUMN_INDEX = 5; static final String[] PHONES_PROJECTION = new String[] { PhoneLookup._ID, Loading Loading @@ -403,6 +405,8 @@ public class CallDetailActivity extends ListActivity implements long duration = callCursor.getLong(DURATION_COLUMN_INDEX); int callType = callCursor.getInt(CALL_TYPE_COLUMN_INDEX); String countryIso = callCursor.getString(COUNTRY_ISO_COLUMN_INDEX); final String geocode = callCursor.getString(GEOCODED_LOCATION_COLUMN_INDEX); if (TextUtils.isEmpty(countryIso)) { countryIso = mDefaultCountryIso; } Loading Loading @@ -448,7 +452,7 @@ public class CallDetailActivity extends ListActivity implements numberText = candidateNumberText; } } return new PhoneCallDetails(number, numberText, countryIso, return new PhoneCallDetails(number, numberText, countryIso, geocode, new int[]{ callType }, date, duration, nameText, numberType, numberLabel, personId, photoUri); } finally { Loading
src/com/android/contacts/PhoneCallDetails.java +7 −3 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ public class PhoneCallDetails { public final CharSequence formattedNumber; /** The country corresponding with the phone number. */ public final String countryIso; /** The geocoded location for the phone number. */ public final String geocode; /** * The type of calls, as defined in the call log table, e.g., {@link Calls#INCOMING_TYPE}. * <p> Loading @@ -56,18 +58,20 @@ public class PhoneCallDetails { /** Create the details for a call with a number not associated with a contact. */ public PhoneCallDetails(CharSequence number, CharSequence formattedNumber, String countryIso, int[] callTypes, long date, long duration) { this(number, formattedNumber, countryIso, callTypes, date, duration, "", 0, "", -1L, null); String countryIso, String geocode, int[] callTypes, long date, long duration) { this(number, formattedNumber, countryIso, geocode, callTypes, date, duration, "", 0, "", -1L, null); } /** Create the details for a call with a number associated with a contact. */ public PhoneCallDetails(CharSequence number, CharSequence formattedNumber, String countryIso, int[] callTypes, long date, long duration, String countryIso, String geocode, int[] callTypes, long date, long duration, CharSequence name, int numberType, CharSequence numberLabel, long personId, Uri photoUri) { this.number = number; this.formattedNumber = formattedNumber; this.countryIso = countryIso; this.geocode = geocode; this.callTypes = callTypes; this.date = date; this.duration = duration; Loading
src/com/android/contacts/PhoneCallDetailsHelper.java +2 −4 Original line number Diff line number Diff line Loading @@ -107,12 +107,10 @@ public class PhoneCallDetailsHelper { mPhoneNumberHelper.getDisplayNumber(details.number, details.formattedNumber); if (TextUtils.isEmpty(details.name)) { nameText = displayNumber; String geocode = mPhoneNumberHelper.getGeocodeForNumber( details.number.toString(), details.countryIso); if (TextUtils.isEmpty(geocode)) { if (TextUtils.isEmpty(details.geocode)) { numberText = mResources.getString(R.string.call_log_empty_gecode); } else { numberText = geocode; numberText = details.geocode; } } else { nameText = details.name; Loading
src/com/android/contacts/calllog/CallLogFragment.java +6 −3 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility Calls.TYPE, Calls.COUNTRY_ISO, Calls.VOICEMAIL_URI, Calls.GEOCODED_LOCATION, }; public static final int ID = 0; Loading @@ -98,6 +99,7 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility public static final int CALL_TYPE = 4; public static final int COUNTRY_ISO = 5; public static final int VOICEMAIL_URI = 6; public static final int GEOCODED_LOCATION = 7; /** * The name of the synthetic "section" column. Loading @@ -107,7 +109,7 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility */ public static final String SECTION_NAME = "section"; /** The index of the "section" column in the projection. */ public static final int SECTION = 7; public static final int SECTION = 8; /** The value of the "section" column for the header of the new section. */ public static final int SECTION_NEW_HEADER = 0; /** The value of the "section" column for the items of the new section. */ Loading Loading @@ -754,12 +756,13 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility final Uri thumbnailUri = info.thumbnailUri; final String lookupKey = info.lookupKey; final int[] callTypes = getCallTypes(c, count); final String geocode = c.getString(CallLogQuery.GEOCODED_LOCATION); final PhoneCallDetails details; if (TextUtils.isEmpty(name)) { details = new PhoneCallDetails(number, formattedNumber, countryIso, details = new PhoneCallDetails(number, formattedNumber, countryIso, geocode, callTypes, date, duration); } else { details = new PhoneCallDetails(number, formattedNumber, countryIso, details = new PhoneCallDetails(number, formattedNumber, countryIso, geocode, callTypes, date, duration, name, ntype, label, personId, thumbnailUri); } Loading
src/com/android/contacts/calllog/CallLogQueryHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ import javax.annotation.concurrent.GuardedBy; new MatrixCursor(CallLogFragment.CallLogQuery.EXTENDED_PROJECTION); // The values in this row correspond to default values for _PROJECTION from CallLogQuery // plus the section value. matrixCursor.addRow(new Object[]{ -1L, "", 0L, 0L, 0, "", "", section }); matrixCursor.addRow(new Object[]{ -1L, "", 0L, 0L, 0, "", "", "", section }); return matrixCursor; } Loading