Loading Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -714,6 +714,7 @@ aidl_files := \ frameworks/base/core/java/android/print/PrintJobId.aidl \ frameworks/base/core/java/android/printservice/recommendation/RecommendationInfo.aidl \ frameworks/base/core/java/android/hardware/radio/RadioManager.aidl \ frameworks/base/core/java/android/hardware/radio/RadioMetadata.aidl \ frameworks/base/core/java/android/hardware/usb/UsbDevice.aidl \ frameworks/base/core/java/android/hardware/usb/UsbInterface.aidl \ frameworks/base/core/java/android/hardware/usb/UsbEndpoint.aidl \ Loading core/java/android/hardware/radio/ITunerCallback.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -17,10 +17,18 @@ package android.hardware.radio; import android.hardware.radio.RadioManager; import android.hardware.radio.RadioMetadata; /** {@hide} */ oneway interface ITunerCallback { void onError(int status); void onConfigurationChanged(in RadioManager.BandConfig config); void onProgramInfoChanged(in RadioManager.ProgramInfo info); void onMetadataChanged(in RadioMetadata metadata); void onTrafficAnnouncement(boolean active); void onEmergencyAnnouncement(boolean active); void onAntennaState(boolean connected); void onBackgroundScanAvailabilityChange(boolean isAvailable); void onBackgroundScanComplete(); void onProgramListChanged(); } core/java/android/hardware/radio/RadioMetadata.aidl 0 → 100644 +20 −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; /** @hide */ parcelable RadioMetadata; core/java/android/hardware/radio/RadioTuner.java +11 −6 Original line number Diff line number Diff line Loading @@ -19,14 +19,9 @@ package android.hardware.radio; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.os.Looper; import android.os.Message; import java.lang.ref.WeakReference; import java.util.List; import java.util.UUID; /** * RadioTuner interface provides methods to control a radio tuner on the device: selecting and Loading Loading @@ -303,6 +298,16 @@ public abstract class RadioTuner { public static final int ERROR_SCAN_TIMEOUT = 3; /** The requested configuration could not be applied */ public static final int ERROR_CONFIG = 4; /** * Background scan was interrupted due to hardware becoming temporarily unavailable. * @hide FutureFeature */ public static final int ERROR_BACKGROUND_SCAN_UNAVAILABLE = 5; /** * Background scan failed due to other error, ie. HW failure. * @hide FutureFeature */ public static final int ERROR_BACKGROUND_SCAN_FAILED = 6; /** * Callback provided by the client application when opening a {@link RadioTuner} Loading core/java/android/hardware/radio/TunerCallbackAdapter.java +35 −0 Original line number Diff line number Diff line Loading @@ -51,4 +51,39 @@ class TunerCallbackAdapter extends ITunerCallback.Stub { public void onProgramInfoChanged(RadioManager.ProgramInfo info) { mHandler.post(() -> mCallback.onProgramInfoChanged(info)); } @Override public void onMetadataChanged(RadioMetadata metadata) { mHandler.post(() -> mCallback.onMetadataChanged(metadata)); } @Override public void onTrafficAnnouncement(boolean active) { mHandler.post(() -> mCallback.onTrafficAnnouncement(active)); } @Override public void onEmergencyAnnouncement(boolean active) { mHandler.post(() -> mCallback.onEmergencyAnnouncement(active)); } @Override public void onAntennaState(boolean connected) { mHandler.post(() -> mCallback.onAntennaState(connected)); } @Override public void onBackgroundScanAvailabilityChange(boolean isAvailable) { mHandler.post(() -> mCallback.onBackgroundScanAvailabilityChange(isAvailable)); } @Override public void onBackgroundScanComplete() { mHandler.post(() -> mCallback.onBackgroundScanComplete()); } @Override public void onProgramListChanged() { mHandler.post(() -> mCallback.onProgramListChanged()); } } Loading
Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -714,6 +714,7 @@ aidl_files := \ frameworks/base/core/java/android/print/PrintJobId.aidl \ frameworks/base/core/java/android/printservice/recommendation/RecommendationInfo.aidl \ frameworks/base/core/java/android/hardware/radio/RadioManager.aidl \ frameworks/base/core/java/android/hardware/radio/RadioMetadata.aidl \ frameworks/base/core/java/android/hardware/usb/UsbDevice.aidl \ frameworks/base/core/java/android/hardware/usb/UsbInterface.aidl \ frameworks/base/core/java/android/hardware/usb/UsbEndpoint.aidl \ Loading
core/java/android/hardware/radio/ITunerCallback.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -17,10 +17,18 @@ package android.hardware.radio; import android.hardware.radio.RadioManager; import android.hardware.radio.RadioMetadata; /** {@hide} */ oneway interface ITunerCallback { void onError(int status); void onConfigurationChanged(in RadioManager.BandConfig config); void onProgramInfoChanged(in RadioManager.ProgramInfo info); void onMetadataChanged(in RadioMetadata metadata); void onTrafficAnnouncement(boolean active); void onEmergencyAnnouncement(boolean active); void onAntennaState(boolean connected); void onBackgroundScanAvailabilityChange(boolean isAvailable); void onBackgroundScanComplete(); void onProgramListChanged(); }
core/java/android/hardware/radio/RadioMetadata.aidl 0 → 100644 +20 −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; /** @hide */ parcelable RadioMetadata;
core/java/android/hardware/radio/RadioTuner.java +11 −6 Original line number Diff line number Diff line Loading @@ -19,14 +19,9 @@ package android.hardware.radio; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.os.Looper; import android.os.Message; import java.lang.ref.WeakReference; import java.util.List; import java.util.UUID; /** * RadioTuner interface provides methods to control a radio tuner on the device: selecting and Loading Loading @@ -303,6 +298,16 @@ public abstract class RadioTuner { public static final int ERROR_SCAN_TIMEOUT = 3; /** The requested configuration could not be applied */ public static final int ERROR_CONFIG = 4; /** * Background scan was interrupted due to hardware becoming temporarily unavailable. * @hide FutureFeature */ public static final int ERROR_BACKGROUND_SCAN_UNAVAILABLE = 5; /** * Background scan failed due to other error, ie. HW failure. * @hide FutureFeature */ public static final int ERROR_BACKGROUND_SCAN_FAILED = 6; /** * Callback provided by the client application when opening a {@link RadioTuner} Loading
core/java/android/hardware/radio/TunerCallbackAdapter.java +35 −0 Original line number Diff line number Diff line Loading @@ -51,4 +51,39 @@ class TunerCallbackAdapter extends ITunerCallback.Stub { public void onProgramInfoChanged(RadioManager.ProgramInfo info) { mHandler.post(() -> mCallback.onProgramInfoChanged(info)); } @Override public void onMetadataChanged(RadioMetadata metadata) { mHandler.post(() -> mCallback.onMetadataChanged(metadata)); } @Override public void onTrafficAnnouncement(boolean active) { mHandler.post(() -> mCallback.onTrafficAnnouncement(active)); } @Override public void onEmergencyAnnouncement(boolean active) { mHandler.post(() -> mCallback.onEmergencyAnnouncement(active)); } @Override public void onAntennaState(boolean connected) { mHandler.post(() -> mCallback.onAntennaState(connected)); } @Override public void onBackgroundScanAvailabilityChange(boolean isAvailable) { mHandler.post(() -> mCallback.onBackgroundScanAvailabilityChange(isAvailable)); } @Override public void onBackgroundScanComplete() { mHandler.post(() -> mCallback.onBackgroundScanComplete()); } @Override public void onProgramListChanged() { mHandler.post(() -> mCallback.onProgramListChanged()); } }