コード例 #1
0
 @Override
 protected void onPreExecute() {
   isrun = true;
   tip = 1;
   progressDialog =
       ProgressDialog.show(
           context, getString(R.string.fix_perms_title), getString(R.string.wait));
   Helpers.get_assetsScript("fix_permissions", context, "#", "");
   if (Helpers.isSystemApp(getActivity())) {
     new CMDProcessor()
         .sh.runWaitFor("busybox chmod 750 " + context.getFilesDir() + "/fix_permissions");
   } else {
     new CMDProcessor()
         .su.runWaitFor("busybox chmod 750 " + context.getFilesDir() + "/fix_permissions");
   }
 }
コード例 #2
0
 @Override
 protected void onPreExecute() {
   isrun = true;
   tip = 2;
   progressDialog =
       ProgressDialog.show(
           context, getString(R.string.optim_db_title), getString(R.string.wait));
   mPreferences.edit().putLong(PREF_OPTIM_DB, System.currentTimeMillis()).commit();
   Helpers.get_assetsBinary("sqlite3", context);
   Helpers.get_assetsScript(
       "sql_optimize", context, "busybox chmod 750 " + context.getFilesDir() + "/sqlite3", "");
   if (Helpers.isSystemApp(getActivity())) {
     new CMDProcessor()
         .sh.runWaitFor("busybox chmod 750 " + context.getFilesDir() + "/sql_optimize");
   } else {
     new CMDProcessor()
         .su.runWaitFor("busybox chmod 750 " + context.getFilesDir() + "/sql_optimize");
   }
 }