From 838988bf34229b33ed39bb7dc7109427da264c81 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 25 Sep 2015 17:12:58 -0700 Subject: 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 --- .../android/dialer/util/AppCompatConstants.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/com/android/dialer/util/AppCompatConstants.java (limited to 'src/com/android/dialer/util/AppCompatConstants.java') 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; +} -- cgit v1.2.3