Home | History | Annotate | Download | only in cts
      1 /*
      2  * Copyright (C) 2009 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  */
     16 package android.media.cts;
     17 
     18 import com.android.cts.media.R;
     19 
     20 import android.app.Activity;
     21 import android.os.Bundle;
     22 import android.util.Log;
     23 import android.view.SurfaceHolder;
     24 import android.view.SurfaceView;
     25 
     26 public 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 }
     62