Compare commits

...

5 commits

Author SHA1 Message Date
Peter Cai 82eee5814b Android.bp: correct HIDL path 2022-11-07 22:15:15 -05:00
Alin Jerpelea ef51ec65f5
Merge pull request #8 from ix5/getservice-retry
QcRilAmService: Wait for IQcRilAudio to be up
2020-05-27 10:52:06 +02:00
ix5 331833e6b6 QcRilAmService: Wait for IQcRilAudio to be up
The default call to getService of a HIDL/AIDL interface will
not wait for the service to be up. Use the retry parameter
to use tryGetService internally.

This will fix a deprecation warning on future Android versions.

See https://android-review.googlesource.com/c/platform/system/tools/hidl/+/1291900
2020-05-26 19:51:39 +02:00
Alin Jerpelea 3dcbcf185d
Merge pull request #7 from MarijnS95/remove-shared-user-id
[QCRILAM] Remove sharedUserId
2020-05-24 13:41:35 +02:00
MarijnS95 00dcbd7f57 Remove unnecessary, deprecated sharedUserId with system
sharedUserId is a deprecated flag [1] that muddies the waters when it
comes to enforcement of various policies and permissions. QcRilAm
doesn't use any and operates just fine within normal app boundaries
(uses public APIs, doesn't need any permissions outside "normal" ones,
and accesses vendor services properly over Binder).
This also allows the signing key to differ from platform, where other
android.uid.system apps are signed with.

[1] https://developer.android.com/guide/topics/manifest/manifest-element#uid

Signed-off-by: MarijnS95 <marijns95@gmail.com>
2020-05-22 18:03:04 +02:00
3 changed files with 2 additions and 3 deletions

View file

@ -4,7 +4,7 @@ subdirs = [
hidl_package_root {
name: "vendor.qti.hardware.radio.am",
path: "vendor/oss/qcrilam/interface/am",
path: "packages/apps/QcRilAm/interface/am",
}
android_app {

View file

@ -2,7 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sony.qcrilam"
coreApp="true"
android:sharedUserId="android.uid.system"
android:versionCode="1"
android:versionName="1.0" >

View file

@ -35,7 +35,7 @@ private const val TAG = "QcRilAm-Service"
class QcRilAmService : Service() {
private fun addCallbackForSimSlot(simSlotNo: Int, audioManager: AudioManager) {
try {
val qcRilAudio = IQcRilAudio.getService("slot$simSlotNo")
val qcRilAudio = IQcRilAudio.getService("slot$simSlotNo", true /*retry*/)
if (qcRilAudio == null) {
Log.e(TAG, "Could not get service instance for slot$simSlotNo, failing")
} else {