diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-08-31 16:17:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-31 16:17:04 +0000 |
commit | c39ea3c55fac807c0b98aabdf56c70dc8a49036c (patch) | |
tree | e282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/dialer/phonenumbercache/CallLogQuery.java | |
parent | 68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff) | |
parent | 2ca4318cc1ee57dda907ba2069bd61d162b1baef (diff) |
Merge "Update Dialer source to latest internal Google revision."
Diffstat (limited to 'java/com/android/dialer/phonenumbercache/CallLogQuery.java')
-rw-r--r-- | java/com/android/dialer/phonenumbercache/CallLogQuery.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/java/com/android/dialer/phonenumbercache/CallLogQuery.java b/java/com/android/dialer/phonenumbercache/CallLogQuery.java index 6d4756927..2ebc302cf 100644 --- a/java/com/android/dialer/phonenumbercache/CallLogQuery.java +++ b/java/com/android/dialer/phonenumbercache/CallLogQuery.java @@ -60,6 +60,9 @@ public final class CallLogQuery { @RequiresApi(VERSION_CODES.N) public static final int VIA_NUMBER = 25; + @RequiresApi(VERSION_CODES.O) + public static final int TRANSCRIPTION_STATE = 26; + private static final String[] PROJECTION_M = new String[] { Calls._ID, // 0 @@ -97,8 +100,23 @@ public final class CallLogQuery { PROJECTION_N = projectionList.toArray(new String[projectionList.size()]); } + private static final String[] PROJECTION_O; + + // TODO(mdooley): remove when this becomes a public api + // Copied from android.provider.CallLog.Calls + private static final String TRANSCRIPTION_STATE_COLUMN = "transcription_state"; + + static { + List<String> projectionList = new ArrayList<>(Arrays.asList(PROJECTION_N)); + projectionList.add(TRANSCRIPTION_STATE_COLUMN); + PROJECTION_O = projectionList.toArray(new String[projectionList.size()]); + } + @NonNull public static String[] getProjection() { + if (VERSION.SDK_INT >= VERSION_CODES.O) { + return PROJECTION_O; + } if (VERSION.SDK_INT >= VERSION_CODES.N) { return PROJECTION_N; } |