Home | History | Annotate | Download | only in chromoting
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 package org.chromium.chromoting;
      6 
      7 import android.app.Activity;
      8 import android.os.Bundle;
      9 import android.view.Menu;
     10 import android.view.MenuItem;
     11 
     12 
     13 /**
     14  * Interface to listen to receive events of an activity's lifecycle and options menu. This interface
     15  * is similar to Application.ActivityLifecycleCallbacks, but is inherently different. This interface
     16  * is intended to act as a listener for a specific Activity. The other is intended as a generic
     17  * listener to be registered at the Application level, for all Activities' lifecycles.
     18  */
     19 public interface ActivityLifecycleListener {
     20 
     21     public void onActivityCreated(Activity activity, Bundle savedInstanceState);
     22 
     23     public boolean onActivityCreatedOptionsMenu(Activity activity, Menu menu);
     24 
     25     public void onActivityDestroyed(Activity activity);
     26 
     27     public boolean onActivityOptionsItemSelected(Activity activity, MenuItem item);
     28 
     29     public void onActivityPaused(Activity activity);
     30 
     31     public void onActivityResumed(Activity activity);
     32 
     33     public void onActivitySaveInstanceState(Activity activity, Bundle outState);
     34 
     35     public void onActivityStarted(Activity activity);
     36 
     37     public void onActivityStopped(Activity activity);
     38 }
     39