urbanairship-core/src/main/java/com/urbanairship/push/PushManager.java
void migrateRegistrationTokenSettings() {
        if (preferenceDataStore.getBoolean(REGISTRATION_TOKEN_MIGRATED_KEY, false)) {
            return;
        }

        Logger.debug("Migrating registration token preference");

        String token = null;
        switch (UAirship.shared().getPlatformType()) {
            case UAirship.ANDROID_PLATFORM:
                token = preferenceDataStore.getString(GCM_INSTANCE_ID_TOKEN_KEY, null);
                break;
            case UAirship.AMAZON_PLATFORM:
                token = preferenceDataStore.getString(ADM_REGISTRATION_ID_KEY, null);
                break;
        }

        if (!UAStringUtil.isEmpty(token)) {
            setRegistrationToken(token);
        }

        preferenceDataStore.put(REGISTRATION_TOKEN_MIGRATED_KEY, true);
    }
/**
     * Migrates the stored registration token.
     */
Migrates the stored registration token.
Migrates the stored registration token .
void migrateRegistrationTokenSettings() {
        if (preferenceDataStore.getBoolean(REGISTRATION_TOKEN_MIGRATED_KEY, false)) {
            return;
        }
        Logger.debug("Migrating registration token preference");
        String token = null;
        switch (UAirship.shared().getPlatformType()) {
            case UAirship.ANDROID_PLATFORM:
                token = preferenceDataStore.getString(GCM_INSTANCE_ID_TOKEN_KEY, null);
                break;
            case UAirship.AMAZON_PLATFORM:
                token = preferenceDataStore.getString(ADM_REGISTRATION_ID_KEY, null);
                break;
        }
        if (!UAStringUtil.isEmpty(token)) {
            setRegistrationToken(token);
        }
        preferenceDataStore.put(REGISTRATION_TOKEN_MIGRATED_KEY, true);
    }
void migrateRegistrationTokenSettings ( ) { if ( preferenceDataStore . getBoolean ( REGISTRATION_TOKEN_MIGRATED_KEY , false ) ) { return ; } Logger . debug ( "Migrating registration token preference" ) ; String token = null ; switch ( UAirship . shared ( ) . getPlatformType ( ) ) { case UAirship . ANDROID_PLATFORM : token = preferenceDataStore . getString ( GCM_INSTANCE_ID_TOKEN_KEY , null ) ; break ; case UAirship . AMAZON_PLATFORM : token = preferenceDataStore . getString ( ADM_REGISTRATION_ID_KEY , null ) ; break ; } if ( ! UAStringUtil . isEmpty ( token ) ) { setRegistrationToken ( token ) ; } preferenceDataStore . put ( REGISTRATION_TOKEN_MIGRATED_KEY , true ) ; }
Migrates the stored registration token.
Migrates the stored registration token .