Add getProgramList call to the broadcast radio API.
Test: manual test of existing API, no tests for the new one. Bug: b/34054813 Change-Id: I7fd8c89d1eb9685856a72c9234df6569d20cc2d4
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package android.hardware.radio;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -23,6 +25,7 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -76,6 +79,8 @@ public class RadioModule extends RadioTuner {
|
||||
|
||||
public native int getProgramInformation(RadioManager.ProgramInfo[] info);
|
||||
|
||||
public native @NonNull List<RadioManager.ProgramInfo> getProgramList(@Nullable String filter);
|
||||
|
||||
public native boolean isAntennaConnected();
|
||||
|
||||
public native boolean hasControl();
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package android.hardware.radio;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -23,6 +25,7 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -208,6 +211,20 @@ public abstract class RadioTuner {
|
||||
*/
|
||||
public abstract int getProgramInformation(RadioManager.ProgramInfo[] info);
|
||||
|
||||
/**
|
||||
* Get the list of discovered radio stations.
|
||||
*
|
||||
* To get the full list, set filter to null or empty string. Otherwise, client application
|
||||
* must verify vendor product/name before setting this parameter to anything else.
|
||||
*
|
||||
* @param filter vendor-specific selector for radio stations.
|
||||
* @return a list of radio stations.
|
||||
* @throws IllegalStateException if the scan is in progress or has not been started.
|
||||
* @throws IllegalArgumentException if the filter argument is not valid.
|
||||
* @hide FutureFeature
|
||||
*/
|
||||
public abstract @NonNull List<RadioManager.ProgramInfo> getProgramList(@Nullable String filter);
|
||||
|
||||
/**
|
||||
* Get current antenna connection state for current configuration.
|
||||
* Only valid if a configuration has been applied.
|
||||
|
||||
Reference in New Issue
Block a user