|
@@ -1,22 +1,23 @@
|
|
|
/**
|
|
|
- * ownCloud Android client application
|
|
|
+ * Nextcloud Android client application
|
|
|
*
|
|
|
* @author Bartosz Przybylski
|
|
|
* Copyright (C) 2015 Bartosz Przybylski
|
|
|
* Copyright (C) 2015 ownCloud Inc.
|
|
|
+ * Copyright (C) 2016 Nextcloud.
|
|
|
*
|
|
|
- * This program is free software: you can redistribute it and/or modify
|
|
|
- * it under the terms of the GNU General Public License version 2,
|
|
|
- * as published by the Free Software Foundation.
|
|
|
+ * This program is free software; you can redistribute it and/or
|
|
|
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
|
|
+ * License as published by the Free Software Foundation; either
|
|
|
+ * version 3 of the License, or any later version.
|
|
|
*
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
- * GNU General Public License for more details.
|
|
|
- *
|
|
|
- * You should have received a copy of the GNU General Public License
|
|
|
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
|
|
*
|
|
|
+ * You should have received a copy of the GNU Affero General Public
|
|
|
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
*/
|
|
|
|
|
|
package com.owncloud.android.features;
|
|
@@ -36,21 +37,29 @@ import java.util.regex.Pattern;
|
|
|
* @author Bartosz Przybylski
|
|
|
*/
|
|
|
public class FeatureList {
|
|
|
-
|
|
|
static final private boolean SHOW_ON_FIRST_RUN = true;
|
|
|
static final private boolean SHOW_ON_UPGRADE = false;
|
|
|
|
|
|
+ private static final String VERSION_1_0_0 = "1.0.0";
|
|
|
+ private static final String BETA_VERSION_0 = "0";
|
|
|
|
|
|
static final private FeatureItem featuresList[] = {
|
|
|
// Basic features showed on first install
|
|
|
- new FeatureItem(R.drawable.what_new_instant_upload, R.string.welcome_feature_1_title, R.string.welcome_feature_1_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
|
|
|
- new FeatureItem(R.drawable.whats_new_files, R.string.welcome_feature_2_title, R.string.welcome_feature_2_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
|
|
|
- new FeatureItem(R.drawable.whats_new_share, R.string.welcome_feature_3_title, R.string.welcome_feature_3_text, "1.0.0", "0" ,SHOW_ON_FIRST_RUN),
|
|
|
- new FeatureItem(R.drawable.whats_new_accounts, R.string.welcome_feature_4_title, R.string.welcome_feature_4_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
|
|
|
+ new FeatureItem(R.drawable.what_new_instant_upload,
|
|
|
+ R.string.welcome_feature_1_title, R.string.welcome_feature_1_text,
|
|
|
+ VERSION_1_0_0, BETA_VERSION_0, SHOW_ON_FIRST_RUN),
|
|
|
+ new FeatureItem(R.drawable.whats_new_files,
|
|
|
+ R.string.welcome_feature_2_title, R.string.welcome_feature_2_text,
|
|
|
+ VERSION_1_0_0, BETA_VERSION_0, SHOW_ON_FIRST_RUN),
|
|
|
+ new FeatureItem(R.drawable.whats_new_share,
|
|
|
+ R.string.welcome_feature_3_title, R.string.welcome_feature_3_text,
|
|
|
+ VERSION_1_0_0, BETA_VERSION_0, SHOW_ON_FIRST_RUN),
|
|
|
+ new FeatureItem(R.drawable.whats_new_accounts,
|
|
|
+ R.string.welcome_feature_4_title, R.string.welcome_feature_4_text,
|
|
|
+ VERSION_1_0_0, BETA_VERSION_0, SHOW_ON_FIRST_RUN),
|
|
|
// Features introduced in certain point in time
|
|
|
};
|
|
|
|
|
|
-
|
|
|
static public FeatureItem[] get() {
|
|
|
return featuresList;
|
|
|
}
|
|
@@ -147,13 +156,11 @@ public class FeatureList {
|
|
|
static int versionCodeFromString(String version) {
|
|
|
String v[] = version.split(Pattern.quote("."));
|
|
|
if (v.length != 3) {
|
|
|
- Log_OC.wtf("FeatureList", "Version string is incorrect " + version);
|
|
|
+ Log_OC.e("FeatureList", "Version string is incorrect " + version);
|
|
|
return 0;
|
|
|
}
|
|
|
- int result = Integer.parseInt(v[0])*(int)(10e6) +
|
|
|
+ return Integer.parseInt(v[0])*(int)(10e6) +
|
|
|
Integer.parseInt(v[1])*(int)(10e4) +
|
|
|
Integer.parseInt(v[2])*100;
|
|
|
-
|
|
|
- return result;
|
|
|
}
|
|
|
}
|