159206df88081556d0bf538234da0b455cc7bb095Romain Guy/* 259206df88081556d0bf538234da0b455cc7bb095Romain Guy * Copyright (C) 2009 The Android Open Source Project 359206df88081556d0bf538234da0b455cc7bb095Romain Guy * 459206df88081556d0bf538234da0b455cc7bb095Romain Guy * Licensed under the Apache License, Version 2.0 (the "License"); 559206df88081556d0bf538234da0b455cc7bb095Romain Guy * you may not use this file except in compliance with the License. 659206df88081556d0bf538234da0b455cc7bb095Romain Guy * You may obtain a copy of the License at 759206df88081556d0bf538234da0b455cc7bb095Romain Guy * 859206df88081556d0bf538234da0b455cc7bb095Romain Guy * http://www.apache.org/licenses/LICENSE-2.0 959206df88081556d0bf538234da0b455cc7bb095Romain Guy * 1059206df88081556d0bf538234da0b455cc7bb095Romain Guy * Unless required by applicable law or agreed to in writing, software 1159206df88081556d0bf538234da0b455cc7bb095Romain Guy * distributed under the License is distributed on an "AS IS" BASIS, 1259206df88081556d0bf538234da0b455cc7bb095Romain Guy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1359206df88081556d0bf538234da0b455cc7bb095Romain Guy * See the License for the specific language governing permissions and 1459206df88081556d0bf538234da0b455cc7bb095Romain Guy * limitations under the License. 1559206df88081556d0bf538234da0b455cc7bb095Romain Guy */ 1659206df88081556d0bf538234da0b455cc7bb095Romain Guy 1759206df88081556d0bf538234da0b455cc7bb095Romain Guypackage com.android.wallpaper.fall; 1859206df88081556d0bf538234da0b455cc7bb095Romain Guy 1959206df88081556d0bf538234da0b455cc7bb095Romain Guyimport android.app.Activity; 2059206df88081556d0bf538234da0b455cc7bb095Romain Guyimport android.os.Bundle; 2159206df88081556d0bf538234da0b455cc7bb095Romain Guy 2259206df88081556d0bf538234da0b455cc7bb095Romain Guypublic class Fall extends Activity { 2359206df88081556d0bf538234da0b455cc7bb095Romain Guy private FallView mView; 2459206df88081556d0bf538234da0b455cc7bb095Romain Guy 2559206df88081556d0bf538234da0b455cc7bb095Romain Guy @Override 2659206df88081556d0bf538234da0b455cc7bb095Romain Guy public void onCreate(Bundle icicle) { 2759206df88081556d0bf538234da0b455cc7bb095Romain Guy super.onCreate(icicle); 2859206df88081556d0bf538234da0b455cc7bb095Romain Guy 2959206df88081556d0bf538234da0b455cc7bb095Romain Guy mView = new FallView(this); 3059206df88081556d0bf538234da0b455cc7bb095Romain Guy setContentView(mView); 3159206df88081556d0bf538234da0b455cc7bb095Romain Guy } 3259206df88081556d0bf538234da0b455cc7bb095Romain Guy 3359206df88081556d0bf538234da0b455cc7bb095Romain Guy @Override 3459206df88081556d0bf538234da0b455cc7bb095Romain Guy protected void onResume() { 3559206df88081556d0bf538234da0b455cc7bb095Romain Guy super.onResume(); 3676469b31f1bda22057330a0146d9296df92b9094Jason Sams mView.resume(); 3759206df88081556d0bf538234da0b455cc7bb095Romain Guy } 3859206df88081556d0bf538234da0b455cc7bb095Romain Guy 3959206df88081556d0bf538234da0b455cc7bb095Romain Guy @Override 4059206df88081556d0bf538234da0b455cc7bb095Romain Guy protected void onPause() { 4159206df88081556d0bf538234da0b455cc7bb095Romain Guy super.onPause(); 4276469b31f1bda22057330a0146d9296df92b9094Jason Sams mView.pause(); 4359206df88081556d0bf538234da0b455cc7bb095Romain Guy 4459206df88081556d0bf538234da0b455cc7bb095Romain Guy Runtime.getRuntime().exit(0); 4559206df88081556d0bf538234da0b455cc7bb095Romain Guy } 4659206df88081556d0bf538234da0b455cc7bb095Romain Guy}