diff options
author | Yorke Lee <yorkelee@google.com> | 2014-09-08 21:55:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-08 21:55:27 +0000 |
commit | fe41c2b17078c2e3e0bb3a73869d85efd39b2d18 (patch) | |
tree | 949954261994a84743535dd8663bd2b46b8e9e52 | |
parent | 8ed8a5fed2d8a778073d45ae0b23a58620d55d28 (diff) | |
parent | 03610993bf2adf12a6962c32851095551ffd0043 (diff) |
am 03610993: Replace Calls.FEATURES_NONE with 0 (2/4)
* commit '03610993bf2adf12a6962c32851095551ffd0043':
Replace Calls.FEATURES_NONE with 0 (2/4)
5 files changed, 12 insertions, 14 deletions
diff --git a/src/com/android/dialer/PhoneCallDetails.java b/src/com/android/dialer/PhoneCallDetails.java index f6f9edace..ba049a2d7 100644 --- a/src/com/android/dialer/PhoneCallDetails.java +++ b/src/com/android/dialer/PhoneCallDetails.java @@ -96,8 +96,7 @@ public class PhoneCallDetails { CharSequence formattedNumber, String countryIso, String geocode, int[] callTypes, long date, long duration) { this (number, numberPresentation, formattedNumber, countryIso, geocode, - callTypes, date, duration, "", 0, "", null, null, 0, null, null, Calls.FEATURES_NONE, - null, null); + callTypes, date, duration, "", 0, "", null, null, 0, null, null, 0, null, null); } /** Create the details for a call with a number not associated with a contact. */ diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 23d053de8..921a1c4e8 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -1190,7 +1190,7 @@ public class CallLogAdapter extends GroupingListAdapter * @return The features. */ private int getCallFeatures(Cursor cursor, int count) { - int features = Calls.FEATURES_NONE; + int features = 0; int position = cursor.getPosition(); for (int index = 0; index < count; ++index) { features |= cursor.getInt(CallLogQuery.FEATURES); diff --git a/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java b/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java index 0190e4926..bc7c033b2 100644 --- a/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java +++ b/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java @@ -171,7 +171,7 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { * Tests a case where the video call feature is not present. */ public void testSetPhoneCallDetails_NoVideo() { - setPhoneCallDetailsWithFeatures(Calls.FEATURES_NONE); + setPhoneCallDetailsWithFeatures(0); assertIsVideoCall(false); } @@ -311,8 +311,8 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(number, presentation, formattedNumber, TEST_COUNTRY_ISO, TEST_GEOCODE, - new int[]{ Calls.VOICEMAIL_TYPE }, TEST_DATE, TEST_DURATION, null, null, - Calls.FEATURES_NONE, null, null) + new int[]{ Calls.VOICEMAIL_TYPE }, TEST_DATE, TEST_DURATION, null, null, 0, + null, null) ); } @@ -322,8 +322,8 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(number, Calls.PRESENTATION_ALLOWED, formattedNumber, TEST_COUNTRY_ISO, geocodedLocation, - new int[]{ Calls.VOICEMAIL_TYPE }, TEST_DATE, TEST_DURATION, null, null, - Calls.FEATURES_NONE, null, null) + new int[]{ Calls.VOICEMAIL_TYPE }, TEST_DATE, TEST_DURATION, null, null, 0, + null, null) ); } @@ -361,8 +361,8 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { mHelper.setCallDetailsHeader(mNameView, new PhoneCallDetails(number, presentation, TEST_FORMATTED_NUMBER, TEST_COUNTRY_ISO, TEST_GEOCODE, - new int[]{ Calls.INCOMING_TYPE }, TEST_DATE, TEST_DURATION, null, null, - Calls.FEATURES_NONE, null, null)); + new int[]{ Calls.INCOMING_TYPE }, TEST_DATE, TEST_DURATION, null, null, 0, + null, null)); } private void setCallDetailsHeader(String name) { @@ -370,6 +370,6 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { new PhoneCallDetails(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, TEST_FORMATTED_NUMBER, TEST_COUNTRY_ISO, TEST_GEOCODE, new int[]{ Calls.INCOMING_TYPE }, TEST_DATE, TEST_DURATION, - name, 0, "", null, null, 0, null, null, Calls.FEATURES_NONE, null, null)); + name, 0, "", null, null, 0, null, null, 0, null, null)); } } diff --git a/tests/src/com/android/dialer/calllog/CallLogQueryTestUtils.java b/tests/src/com/android/dialer/calllog/CallLogQueryTestUtils.java index 2f7d212ed..9d34bbfbe 100644 --- a/tests/src/com/android/dialer/calllog/CallLogQueryTestUtils.java +++ b/tests/src/com/android/dialer/calllog/CallLogQueryTestUtils.java @@ -29,8 +29,7 @@ public class CallLogQueryTestUtils { public static Object[] createTestValues() { Object[] values = new Object[]{ 0L, "", 0L, 0L, Calls.INCOMING_TYPE, "", "", "", null, 0, null, null, null, null, - 0L, null, 0, Calls.PRESENTATION_ALLOWED, null, null, Calls.FEATURES_NONE, null, - null + 0L, null, 0, Calls.PRESENTATION_ALLOWED, null, null, 0, null, null }; assertEquals(CallLogQuery._PROJECTION.length, values.length); return values; diff --git a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java index 81a4249ea..c6c969fd0 100644 --- a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java +++ b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java @@ -490,7 +490,7 @@ public class FillCallLogTestActivity extends Activity { Calendar dateTime = Calendar.getInstance(); dateTime.set(mCallDateYear, mCallDateMonth, mCallDateDay, mCallTimeHour, mCallTimeMinute); - int features = mCallTypeVideo.isChecked() ? Calls.FEATURES_VIDEO : Calls.FEATURES_NONE; + int features = mCallTypeVideo.isChecked() ? Calls.FEATURES_VIDEO : 0; Long dataUsage = null; if (mCallTypeVideo.isChecked()) { // Some random data usage up to 50MB. |