/* * Copyright (C) 2015 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 com.android.tv.testinput; import android.content.ContentUris; import android.content.Context; import android.net.Uri; import android.os.RemoteException; import android.util.Log; import android.util.LongSparseArray; import com.android.tv.testing.data.ChannelInfo; import com.android.tv.testing.data.ChannelUtils; import com.android.tv.testing.testinput.ChannelState; import com.android.tv.testing.testinput.ChannelStateData; import com.android.tv.testing.testinput.ITestInputControl; import java.util.Map; /** * Maintains state for the {@link TestTvInputService}. * *
Maintains the current state for every channel. A default is sent if the state is not * explicitly set. The state is versioned so TestTvInputService can tell if onNotifyXXX events need * to be sent. * *
Test update the state using @{link ITestInputControl} via {@link TestInputControlService}.
*/
class TestInputControl extends ITestInputControl.Stub {
private static final String TAG = "TestInputControl";
private static final TestInputControl INSTANCE = new TestInputControl();
private final LongSparseArray