summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/ActivityController.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-05-30 10:08:50 -0700
committerJohn Reck <jreck@google.com>2012-05-30 10:08:50 -0700
commit9c35b9c41d756d59f5356edd2e08432e01f351f6 (patch)
tree18a05285e9099dd1579d0bd1feac27c62fedfc27 /src/com/android/browser/ActivityController.java
parente7ac37e77ad8605b5e730fe48f088bb77df4b57a (diff)
downloadandroid_packages_apps_Gello-9c35b9c41d756d59f5356edd2e08432e01f351f6.tar.gz
android_packages_apps_Gello-9c35b9c41d756d59f5356edd2e08432e01f351f6.tar.bz2
android_packages_apps_Gello-9c35b9c41d756d59f5356edd2e08432e01f351f6.zip
Prevent the monkies with a sledgehammer
Bug: 6515134 If we never have a null mController, we can never have a NPE! Change-Id: Idf90b94e6557e0afd6dd92602b8e4dfd189218d1
Diffstat (limited to 'src/com/android/browser/ActivityController.java')
-rw-r--r--src/com/android/browser/ActivityController.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/com/android/browser/ActivityController.java b/src/com/android/browser/ActivityController.java
new file mode 100644
index 00000000..ac248b8d
--- /dev/null
+++ b/src/com/android/browser/ActivityController.java
@@ -0,0 +1,74 @@
+package com.android.browser;
+
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.view.ActionMode;
+import android.view.ContextMenu;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.View;
+
+
+public interface ActivityController {
+
+ void start(Intent intent);
+
+ void onSaveInstanceState(Bundle outState);
+
+ void handleNewIntent(Intent intent);
+
+ void onResume();
+
+ boolean onMenuOpened(int featureId, Menu menu);
+
+ void onOptionsMenuClosed(Menu menu);
+
+ void onContextMenuClosed(Menu menu);
+
+ void onPause();
+
+ void onDestroy();
+
+ void onConfgurationChanged(Configuration newConfig);
+
+ void onLowMemory();
+
+ boolean onCreateOptionsMenu(Menu menu);
+
+ boolean onPrepareOptionsMenu(Menu menu);
+
+ boolean onOptionsItemSelected(MenuItem item);
+
+ void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo);
+
+ boolean onContextItemSelected(MenuItem item);
+
+ boolean onKeyDown(int keyCode, KeyEvent event);
+
+ boolean onKeyLongPress(int keyCode, KeyEvent event);
+
+ boolean onKeyUp(int keyCode, KeyEvent event);
+
+ void onActionModeStarted(ActionMode mode);
+
+ void onActionModeFinished(ActionMode mode);
+
+ void onActivityResult(int requestCode, int resultCode, Intent intent);
+
+ boolean onSearchRequested();
+
+ boolean dispatchKeyEvent(KeyEvent event);
+
+ boolean dispatchKeyShortcutEvent(KeyEvent event);
+
+ boolean dispatchTouchEvent(MotionEvent ev);
+
+ boolean dispatchTrackballEvent(MotionEvent ev);
+
+ boolean dispatchGenericMotionEvent(MotionEvent ev);
+
+}