Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -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", Loading core/res/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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" /> Loading telephony/java/android/provider/Telephony.java +25 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.provider; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; Loading Loading @@ -1208,6 +1209,30 @@ public final class Telephony { public static final String EXTRA_IS_INITIAL_CREATE = "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. Loading telephony/java/android/telephony/RcsManager.java 0 → 100644 +52 −0 Original line number Diff line number Diff line /* * 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); } } telephony/java/com/android/internal/telephony/IRcs.aidl 0 → 100644 +21 −0 Original line number Diff line number Diff line /* * 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 Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -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", Loading
core/res/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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" /> Loading
telephony/java/android/provider/Telephony.java +25 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.provider; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; Loading Loading @@ -1208,6 +1209,30 @@ public final class Telephony { public static final String EXTRA_IS_INITIAL_CREATE = "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. Loading
telephony/java/android/telephony/RcsManager.java 0 → 100644 +52 −0 Original line number Diff line number Diff line /* * 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); } }
telephony/java/com/android/internal/telephony/IRcs.aidl 0 → 100644 +21 −0 Original line number Diff line number Diff line /* * 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