aboutsummaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-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 &&