1/* 2 * Copyright (C) 2008 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 17package com.android.fbotest; 18 19import android.renderscript.RSSurfaceView; 20import android.renderscript.RenderScript; 21 22import android.app.Activity; 23import android.content.res.Configuration; 24import android.content.Intent; 25import android.os.Bundle; 26import android.os.Handler; 27import android.os.Looper; 28import android.os.Message; 29import android.provider.Settings.System; 30import android.util.Log; 31import android.view.Menu; 32import android.view.MenuItem; 33import android.view.View; 34import android.view.MenuInflater; 35import android.view.Window; 36import android.widget.Button; 37import android.widget.ListView; 38import android.net.Uri; 39 40import java.lang.Runtime; 41 42public class FBOTest extends Activity { 43 44 private FBOTestView mView; 45 46 @Override 47 public void onCreate(Bundle icicle) { 48 super.onCreate(icicle); 49 50 // Create our Preview view and set it as the content of our 51 // Activity 52 mView = new FBOTestView(this); 53 setContentView(mView); 54 } 55 56 @Override 57 protected void onResume() { 58 // Ideally a game should implement onResume() and onPause() 59 // to take appropriate action when the activity looses focus 60 super.onResume(); 61 mView.resume(); 62 } 63 64 @Override 65 protected void onPause() { 66 // Ideally a game should implement onResume() and onPause() 67 // to take appropriate action when the activity looses focus 68 super.onPause(); 69 mView.pause(); 70 } 71} 72 73