diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/connectbot/ConsoleActivity.java | 26 | ||||
-rw-r--r-- | src/org/connectbot/util/UberColorPickerDialog.java | 25 |
2 files changed, 0 insertions, 51 deletions
diff --git a/src/org/connectbot/ConsoleActivity.java b/src/org/connectbot/ConsoleActivity.java index ad32fbb..7dd336b 100644 --- a/src/org/connectbot/ConsoleActivity.java +++ b/src/org/connectbot/ConsoleActivity.java @@ -241,38 +241,12 @@ public class ConsoleActivity extends Activity { } } - // TODO review use (apparently unused) - protected void createPortForward(TerminalView target, String nickname, String type, String source, String dest) { - String summary = getString(R.string.portforward_problem); - try { - long hostId = target.bridge.host.getId(); - - PortForwardBean pfb = new PortForwardBean(hostId, nickname, type, source, dest); - - target.bridge.addPortForward(pfb); - if (target.bridge.enablePortForward(pfb)) { - summary = getString(R.string.portforward_done); - } - } catch(Exception e) { - Log.e(TAG, "Problem trying to create portForward", e); - } - - Toast.makeText(ConsoleActivity.this, summary, Toast.LENGTH_LONG).show(); - } - protected View findCurrentView(int id) { View view = flip.getCurrentView(); if(view == null) return null; return view.findViewById(id); } - // TODO review use (apparently unused) - protected HostBean getCurrentHost() { - View view = findCurrentView(R.id.console_flip); - if(!(view instanceof TerminalView)) return null; - return ((TerminalView)view).bridge.host; - } - protected PromptHelper getCurrentPromptHelper() { View view = findCurrentView(R.id.console_flip); if(!(view instanceof TerminalView)) return null; diff --git a/src/org/connectbot/util/UberColorPickerDialog.java b/src/org/connectbot/util/UberColorPickerDialog.java index 923a027..e12307e 100644 --- a/src/org/connectbot/util/UberColorPickerDialog.java +++ b/src/org/connectbot/util/UberColorPickerDialog.java @@ -571,17 +571,6 @@ public class UberColorPickerDialog extends Dialog { } /** - * Convert a slider position in the range [0,PALETTE_DIM] to a byte value in the range [0,255]. - * @param sliderPos in the range [0,PALETTE_DIM]. - * @return - */ - public int sliderPosTo255(int sliderPos) { - int int255 = (int)(255.0f * ((float)sliderPos / (float)PALETTE_DIM)); - int255 = pinToByte(int255); - return int255; - } - - /** * Wrap Math.round(). I'm not a Java expert. Is this the only way to avoid writing "(int)Math.round" everywhere? * @param x * @return @@ -591,20 +580,6 @@ public class UberColorPickerDialog extends Dialog { } /** - * Limit a value to a min and max range. - * @param n - * @return - */ - private int pinToByte(int n) { - if (n < 0) { - n = 0; - } else if (n > 255) { - n = 255; - } - return n; - } - - /** * Limit a value to the range [0,1]. * @param n * @return |