Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/transport/TransportFactory.java @ 112:77ac18bc1b2f
cleanup java formatting
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 18 Jun 2014 13:03:01 -0700 |
parents | b39bcf616a6f |
children |
comparison
equal
deleted
inserted
replaced
111:6a0ad4d384ea | 112:77ac18bc1b2f |
---|---|
66 public static Uri getUri(String protocol, String input) { | 66 public static Uri getUri(String protocol, String input) { |
67 Log.d("TransportFactory", String.format( | 67 Log.d("TransportFactory", String.format( |
68 "Attempting to discover URI for protocol=%s on input=%s", | 68 "Attempting to discover URI for protocol=%s on input=%s", |
69 protocol, input)); | 69 protocol, input)); |
70 AbsTransport t = getTransport(protocol); | 70 AbsTransport t = getTransport(protocol); |
71 | |
71 if (t == null) return null; | 72 if (t == null) return null; |
73 | |
72 return t.getUri(input); | 74 return t.getUri(input); |
73 } | 75 } |
74 | 76 |
75 public static String[] getTransportNames() { | 77 public static String[] getTransportNames() { |
76 return transportNames; | 78 return transportNames; |
83 return a.getClass().equals(b.getClass()); | 85 return a.getClass().equals(b.getClass()); |
84 } | 86 } |
85 | 87 |
86 public static boolean canForwardPorts(String protocol) { | 88 public static boolean canForwardPorts(String protocol) { |
87 AbsTransport t = getTransport(protocol); | 89 AbsTransport t = getTransport(protocol); |
90 | |
88 if (t == null) return false; | 91 if (t == null) return false; |
92 | |
89 return t.canForwardPorts(); | 93 return t.canForwardPorts(); |
90 } | 94 } |
91 | 95 |
92 /** | 96 /** |
93 * @param protocol text name of protocol | 97 * @param protocol text name of protocol |
94 * @param context | 98 * @param context |
95 * @return expanded format hint | 99 * @return expanded format hint |
96 */ | 100 */ |
97 public static String getFormatHint(String protocol, Context context) { | 101 public static String getFormatHint(String protocol, Context context) { |
98 AbsTransport t = getTransport(protocol); | 102 AbsTransport t = getTransport(protocol); |
103 | |
99 if (t == null) return "???"; | 104 if (t == null) return "???"; |
105 | |
100 return t.getFormatHint(context); | 106 return t.getFormatHint(context); |
101 } | 107 } |
102 | 108 |
103 /** | 109 /** |
104 * @param hostdb Handle to HostDatabase | 110 * @param hostdb Handle to HostDatabase |