12 Commits

Author SHA1 Message Date
Leland Miller
f519e316d8 Merge "Use injected instance of RcsControllerCall" am: f545515ee6
am: 3e2e2d66ce

Change-Id: I0197d4e533b27e17e8d76c13b08b6dfa6db54ba3
2019-04-24 17:25:04 -07:00
Leland Miller
a3d9f76b05 Use injected instance of RcsControllerCall
Instead of static methods, create an instance of RcsControllerCall that
holds a reference to the Context and inject it where it is used.

This will be used in a follow up commit that will require the calling
package name be passed when calling IRcs methods.

This change will allow passing a calling package name to an
RcsServiceCall or an RcsServiceCallWithNoReturn, so uses of the call
method might look something like:

```
mRcsControllerCall.call((iRcs, callingPackage) ->
        iRcs.getFileTransferContentUri(mId, callingPackage));
```

Alternatives to storing the context here would have been:

1. To store the context everywhere the RcsControllerCall is injected and
   get the calling package name at each RcsControllerCall call

2. To store the calling package name everywhere that the
   RcsControllerCall instance is injected

Compared to solution 1, the implemented solution avoids repeating the
logic of retrieving the calling package.

Compared to solution 2, the implemented solution does not introduce any
complexity. In addition, the individual classes do not care about the
calling package name outside of the need to pass it to an IRcs method.
In the future, the implemented solution may also provide a useful point
to provide logic involving calls and the context (or other injected
dependencies). Though this future concern is not alone enough to justify
the solution, since the solution adds no additional complexity against
other solutions, it seems like a nice benefit.

Note, to avoid polluting this commit, a follow-up issue (b/128029441)
has been created to adjust the name of RcsControllerCall to reflect that
an instance of RcsControllerCall does not represent a single call to
RcsController.

Bug: 123699565
Test: Existing tests pass
Change-Id: Ib0f55f14397e5eb1e5a55864094c0be0c4e37c06
2019-04-17 16:28:35 -07:00
Sasha Smundak
4a3d1a0b0c Convert tests/**/Android.mk files to Android.bp, part II
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
Merged-In: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
2019-03-14 14:30:58 -07:00
Sasha Smundak
89414e1ed5 Convert tests/**/Android.mk files to Android.bp, part II
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
2019-03-12 09:37:32 -07:00
Brett Chabot
502ec7ae4b Migrate remainder of frameworks/base to androidx.test
See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring

Test: m  m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank
Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16
2019-03-02 00:35:17 +00:00
Leland Miller
c39f23c1a6 Split RCS events into API and internal classes
This will allow us to inject dependencies into the API classes that are
not parcelable or do not come from ircs.

Bug: 123699565
Test: Unit tests pass
Change-Id: Iab4e6ea3fd983eef7fb0cba7311175ea82a444ff
2019-02-19 11:39:49 -08:00
Sahin Caliskan
2f932d72ba Make RCS Message Store APIs ready to unhide
This change makes necessary changes to unhide the APIs in a future
commit. All the classes that end with Parameters needed to be converted
to Params, which resulted in a rather large change. I also had to reintroduce
RcsOutgoingMessageCreationParameters as it was required to make
Parcelables final, which means I had to make this new class parcelable
and RcsMessageCreationParameters non-parcelable and non-final

Test: Existing tests pass

Bug:109759350
Change-Id: I2fe9382d28a9abf02ad22ec7ccdeaedc55ae4337
2019-02-07 19:20:45 +00:00
Sahin Caliskan
f00a876893 Implementation of RcsMessageStore APIs [base]
This change adds the implementation of RcsMessageStore. Please see the
bug for the design and one-pager

Test: Added unit tests

Bug: 109759350
Change-Id: I6049dcf74ef9e19a38ce58148a89497992bc1c98
2019-02-06 15:49:16 +00:00
Sahin Caliskan
cd9c24dcdb Implement RcsParticipant (base)
This change adds the tables, APIs and provider for RcsParticipants. It
is now possible to add/update/query participants.

Test: Added unit tests

Bug: 109759350
Change-Id: I61f3ee3bcb0b3a2d70906a282258677377d9fa5a
2019-01-07 14:39:19 -08:00
Sahin Caliskan
424945e010 Implement RcsThread querying (base)
This change does a first pass to introduce RcsThread querying. We can
now insert threads and query them back.

Test: Added unit test

Bug: 109759350
Change-Id: Ib116cd533a19ce4d099864a095f585ac47cdc9f6
2019-01-04 23:53:58 +00:00
Sahin Caliskan
7719db2b16 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
2018-12-13 16:50:28 +00:00
Sahin Caliskan
1256486a8f Fix RcsManager and add empty RcsThread class
This change fixes the RcsManager setup and adds an empty RcsThread class. Please see go/rcs-in-telephony-doc for details.

Test: Builds fine
Bug: 109759350
Merged-in: Ie3fe476ab11d515ffab6dcc6ccf5ec801a4c9057
Change-Id: Ie3fe476ab11d515ffab6dcc6ccf5ec801a4c9057
2018-11-15 23:28:24 +00:00