diff options
| author | 2018-11-13 23:33:07 -0800 | |
|---|---|---|
| committer | 2018-11-13 23:33:07 -0800 | |
| commit | 5f2441c3430cb176f4055e7c386c66ce2d86c1de (patch) | |
| tree | f6f34a29ca8268e25e7b346ebeb7c55100285f1d | |
| parent | bed2a24661512c8fef98f561fdd08f25cd196608 (diff) | |
| parent | 1e8399f1abed7ede9a8fefe7063f50cfe0c19334 (diff) | |
Merge changes from topics "getLine1Number fix", "sms_corruption", "Initial RCS CL"
am: 1e8399f1ab
Change-Id: Ifef9b938c88243a328c5e6de8b40c1e7bc54c6af
| -rw-r--r-- | Android.bp | 1 | ||||
| -rw-r--r-- | core/res/AndroidManifest.xml | 1 | ||||
| -rw-r--r-- | telephony/java/android/provider/Telephony.java | 25 | ||||
| -rw-r--r-- | telephony/java/android/telephony/RcsManager.java | 52 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/IRcs.aidl | 21 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/TelephonyIntents.java | 14 |
6 files changed, 112 insertions, 2 deletions
diff --git a/Android.bp b/Android.bp index 170e22e1cbde..f49e4e5eb496 100644 --- a/Android.bp +++ b/Android.bp @@ -546,6 +546,7 @@ java_defaults { "telephony/java/com/android/internal/telephony/IOnSubscriptionsChangedListener.aidl", "telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl", "telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl", + "telephony/java/com/android/internal/telephony/IRcs.aidl", "telephony/java/com/android/internal/telephony/ISms.aidl", "telephony/java/com/android/internal/telephony/ISub.aidl", "telephony/java/com/android/internal/telephony/IAns.aidl", diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index f599b1fbc206..9ce6044bcf3e 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -399,6 +399,7 @@ <protected-broadcast android:name="android.telecom.action.DEFAULT_DIALER_CHANGED" /> <protected-broadcast android:name="android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED" /> <protected-broadcast android:name="android.provider.action.SMS_MMS_DB_CREATED" /> + <protected-broadcast android:name="android.provider.action.SMS_MMS_DB_LOST" /> <protected-broadcast android:name="android.intent.action.CONTENT_CHANGED" /> <protected-broadcast android:name="android.provider.Telephony.MMS_DOWNLOADED" /> diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java index 6d3345e08a88..efea81763b9f 100644 --- a/telephony/java/android/provider/Telephony.java +++ b/telephony/java/android/provider/Telephony.java @@ -16,6 +16,7 @@ package android.provider; +import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; @@ -1209,6 +1210,30 @@ public final class Telephony { "android.provider.extra.IS_INITIAL_CREATE"; /** + * Broadcast intent action indicating that the telephony provider SMS MMS database is + * corrupted. A boolean is specified in {@link #EXTRA_IS_CORRUPTED} to indicate if the + * database is corrupted. Requires the + * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE permission. + * + * @hide + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) + public static final String ACTION_SMS_MMS_DB_LOST = + "android.provider.action.SMS_MMS_DB_LOST"; + + /** + * Boolean flag passed as an extra with {@link #ACTION_SMS_MMS_DB_LOST} to indicate + * whether the DB got corrupted or not. + * + * @see #ACTION_SMS_MMS_DB_LOST + * + * @hide + */ + public static final String EXTRA_IS_CORRUPTED = + "android.provider.extra.IS_CORRUPTED"; + + /** * Read the PDUs out of an {@link #SMS_RECEIVED_ACTION} or a * {@link #DATA_SMS_RECEIVED_ACTION} intent. * diff --git a/telephony/java/android/telephony/RcsManager.java b/telephony/java/android/telephony/RcsManager.java new file mode 100644 index 000000000000..00ce03a1f668 --- /dev/null +++ b/telephony/java/android/telephony/RcsManager.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2018 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 android.telephony; + +import android.os.RemoteException; +import android.os.ServiceManager; + +import com.android.internal.telephony.IRcs; + +/** + * RcsManager is the application interface to RcsProvider and provides access methods to + * RCS related database tables. + * @hide - TODO make this public + */ +public class RcsManager { + private static final String TAG = "RcsManager"; + private static final boolean VDBG = false; + + /** + * Delete the RcsThread identified by the given threadId. + * @param threadId threadId of the thread to be deleted. + */ + public void deleteThread(int threadId) { + if (VDBG) logd("deleteThread: threadId: " + threadId); + try { + IRcs iRcs = IRcs.Stub.asInterface(ServiceManager.getService("ircs")); + if (iRcs != null) { + iRcs.deleteThread(threadId); + } + } catch (RemoteException re) { + + } + } + + private static void logd(String msg) { + Rlog.d(TAG, msg); + } +} diff --git a/telephony/java/com/android/internal/telephony/IRcs.aidl b/telephony/java/com/android/internal/telephony/IRcs.aidl new file mode 100644 index 000000000000..ede8695ef08e --- /dev/null +++ b/telephony/java/com/android/internal/telephony/IRcs.aidl @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2018 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.internal.telephony; + +interface IRcs { + void deleteThread(int threadId); +}
\ No newline at end of file diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java index 5ecb43ebf112..2a648bd8b252 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java +++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java @@ -480,9 +480,9 @@ public class TelephonyIntents { public static final String EXTRA_PCO_VALUE_KEY = "pcoValue"; public static final String EXTRA_DEFAULT_NETWORK_AVAILABLE_KEY = "defaultNetworkAvailable"; - /** + /** * Broadcast action to trigger CI OMA-DM Session. - */ + */ public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE = "com.android.omadm.service.CONFIGURATION_UPDATE"; @@ -491,4 +491,14 @@ public class TelephonyIntents { */ public static final String ACTION_CARRIER_CERTIFICATE_DOWNLOAD = "com.android.internal.telephony.ACTION_CARRIER_CERTIFICATE_DOWNLOAD"; + + /** + * Broadcast action to indicate an error related to Line1Number has been detected. + * + * Requires the READ_PRIVILEGED_PHONE_STATE permission. + * + * @hide + */ + public static final String ACTION_LINE1_NUMBER_ERROR_DETECTED = + "com.android.internal.telephony.ACTION_LINE1_NUMBER_ERROR_DETECTED"; } |