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

Commit 9534f8ab authored by shubang's avatar shubang
Browse files

Move Callbacks

Test: make
Change-Id: I560d1ba7db40bb18da0df63cef33189492523e9f
parent de6f60a9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.content.Context;
import android.hardware.tv.tuner.V1_0.Constants;
import android.media.tv.tuner.Tuner.LnbCallback;
import android.media.tv.tuner.TunerConstants.Result;

import java.lang.annotation.Retention;
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright 2019 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.media.tv.tuner;


/**
 * Callback interface for receiving information from LNBs.
 *
 * @hide
 */
public interface LnbCallback {
    /**
     * Invoked when there is a LNB event.
     */
    void onEvent(int lnbEventType);

    /**
     * Invoked when there is a new DiSEqC message.
     *
     * @param diseqcMessage a byte array of data for DiSEqC (Digital Satellite
     * Equipment Control) message which is specified by EUTELSAT Bus Functional
     * Specification Version 4.2.
     */
    void onDiseqcMessage(byte[] diseqcMessage);
}
+1 −36
Original line number Diff line number Diff line
@@ -130,29 +130,10 @@ public final class Tuner implements AutoCloseable {

    private static native DemuxCapabilities nativeGetDemuxCapabilities();

    /**
     * LNB Callback.
     *
     * @hide
     */
    public interface LnbCallback {
        /**
         * Invoked when there is a LNB event.
         */
        void onEvent(int lnbEventType);

        /**
         * Invoked when there is a new DiSEqC message.
         *
         * @param diseqcMessage a byte array of data for DiSEqC (Digital Satellite
         * Equipment Control) message which is specified by EUTELSAT Bus Functional
         * Specification Version 4.2.
         */
        void onDiseqcMessage(byte[] diseqcMessage);
    }

    /**
     * Callback interface for receiving information from the corresponding filters.
     * TODO: remove
     */
    public interface FilterCallback {
        /**
@@ -171,22 +152,6 @@ public final class Tuner implements AutoCloseable {
        void onFilterStatusChanged(@NonNull Filter filter, @FilterStatus int status);
    }

    /**
     * DVR Callback.
     *
     * @hide
     */
    public interface DvrCallback {
        /**
         * Invoked when record status changed.
         */
        void onRecordStatus(int status);
        /**
         * Invoked when playback status changed.
         */
        void onPlaybackStatus(int status);
    }

    @Nullable
    private EventHandler createEventHandler() {
        Looper looper;
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.media.tv.tuner.dvr;

import android.annotation.BytesLong;
import android.annotation.NonNull;
import android.media.tv.tuner.Tuner.DvrCallback;
import android.media.tv.tuner.Tuner.Filter;
import android.media.tv.tuner.TunerConstants.Result;
import android.os.ParcelFileDescriptor;
+33 −0
Original line number Diff line number Diff line
/*
 * Copyright 2019 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.media.tv.tuner.dvr;

/**
 * Callback interface for receiving information from DVR interfaces.
 *
 * @hide
 */
public interface DvrCallback {
    /**
     * Invoked when record status changed.
     */
    void onRecordStatusChanged(int status);
    /**
     * Invoked when playback status changed.
     */
    void onPlaybackStatusChanged(int status);
}
Loading