147e9b753d9167840037651f9deb5140987e5d226Dake Gu/* This file is auto-generated from PlaybackOverlayActivity.java. DO NOT MODIFY. */ 247e9b753d9167840037651f9deb5140987e5d226Dake Gu 347e9b753d9167840037651f9deb5140987e5d226Dake Gu/* 447e9b753d9167840037651f9deb5140987e5d226Dake Gu * Copyright (C) 2014 The Android Open Source Project 547e9b753d9167840037651f9deb5140987e5d226Dake Gu * 647e9b753d9167840037651f9deb5140987e5d226Dake Gu * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 747e9b753d9167840037651f9deb5140987e5d226Dake Gu * in compliance with the License. You may obtain a copy of the License at 847e9b753d9167840037651f9deb5140987e5d226Dake Gu * 947e9b753d9167840037651f9deb5140987e5d226Dake Gu * http://www.apache.org/licenses/LICENSE-2.0 1047e9b753d9167840037651f9deb5140987e5d226Dake Gu * 1147e9b753d9167840037651f9deb5140987e5d226Dake Gu * Unless required by applicable law or agreed to in writing, software distributed under the License 1247e9b753d9167840037651f9deb5140987e5d226Dake Gu * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 1347e9b753d9167840037651f9deb5140987e5d226Dake Gu * or implied. See the License for the specific language governing permissions and limitations under 1447e9b753d9167840037651f9deb5140987e5d226Dake Gu * the License. 1547e9b753d9167840037651f9deb5140987e5d226Dake Gu */ 1647e9b753d9167840037651f9deb5140987e5d226Dake Gupackage com.example.android.leanback; 1747e9b753d9167840037651f9deb5140987e5d226Dake Gu 1847e9b753d9167840037651f9deb5140987e5d226Dake Guimport android.support.v4.app.FragmentActivity; 1947e9b753d9167840037651f9deb5140987e5d226Dake Guimport android.os.Bundle; 2047e9b753d9167840037651f9deb5140987e5d226Dake Gu 2165a34663cf08f17738720000ee9900fe714578efDongwon Kangimport java.util.ArrayList; 2265a34663cf08f17738720000ee9900fe714578efDongwon Kangimport java.util.List; 2365a34663cf08f17738720000ee9900fe714578efDongwon Kang 2465a34663cf08f17738720000ee9900fe714578efDongwon Kangpublic class PlaybackOverlaySupportActivity extends FragmentActivity { 2567574e7a0e9d9af9f88cfc41fc1ab3e119e8d2a0Wale Ogunwale private List<PictureInPictureListener> mListeners = new ArrayList<>(); 2665a34663cf08f17738720000ee9900fe714578efDongwon Kang 2747e9b753d9167840037651f9deb5140987e5d226Dake Gu /** Called when the activity is first created. */ 2847e9b753d9167840037651f9deb5140987e5d226Dake Gu @Override 2947e9b753d9167840037651f9deb5140987e5d226Dake Gu public void onCreate(Bundle savedInstanceState) 3047e9b753d9167840037651f9deb5140987e5d226Dake Gu { 3147e9b753d9167840037651f9deb5140987e5d226Dake Gu super.onCreate(savedInstanceState); 3247e9b753d9167840037651f9deb5140987e5d226Dake Gu setContentView(R.layout.playback_controls_support); 3347e9b753d9167840037651f9deb5140987e5d226Dake Gu } 3465a34663cf08f17738720000ee9900fe714578efDongwon Kang 3565a34663cf08f17738720000ee9900fe714578efDongwon Kang @Override 36fa89d61337d39582448bd60ee66782c8e5265e7dAndrii Kulian public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) { 3767574e7a0e9d9af9f88cfc41fc1ab3e119e8d2a0Wale Ogunwale for (PictureInPictureListener listener : mListeners) { 38fa89d61337d39582448bd60ee66782c8e5265e7dAndrii Kulian listener.onPictureInPictureModeChanged(isInPictureInPictureMode); 3965a34663cf08f17738720000ee9900fe714578efDongwon Kang } 4065a34663cf08f17738720000ee9900fe714578efDongwon Kang } 4165a34663cf08f17738720000ee9900fe714578efDongwon Kang 4267574e7a0e9d9af9f88cfc41fc1ab3e119e8d2a0Wale Ogunwale public void registerPictureInPictureListener(PictureInPictureListener listener) { 4365a34663cf08f17738720000ee9900fe714578efDongwon Kang mListeners.add(listener); 4465a34663cf08f17738720000ee9900fe714578efDongwon Kang } 4565a34663cf08f17738720000ee9900fe714578efDongwon Kang 4667574e7a0e9d9af9f88cfc41fc1ab3e119e8d2a0Wale Ogunwale public void unregisterPictureInPictureListener(PictureInPictureListener listener) { 4765a34663cf08f17738720000ee9900fe714578efDongwon Kang mListeners.remove(listener); 4865a34663cf08f17738720000ee9900fe714578efDongwon Kang } 4965a34663cf08f17738720000ee9900fe714578efDongwon Kang 5067574e7a0e9d9af9f88cfc41fc1ab3e119e8d2a0Wale Ogunwale public interface PictureInPictureListener { 5197906d5d967189bdcac6491fffa20c2cb0003466Dake Gu void onPictureInPictureModeChanged(boolean isInPictureInPictureMode); 5265a34663cf08f17738720000ee9900fe714578efDongwon Kang } 5347e9b753d9167840037651f9deb5140987e5d226Dake Gu} 54