aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2009-06-13 12:28:27 +0000
committerKenny Root <kenny@the-b.org>2009-06-13 12:28:27 +0000
commit00678d104661ce736bce72e02113ff549d763796 (patch)
treef3d6598fdaed753b99472474b5f4b79ac7010bf0 /src
parent3a40323baf10e3cad68482fc5bbb54b799efd41e (diff)
downloadconnectbot-00678d104661ce736bce72e02113ff549d763796.tar.gz
connectbot-00678d104661ce736bce72e02113ff549d763796.tar.bz2
connectbot-00678d104661ce736bce72e02113ff549d763796.zip
Make sure we can go back to automatic rotation mode without side-effects
git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@290 df292f66-193f-0410-a5fc-6d59da041ff2
Diffstat (limited to 'src')
-rw-r--r--src/org/connectbot/ConsoleActivity.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/org/connectbot/ConsoleActivity.java b/src/org/connectbot/ConsoleActivity.java
index e502f23..dae0c52 100644
--- a/src/org/connectbot/ConsoleActivity.java
+++ b/src/org/connectbot/ConsoleActivity.java
@@ -105,8 +105,6 @@ public class ConsoleActivity extends Activity {
protected TerminalBridge copySource = null;
private int lastTouchRow, lastTouchCol;
- private boolean forcedOrientation = false;
-
private ServiceConnection connection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
bound = ((TerminalManager.TerminalBinder) service).getService();
@@ -558,13 +556,12 @@ public class ConsoleActivity extends Activity {
rotate = rotateDefault;
// request a forced orientation if requested by user
- if (PreferenceConstants.ROTATION_LANDSCAPE.equals(rotate)) {
+ if (PreferenceConstants.ROTATION_LANDSCAPE.equals(rotate))
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
- forcedOrientation = true;
- } else if (PreferenceConstants.ROTATION_PORTRAIT.equals(rotate)) {
+ else if (PreferenceConstants.ROTATION_PORTRAIT.equals(rotate))
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
- forcedOrientation = true;
- }
+ else
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
}
@@ -884,7 +881,7 @@ public class ConsoleActivity extends Activity {
super.onConfigurationChanged(newConfig);
Log.d(TAG, String.format("onConfigurationChanged; requestedOrientation=%d, newConfig.orientation=%d", getRequestedOrientation(), newConfig.orientation));
- if (forcedOrientation && bound != null) {
+ if (bound != null) {
if ((newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE &&
getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) ||
(newConfig.orientation != Configuration.ORIENTATION_PORTRAIT &&