1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.dialer.calllog; 18 19 import static junit.framework.Assert.assertEquals; 20 21 import android.provider.CallLog.Calls; 22 23 import com.android.contacts.common.compat.CompatUtils; 24 25 /** 26 * Helper class to create test values for {@link CallLogQuery}. 27 */ 28 public class CallLogQueryTestUtils { createTestValues()29 public static Object[] createTestValues() { 30 Object[] values; 31 if (CompatUtils.isNCompatible()) { 32 values = new Object[]{ 33 0L, "", 0L, 0L, Calls.INCOMING_TYPE, "", "", "", null, 0, null, null, null, 34 null, 0L, null, 0, Calls.PRESENTATION_ALLOWED, null, null, 0, null, null, 35 null, "", "" 36 }; 37 } else { 38 values = new Object[]{ 39 0L, "", 0L, 0L, Calls.INCOMING_TYPE, "", "", "", null, 0, null, null, null, 40 null, 0L, null, 0, Calls.PRESENTATION_ALLOWED, null, null, 0, null, null, null 41 }; 42 } 43 assertEquals(CallLogQuery._PROJECTION.length, values.length); 44 return values; 45 } 46 } 47