diff options
author | linyuh <linyuh@google.com> | 2018-03-26 12:46:18 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-26 22:23:52 -0700 |
commit | 437ae9552cce7768068fa92663740711ee541417 (patch) | |
tree | 1ae9af42ed23c09404b87ca613247e18c3fa10d2 /java/com/android/incallui/CallerInfoAsyncQuery.java | |
parent | cf14ecbc3cb604804ae1f9d01e47444fcf0eedc6 (diff) |
Remove obsolete version checks and compat utilities after min SDK was bumped up to N.
Test: Existing tests
PiperOrigin-RevId: 190508397
Change-Id: Ia5f33e45af1d1cc666fec5f43efa564b2b68c193
Diffstat (limited to 'java/com/android/incallui/CallerInfoAsyncQuery.java')
-rw-r--r-- | java/com/android/incallui/CallerInfoAsyncQuery.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/java/com/android/incallui/CallerInfoAsyncQuery.java b/java/com/android/incallui/CallerInfoAsyncQuery.java index 4170cc318..0ac252acf 100644 --- a/java/com/android/incallui/CallerInfoAsyncQuery.java +++ b/java/com/android/incallui/CallerInfoAsyncQuery.java @@ -24,7 +24,6 @@ import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.net.Uri; -import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.os.Handler; import android.os.Looper; @@ -36,7 +35,6 @@ import android.support.annotation.MainThread; import android.support.annotation.RequiresPermission; import android.support.annotation.WorkerThread; import android.text.TextUtils; -import com.android.dialer.common.cp2.DirectoryCompat; import com.android.dialer.phonenumbercache.CachedNumberLookupService; import com.android.dialer.phonenumbercache.CachedNumberLookupService.CachedContactInfo; import com.android.dialer.phonenumbercache.ContactInfoHelper; @@ -174,7 +172,7 @@ public class CallerInfoAsyncQuery { cw.event = EVENT_NEW_QUERY; } - String[] proejection = CallerInfo.getDefaultPhoneLookupProjection(contactRef); + String[] proejection = CallerInfo.getDefaultPhoneLookupProjection(); handler.startQuery( token, cw, // cookie @@ -223,10 +221,7 @@ public class CallerInfoAsyncQuery { private static long[] getDirectoryIds(Context context) { ArrayList<Long> results = new ArrayList<>(); - Uri uri = Directory.CONTENT_URI; - if (VERSION.SDK_INT >= VERSION_CODES.N) { - uri = Uri.withAppendedPath(ContactsContract.AUTHORITY_URI, "directories_enterprise"); - } + Uri uri = Uri.withAppendedPath(ContactsContract.AUTHORITY_URI, "directories_enterprise"); ContentResolver cr = context.getContentResolver(); Cursor cursor = cr.query(uri, DIRECTORY_PROJECTION, null, null, null); @@ -244,7 +239,7 @@ public class CallerInfoAsyncQuery { int idIndex = cursor.getColumnIndex(Directory._ID); while (cursor.moveToNext()) { long id = cursor.getLong(idIndex); - if (DirectoryCompat.isRemoteDirectoryId(id)) { + if (Directory.isRemoteDirectoryId(id)) { results.add(id); } } |