aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java
diff options
context:
space:
mode:
authorJohn Heroy <johnheroy@gmail.com>2015-10-21 12:10:08 -0700
committerJohn Heroy <johnheroy@gmail.com>2015-10-21 12:10:08 -0700
commit451518ff9f375cd3e44926fc2027d2fc36c93833 (patch)
tree9bd1b0d7df82d2be6b66b54613684cdb542f6c57 /app/src/main/java
parentcd94615223e4ea94c31cc8071787a4c3aaf33cd6 (diff)
parent3d9dedb3479875db2bb2b46b09ed413bab8f35cf (diff)
downloadconnectbot-451518ff9f375cd3e44926fc2027d2fc36c93833.tar.gz
connectbot-451518ff9f375cd3e44926fc2027d2fc36c93833.tar.bz2
connectbot-451518ff9f375cd3e44926fc2027d2fc36c93833.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/org/connectbot/ConsoleActivity.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/src/main/java/org/connectbot/ConsoleActivity.java b/app/src/main/java/org/connectbot/ConsoleActivity.java
index 3aebd41..0bb7858 100644
--- a/app/src/main/java/org/connectbot/ConsoleActivity.java
+++ b/app/src/main/java/org/connectbot/ConsoleActivity.java
@@ -170,17 +170,22 @@ public class ConsoleActivity extends AppCompatActivity implements BridgeDisconne
// create views for all bridges on this service
adapter.notifyDataSetChanged();
- int requestedIndex = bound.getBridges().indexOf(requestedBridge);
+ final int requestedIndex = bound.getBridges().indexOf(requestedBridge);
if (requestedIndex != -1) {
- setDisplayedTerminal(requestedIndex);
+ pager.post(new Runnable() {
+ @Override
+ public void run() {
+ setDisplayedTerminal(requestedIndex);
+ }
+ });
}
}
public void onServiceDisconnected(ComponentName className) {
+ bound = null;
adapter.notifyDataSetChanged();
updateEmptyVisible();
- bound = null;
}
};
@@ -1035,8 +1040,8 @@ public class ConsoleActivity extends AppCompatActivity implements BridgeDisconne
// Maintain selected host if connected.
if (adapter.getCurrentTerminalView() != null
&& !adapter.getCurrentTerminalView().bridge.isDisconnected()) {
- Uri uri = adapter.getCurrentTerminalView().bridge.host.getUri();
- savedInstanceState.putString(STATE_SELECTED_URI, uri.toString());
+ requested = adapter.getCurrentTerminalView().bridge.host.getUri();
+ savedInstanceState.putString(STATE_SELECTED_URI, requested.toString());
}
super.onSaveInstanceState(savedInstanceState);