コード例 #1
0
 private void update() {
   // whether had update.zip in /mnt/sdcard
   FileUtils mFileUtils = new FileUtils();
   if (mFileUtils.isFileExist(Utilities.mRecoveryFileName)) {
     // enter recovery to update
     if (Utilities.getRecoveryMode() == 1) {
       Utilities.rebootToAutoRecovery(mContext);
     } else {
       Utilities.rebootToRecovery(mContext);
     }
   } else {
     // TODO:can't be here
   }
 }
コード例 #2
0
 private void InstallInterface() {
   FileUtils mFileUtils = new FileUtils();
   if (mFileUtils.isFileExist(Utilities.mRecoveryFileName)) {
     Utilities.mIslocalDownload = true;
     btnOperation.setText(getString(R.string.install));
     LeftPromptInfo.setText(getString(R.string.Will_upgrade));
     Utilities.setViewDisText(RightPromptInfo, getString(R.string.update_notice));
     Progresstext.setBackground(getResources().getDrawable(R.drawable.ic_finish_pic));
   } else {
     btnOperation.setText(getString(R.string.Quit));
     LeftPromptInfo.setText(getString(R.string.No_update_file));
     Utilities.setViewDisText(RightPromptInfo, getString(R.string.No_update_file_Prompt));
     Progresstext.setBackground(getResources().getDrawable(R.drawable.ic_error_pic));
   }
 }