blob: 44d8ad96831d36a951da5d983b1e039981823a88 [file] [log] [blame]
Justin Klaassenb8042fc2018-04-15 00:41:15 -04001/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package androidx.media;
17
18import android.app.Activity;
19import android.os.Bundle;
20import android.util.Log;
21import android.view.SurfaceHolder;
22import android.view.SurfaceView;
23
24import androidx.media.test.R;
25
26public class MediaStubActivity extends Activity {
27 private static final String TAG = "MediaStubActivity";
28 private SurfaceHolder mHolder;
29 private SurfaceHolder mHolder2;
30
31 @Override
32 protected void onCreate(Bundle savedInstanceState) {
33 super.onCreate(savedInstanceState);
34 setContentView(R.layout.mediaplayer);
35
36 SurfaceView surfaceV = (SurfaceView) findViewById(R.id.surface);
37 mHolder = surfaceV.getHolder();
38
39 SurfaceView surfaceV2 = (SurfaceView) findViewById(R.id.surface2);
40 mHolder2 = surfaceV2.getHolder();
41 }
42
43 @Override
44 protected void onResume() {
45 Log.i(TAG, "onResume");
46 super.onResume();
47 }
48
49 @Override
50 protected void onPause() {
51 Log.i(TAG, "onPause");
52 super.onPause();
53 }
54 public SurfaceHolder getSurfaceHolder() {
55 return mHolder;
56 }
57
58 public SurfaceHolder getSurfaceHolder2() {
59 return mHolder2;
60 }
61}