~humpolec-team/humpolec/UbuntuInstaller-progressbar

« back to all changes in this revision

Viewing changes to src/com/canonical/ubuntu/installer/UbuntuInstallService.java

  • Committer: Rex Tsai (蔡志展)
  • Date: 2013-12-26 07:18:14 UTC
  • Revision ID: rex.tsai@canonical.com-20131226071814-wsi5d05ldbdg9d63
s/findUpgradeable/findInstallCommand/

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
            result = doInstallUbuntu(intent);
297
297
        } else if (action.equals(IS_UBUNTU_UPGRADABLE)) {
298
298
            // check if the upgradeable images available.
299
 
            if(findUpgradeable()) {
 
299
            if(findInstallCommand()) {
300
300
                Log.d(TAG, "There is a upgradeable file. send VERSION_UPDATE");
301
301
                result = new Intent(VERSION_UPDATE);
302
302
            }
1182
1182
     *
1183
1183
     * @return if there is upgradeable images stored in /cache.
1184
1184
     */
1185
 
    public boolean findUpgradeable() {
 
1185
    public boolean findInstallCommand () {
1186
1186
        String[] candidates = {
1187
1187
                "/cache/recovery/ubuntu_command",
1188
1188
                "/cache/ubunturecovery/ubuntu_command",
1221
1221
        }
1222
1222
        if(ret) {
1223
1223
            // FIXME we don't know what's the version in /cache.
1224
 
            SharedPreferences pref = getApplication().
1225
 
                    getSharedPreferences(SHARED_PREF, Context.MODE_PRIVATE);
 
1224
            SharedPreferences pref = getSharedPreferences(SHARED_PREF, Context.MODE_PRIVATE);
1226
1225
            VersionInfo v = new VersionInfo(pref, PREF_KEY_INSTALLED_VERSION);
1227
1226
            v.storeVersion(pref.edit(), PREF_KEY_DOWNLOADED_VERSION);
1228
1227
        }