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

Commit 501a266a authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by android-build-merger
Browse files

Merge "Add permission annotation to RadioManager methods." into oc-mr1-dev am: f299ab10

am: 5f935d47

Change-Id: I2c2212cd3dcddfb400fe2dcb4afd3df202038b82
parents ea347a58 5f935d47
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -16,8 +16,10 @@

package android.hardware.radio;

import android.Manifest;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.content.Context;
@@ -1571,6 +1573,7 @@ public class RadioManager {
     *  <li>{@link #STATUS_DEAD_OBJECT} if the binder transaction to the native service fails, </li>
     * </ul>
     */
    @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
    public int listModules(List<ModuleProperties> modules) {
        if (modules == null) {
            Log.e(TAG, "the output list must not be empty");
@@ -1611,6 +1614,7 @@ public class RadioManager {
     * Can be null if default handler is OK.
     * @return a valid {@link RadioTuner} interface in case of success or null in case of error.
     */
    @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
    public RadioTuner openTuner(int moduleId, BandConfig config, boolean withAudio,
            RadioTuner.Callback callback, Handler handler) {
        if (callback == null) {