summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/util/AppCompatConstants.java
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-09-25 17:12:58 -0700
committerAndrew Lee <anwlee@google.com>2015-10-02 15:40:03 -0700
commit838988bf34229b33ed39bb7dc7109427da264c81 (patch)
treeea1bd2be21aaa0cc9d5c72516793cfd5ec27a0fd /src/com/android/dialer/util/AppCompatConstants.java
parent071d0a4f1c8cf6b6131b7aeabfd2c6b0560b413f (diff)
Add BLOCKED call type and util to mark in call log.
To support call blocking, added BLOCKED call type. Also added utility to be able to mark the most recent call from a number as BLOCKEd in the call log database. Added REJECTED call type as well. This is not presently used within our application, but we want to reserve the integer, anticipating changes in the framework to add this constant. Introduced AppCompConstants, because BLOCKED and REJECTED call type values will not be defined as part of the API on M devices. Change existing call type constants to reference this compatability class. Bug: 24341350 Change-Id: I523ebd8dd1844a3b71a69a14bd38073be5940804
Diffstat (limited to 'src/com/android/dialer/util/AppCompatConstants.java')
-rw-r--r--src/com/android/dialer/util/AppCompatConstants.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/com/android/dialer/util/AppCompatConstants.java b/src/com/android/dialer/util/AppCompatConstants.java
new file mode 100644
index 000000000..1d52eee1d
--- /dev/null
+++ b/src/com/android/dialer/util/AppCompatConstants.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.dialer.util;
+
+import android.provider.CallLog.Calls;
+
+public final class AppCompatConstants {
+
+ public static final int CALLS_INCOMING_TYPE = Calls.INCOMING_TYPE;
+ public static final int CALLS_OUTGOING_TYPE = Calls.OUTGOING_TYPE;
+ public static final int CALLS_MISSED_TYPE = Calls.MISSED_TYPE;
+ public static final int CALLS_VOICEMAIL_TYPE = Calls.VOICEMAIL_TYPE;
+ // Added to android.provider.CallLog.Calls in N+.
+ public static final int CALLS_REJECTED_TYPE = 5;
+ // Added to android.provider.CallLog.Calls in N+.
+ public static final int CALLS_BLOCKED_TYPE = 6;
+}