diff options
author | Yorke Lee <yorkelee@google.com> | 2014-09-08 13:38:28 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-09-08 13:38:33 -0700 |
commit | 03610993bf2adf12a6962c32851095551ffd0043 (patch) | |
tree | f82eb3da887895a34fcc646422b9964a4e85fc5a | |
parent | ae274c05cdb6707ca9593bedf20c016cd8164c0b (diff) |
Replace Calls.FEATURES_NONE with 0 (2/4)
Bug: 17253963
Change-Id: I9e9e56cdf4c9a60ac1e047bef0eba2ba0c8f10fb
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. |