From 76c4f80e47f21bffe4d467ea80de0284e1a9f156 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Tue, 4 May 2010 05:33:29 +0000 Subject: Remove unused functions git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@499 df292f66-193f-0410-a5fc-6d59da041ff2 --- src/org/connectbot/ConsoleActivity.java | 26 ---------------------- src/org/connectbot/util/UberColorPickerDialog.java | 25 --------------------- 2 files changed, 51 deletions(-) (limited to 'src') 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 @@ -570,17 +570,6 @@ public class UberColorPickerDialog extends Dialog { setMeasuredDimension(VIEW_DIM_X, VIEW_DIM_Y); } - /** - * 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 @@ -590,20 +579,6 @@ public class UberColorPickerDialog extends Dialog { return (int)Math.round(x); } - /** - * 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 -- cgit v1.2.3