Allow google dialer code to be compiled against M and N SDKs for enterprise features

Following dialer's practice, use src-N and pre-N to separate implementation
in different build sdk

BUG=26312016

Change-Id: Ib80a377564ed5a57bcaf2a78ac746ffbeb20bdbd
diff --git a/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java b/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
index 9080484..8d45efb 100644
--- a/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
+++ b/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
@@ -34,6 +34,7 @@
 import android.text.TextUtils;
 
 import com.android.contacts.common.ContactsUtils;
+import com.android.contacts.common.compat.DirectoryCompat;
 import com.android.contacts.common.util.TelephonyManagerUtils;
 import com.android.dialer.calllog.ContactInfoHelper;
 import com.android.dialer.service.CachedNumberLookupService;
@@ -460,9 +461,7 @@
             int idIndex = cursor.getColumnIndex(Directory._ID);
             while (cursor.moveToNext()) {
                 long id = cursor.getLong(idIndex);
-                // TODO(b/26019967): in N SDK, use Directory.isRemoteDirectory
-                if (id != Directory.DEFAULT && id != Directory.LOCAL_INVISIBLE && id != 1000000000
-                        && id != 1000000001) {
+                if (DirectoryCompat.isRemoteDirectory(id)) {
                     results.add(id);
                 }
             }