@@ -165,7 +165,7 @@ public class MainActivity extends AppCompatActivity{
165
165
static String iface , prefix , airodump_dir , aireplay_dir , aircrack_dir , mdk3bf_dir , mdk3dos_dir , reaver_dir , chroot_dir ,
166
166
enable_monMode , disable_monMode , custom_chroot_cmd ;
167
167
static int deauthWait , band ;
168
- static boolean show_notif , show_details , airOnStartup , debug , delete_extra ,
168
+ static boolean show_notif , show_details , airOnStartup , debug , delete_extra , show_client_count ,
169
169
monstart , always_cap , cont_on_fail , watchdog , target_deauth , enable_on_airodump , update_on_startup ;
170
170
171
171
private GoogleApiClient client ;
@@ -356,6 +356,7 @@ protected Boolean doInBackground(Void... params){
356
356
target_deauth = Boolean .parseBoolean (getString (R .string .target_deauth ));
357
357
update_on_startup = Boolean .parseBoolean (getString (R .string .auto_update ));
358
358
band = Integer .parseInt (getString (R .string .band ));
359
+ show_client_count = Boolean .parseBoolean (getString (R .string .show_client_count ));
359
360
360
361
//Load preferences
361
362
publishProgress (getString (R .string .loading_preferences ));
@@ -1130,6 +1131,7 @@ static void load(){
1130
1131
cont_on_fail = pref .getBoolean ("cont_on_fail" , cont_on_fail );
1131
1132
update_on_startup = pref .getBoolean ("update_on_startup" , update_on_startup );
1132
1133
band = Integer .parseInt (pref .getString ("band" , Integer .toString (band )));
1134
+ show_client_count = pref .getBoolean ("show_client_count" , show_client_count );
1133
1135
1134
1136
progress .setMax (deauthWait );
1135
1137
progress .setProgress (deauthWait );
@@ -1337,13 +1339,23 @@ public View getView(int position, View convertView, @NonNull ViewGroup parent){
1337
1339
TextView upperRight = itemview .findViewById (R .id .upperRight );
1338
1340
upperRight .setText (current .device .upperRight );
1339
1341
1340
- //Image
1342
+ //Image and count views
1341
1343
ImageView iv = itemview .findViewById (R .id .iv );
1344
+ TextView icon_count_view = itemview .findViewById (R .id .icon_count_view );
1342
1345
if (current .device instanceof AP ){
1343
1346
if (((AP )current .device ).isHidden ) iv .setImageResource (R .drawable .ap_hidden );
1344
1347
else iv .setImageResource (R .drawable .ap2 );
1348
+
1349
+ if (show_client_count ){
1350
+ icon_count_view .setText (Integer .toString (((AP ) (current .device )).clients .size ()));
1351
+ icon_count_view .setVisibility (View .VISIBLE );
1352
+ }else {
1353
+ icon_count_view .setVisibility (View .GONE );
1354
+ }
1345
1355
}else {
1346
1356
iv .setImageResource (R .drawable .st2 );
1357
+
1358
+ icon_count_view .setVisibility (View .GONE );
1347
1359
}
1348
1360
1349
1361
return itemview ;
0 commit comments