Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22eb0e31 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Android (Google) Code Review
Browse files

Merge "Pass radio HAL callbacks back to Java client."

parents bbb7d6d5 2134817b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -218,6 +218,7 @@ LOCAL_SRC_FILES += \
	core/java/android/hardware/location/IContextHubService.aidl \
	core/java/android/hardware/radio/IRadioService.aidl \
	core/java/android/hardware/radio/ITuner.aidl \
	core/java/android/hardware/radio/ITunerCallback.aidl \
	core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl \
	core/java/android/hardware/usb/IUsbManager.aidl \
	core/java/android/net/ICaptivePortal.aidl \
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
package android.hardware.radio;

import android.hardware.radio.ITuner;
import android.hardware.radio.ITunerCallback;
import android.hardware.radio.RadioManager;

/**
 * API to the broadcast radio service.
@@ -24,5 +26,6 @@ import android.hardware.radio.ITuner;
 * {@hide}
 */
interface IRadioService {
    ITuner openTuner(boolean withAudio);
    ITuner openTuner(int moduleId, in RadioManager.BandConfig bandConfig, boolean withAudio,
            in ITunerCallback callback);
}
+25 −0
Original line number Diff line number Diff line
/**
 * Copyright (C) 2017 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.hardware.radio;

import android.hardware.radio.RadioManager;

/** {@hide} */
oneway interface ITunerCallback {
    void onError(int status);
    void onConfigurationChanged(in RadioManager.BandConfig config);
}
+3 −0
Original line number Diff line number Diff line
@@ -18,3 +18,6 @@ package android.hardware.radio;

/** @hide */
parcelable RadioManager.ProgramInfo;

/** @hide */
parcelable RadioManager.BandConfig;
+5 −1
Original line number Diff line number Diff line
@@ -1446,9 +1446,13 @@ public class RadioManager {
        }

        if (mService != null) {
            Log.d(TAG, "Opening tuner...");

            ITuner tuner;
            ITunerCallback halCallback = new TunerCallbackAdapter(callback, handler);
            try {
                tuner = mService.openTuner(withAudio);
                // TODO(b/36863239): pass bandConfig too, after fixing deserialization bug
                tuner = mService.openTuner(moduleId, null, withAudio, halCallback);
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
Loading