comparison app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java @ 501:aee5f34cc2db

updates for android10+
author Carl Byington <carl@five-ten-sg.com>
date Tue, 07 Jun 2022 16:13:47 -0700
parents 11d714165a2d
children e1dd1fd46e18
comparison
equal deleted inserted replaced
500:11d714165a2d 501:aee5f34cc2db
80 80
81 public class HostListActivity extends ListActivity { 81 public class HostListActivity extends ListActivity {
82 protected static final String TAG = "ConnectBot.HostListActivity"; 82 protected static final String TAG = "ConnectBot.HostListActivity";
83 public final static int REQUEST_EDIT = 1; 83 public final static int REQUEST_EDIT = 1;
84 public final static int REQUEST_EULA = 2; 84 public final static int REQUEST_EULA = 2;
85 public final static int REQUEST_STORAGEMANAGER = 3; 85 public final static int REQUEST_STORAGE_MANAGER = 3;
86 86
87 protected TerminalManager bound = null; 87 protected TerminalManager bound = null;
88 88
89 protected HostDatabase hostdb; 89 protected HostDatabase hostdb;
90 private List<HostBean> hosts; 90 private List<HostBean> hosts;
293 Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION); 293 Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
294 intent.addCategory("android.intent.category.DEFAULT"); 294 intent.addCategory("android.intent.category.DEFAULT");
295 intent.setData(Uri.parse(String.format("package:%s",getApplicationContext().getPackageName()))); 295 intent.setData(Uri.parse(String.format("package:%s",getApplicationContext().getPackageName())));
296 startActivityForResult(intent, REQUEST_STORAGE_MANAGER); 296 startActivityForResult(intent, REQUEST_STORAGE_MANAGER);
297 } catch (Exception e) { 297 } catch (Exception e) {
298 Intent intent = new Intent(); 298 Intent intent = new Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
299 intent.setAction(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
300 startActivityForResult(intent, REQUEST_STORAGE_MANAGER); 299 startActivityForResult(intent, REQUEST_STORAGE_MANAGER);
301 } 300 }
302 } 301 }
303 } 302 }
304 303