Пример #1
0
 private void selectApplication() {
   LaunchArgument argument =
       LaunchHelper.createArgument(
           AppListContext.class,
           getActivity(),
           (resultCode, data) -> {
             if (resultCode == Activity.RESULT_OK) {
               String acs = data.getStringExtra(Key.ApkConfig);
               ApkConfig apkConfig = JsonHelper.json(acs, ApkConfig.class);
               homePresenter.updateApkConfig(apkConfig);
               // TODO : view
               getActivity()
                   .setTitle(String.format("%s %s", apkConfig.getName(), apkConfig.getType()));
             }
             return true;
           });
   launch(argument);
 }
Пример #2
0
 private void openAppSetting() {
   ApkConfig apkConfig = homePresenter.getApkConfig();
   Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
   intent.setData(Uri.parse("package:" + apkConfig.getPackageName()));
   startActivity(intent);
 }