diff options
| author | Paul Jensen <pauljensen@google.com> | 2014-07-18 17:33:47 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-07-18 17:33:47 +0000 |
| commit | 139d894741bd011d8b97b58eac033234a964dfcb (patch) | |
| tree | 53522fb6a18c93c564a36a0b653f83ddac4b8844 | |
| parent | 1bb820a9a9aab4d5e882637a6be8cf01b2e9c029 (diff) | |
| parent | 286b06ae4cb1b270fdad4a144bccb1dfbb4def92 (diff) | |
| download | frameworks_base-139d894741bd011d8b97b58eac033234a964dfcb.zip frameworks_base-139d894741bd011d8b97b58eac033234a964dfcb.tar.gz frameworks_base-139d894741bd011d8b97b58eac033234a964dfcb.tar.bz2 | |
am d2cb9213: Merge "Make back button work in CaptivePortalLogin app like a web browser." into lmp-dev
* commit 'd2cb92132896bc63c6a0906a385a35b1e5f474a9':
Make back button work in CaptivePortalLogin app like a web browser.
| -rw-r--r-- | packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java index 2c1db02..09525b2 100644 --- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java +++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java @@ -97,6 +97,16 @@ public class CaptivePortalLoginActivity extends Activity { } @Override + public void onBackPressed() { + WebView myWebView = (WebView) findViewById(R.id.webview); + if (myWebView.canGoBack()) { + myWebView.goBack(); + } else { + super.onBackPressed(); + } + } + + @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_use_network) { |
