Move RCS APIs to android.telephony.ims

This is due to being compatible with other RCS related changes by by other engineers.
Test: Existing tests pass

Bug: 109759350
Change-Id: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
Merged-In: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
This commit is contained in:
Sahin Caliskan 2018-12-03 14:06:39 -08:00
parent 462331f40f
commit 7719db2b16
10 changed files with 76 additions and 41 deletions

View File

@ -502,6 +502,7 @@ java_defaults {
"telephony/java/android/telephony/ims/aidl/IImsServiceController.aidl",
"telephony/java/android/telephony/ims/aidl/IImsServiceControllerListener.aidl",
"telephony/java/android/telephony/ims/aidl/IImsSmsListener.aidl",
"telephony/java/android/telephony/ims/aidl/IRcs.aidl",
"telephony/java/android/telephony/mbms/IMbmsDownloadSessionCallback.aidl",
"telephony/java/android/telephony/mbms/IMbmsStreamingSessionCallback.aidl",
"telephony/java/android/telephony/mbms/IMbmsGroupCallSessionCallback.aidl",
@ -578,7 +579,6 @@ java_defaults {
"telephony/java/com/android/internal/telephony/euicc/ISetDefaultSmdpAddressCallback.aidl",
"telephony/java/com/android/internal/telephony/euicc/ISetNicknameCallback.aidl",
"telephony/java/com/android/internal/telephony/euicc/ISwitchToProfileCallback.aidl",
"telephony/java/com/android/internal/telephony/rcs/IRcs.aidl",
"wifi/java/android/net/wifi/ISoftApCallback.aidl",
"wifi/java/android/net/wifi/IWifiManager.aidl",
"wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl",

View File

@ -143,7 +143,7 @@ import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.telephony.euicc.EuiccCardManager;
import android.telephony.euicc.EuiccManager;
import android.telephony.rcs.RcsManager;
import android.telephony.ims.RcsManager;
import android.util.Log;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;

View File

@ -4251,7 +4251,7 @@ public abstract class Context {
/**
* Use with {@link #getSystemService(String)} to retrieve an
* {@link android.telephony.rcs.RcsManager}.
* {@link android.telephony.ims.RcsManager}.
* @hide
*/
public static final String TELEPHONY_RCS_SERVICE = "ircs";

View File

@ -0,0 +1,36 @@
/*
* 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.ims;
import android.annotation.SystemService;
import android.content.Context;
/**
* The manager class for RCS related utilities.
* @hide
*/
@SystemService(Context.TELEPHONY_RCS_SERVICE)
public class RcsManager {
private static final RcsMessageStore sRcsMessageStoreInstance = new RcsMessageStore();
/**
* Returns an instance of RcsMessageStore.
*/
public RcsMessageStore getRcsMessageStore() {
return sRcsMessageStoreInstance;
}
}

View File

@ -14,24 +14,20 @@
* limitations under the License.
*/
package android.telephony.rcs;
package android.telephony.ims;
import android.annotation.SystemService;
import android.content.Context;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.telephony.Rlog;
import com.android.internal.telephony.rcs.IRcs;
import android.telephony.ims.aidl.IRcs;
/**
* RcsManager is the application interface to RcsProvider and provides access methods to
* RcsMessageStore is the application interface to RcsProvider and provides access methods to
* RCS related database tables.
* @hide - TODO make this public
*/
@SystemService(Context.TELEPHONY_RCS_SERVICE)
public class RcsManager {
private static final String TAG = "RcsManager";
public class RcsMessageStore {
private static final String TAG = "RcsMessageStore";
private static final boolean VDBG = false;
/**

View File

@ -0,0 +1,20 @@
/*
*
* Copyright 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;
parcelable RcsThread;

View File

@ -14,14 +14,13 @@
* limitations under the License.
*/
package android.telephony.rcs;
package android.telephony.ims;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.ServiceManager;
import com.android.internal.telephony.rcs.IRcs;
import android.telephony.ims.aidl.IRcs;
/**
* RcsThread represents a single RCS conversation thread. It holds messages that were sent and

View File

@ -14,10 +14,14 @@
* limitations under the License.
*/
package com.android.internal.telephony.rcs;
package android.telephony.ims.aidl;
/**
* RPC definition between RCS storage APIs and phone process.
* {@hide}
*/
interface IRcs {
// RcsManager APIs
// RcsMessageStore APIs
void deleteThread(int threadId);
// RcsThread APIs

View File

@ -1,20 +0,0 @@
/*
**
** Copyright 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;
parcelable RcsThread;

View File

@ -16,17 +16,17 @@
package com.android.tests.rcs;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.rcs.RcsManager;
import android.telephony.ims.RcsMessageStore;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class RcsManagerTest {
public class RcsMessageStoreTest {
//TODO(sahinc): Add meaningful tests once we have more of the implementation in place
@Test
public void testDeleteThreadDoesntCrash() {
RcsManager mRcsManager = new RcsManager();
mRcsManager.deleteThread(0);
RcsMessageStore mRcsMessageStore = new RcsMessageStore();
mRcsMessageStore.deleteThread(0);
}
}