From d3d227372ca446bc1b8f8347ef770edd4ae7b502 Mon Sep 17 00:00:00 2001 From: davigonz Date: Tue, 20 Feb 2018 18:45:18 +0100 Subject: [PATCH] Update some dates and minor changes --- res/drawable/indicator_dot_not_selected.xml | 4 ++-- res/drawable/indicator_dot_selected.xml | 4 ++-- res/drawable/whats_new_progress_transition.xml | 4 ++-- res/values/setup.xml | 2 -- src/com/owncloud/android/MainApp.java | 7 +------ .../owncloud/android/features/FeatureList.java | 15 +++++++-------- .../android/ui/activity/WhatsNewActivity.java | 13 +++++++------ .../android/ui/whatsnew/ProgressIndicator.java | 7 +++---- 8 files changed, 24 insertions(+), 32 deletions(-) diff --git a/res/drawable/indicator_dot_not_selected.xml b/res/drawable/indicator_dot_not_selected.xml index 987949cb132..42fccda7517 100644 --- a/res/drawable/indicator_dot_not_selected.xml +++ b/res/drawable/indicator_dot_not_selected.xml @@ -2,8 +2,8 @@ - false ownCloud diff --git a/src/com/owncloud/android/MainApp.java b/src/com/owncloud/android/MainApp.java index 83fd5043b6b..fd255c5141d 100644 --- a/src/com/owncloud/android/MainApp.java +++ b/src/com/owncloud/android/MainApp.java @@ -169,10 +169,7 @@ public static Context getAppContext() { public static String getAccountType() { return getAppContext().getResources().getString(R.string.account_type); } - - - // Non gradle build systems do not provide BuildConfig.VERSION_CODE - // so we must fallback to this method :( + public static int getVersionCode() { try { String thisPackageName = getAppContext().getPackageName(); @@ -182,8 +179,6 @@ public static int getVersionCode() { } } - // From AccountAuthenticator - // public static final String AUTHORITY = "org.owncloud"; public static String getAuthority() { return getAppContext().getResources().getString(R.string.authority); } diff --git a/src/com/owncloud/android/features/FeatureList.java b/src/com/owncloud/android/features/FeatureList.java index 997c84ea661..d96fa0cd101 100644 --- a/src/com/owncloud/android/features/FeatureList.java +++ b/src/com/owncloud/android/features/FeatureList.java @@ -2,8 +2,8 @@ * ownCloud Android client application * * @author Bartosz Przybylski - * Copyright (C) 2015 Bartosz Przybylski - * Copyright (C) 2015 ownCloud Inc. + * Copyright (C) 2018 Bartosz Przybylski + * Copyright (C) 2018 ownCloud GmbH. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -41,19 +41,18 @@ public class FeatureList { static final private boolean SHOW_ON_FIRST_RUN = true; static final private boolean SHOW_ON_UPGRADE = false; - static final private FeatureItem featuresList[] = { // Basic features showed on first install new FeatureItem(R.drawable.whats_new_files, R.string.welcome_feature_1_title, - R.string.welcome_feature_1_text, "1.0.0", "0", SHOW_ON_FIRST_RUN), + R.string.welcome_feature_1_text, "2.6.0", "0", SHOW_ON_FIRST_RUN), new FeatureItem(R.drawable.whats_new_share, R.string.welcome_feature_2_title, - R.string.welcome_feature_2_text, "1.0.0", "0", SHOW_ON_FIRST_RUN), + R.string.welcome_feature_2_text, "2.6.0", "0", SHOW_ON_FIRST_RUN), new FeatureItem(R.drawable.whats_new_accounts, R.string.welcome_feature_3_title, - R.string.welcome_feature_3_text, "1.0.0", "0" ,SHOW_ON_FIRST_RUN), + R.string.welcome_feature_3_text, "2.6.0", "0" ,SHOW_ON_FIRST_RUN), new FeatureItem(R.drawable.whats_new_camera_uploads, R.string.welcome_feature_4_title, - R.string.welcome_feature_4_text, "1.0.0", "0", SHOW_ON_FIRST_RUN), + R.string.welcome_feature_4_text, "2.6.0", "0", SHOW_ON_FIRST_RUN), new FeatureItem(R.drawable.whats_new_video_streaming, R.string.welcome_feature_5_title, - R.string.welcome_feature_5_text, "1.0.0", "0", SHOW_ON_FIRST_RUN), + R.string.welcome_feature_5_text, "2.6.0", "0", SHOW_ON_FIRST_RUN), // Features introduced in certain point in time }; diff --git a/src/com/owncloud/android/ui/activity/WhatsNewActivity.java b/src/com/owncloud/android/ui/activity/WhatsNewActivity.java index 5d627e74f87..c8becf6358d 100644 --- a/src/com/owncloud/android/ui/activity/WhatsNewActivity.java +++ b/src/com/owncloud/android/ui/activity/WhatsNewActivity.java @@ -1,8 +1,8 @@ /** * ownCloud Android client application * - * Copyright (C) 2015 Bartosz Przybylski - * Copyright (C) 2015 ownCloud Inc. + * Copyright (C) 2018 Bartosz Przybylski + * Copyright (C) 2018 ownCloud GmbH. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -40,6 +40,7 @@ import android.widget.ImageView; import android.widget.TextView; +import com.owncloud.android.BuildConfig; import com.owncloud.android.MainApp; import com.owncloud.android.R; import com.owncloud.android.authentication.AccountAuthenticatorActivity; @@ -66,7 +67,8 @@ protected void onCreate(Bundle savedInstanceState) { mProgress = (ProgressIndicator) findViewById(R.id.progressIndicator); mPager = (ViewPager)findViewById(R.id.contentPanel); - final boolean isBeta = getResources().getBoolean(R.bool.is_beta); + boolean isBeta = BuildConfig.BUILD_TYPE.equals(MainApp.BUILD_TYPE_BETA); + FeaturesViewAdapter adapter = new FeaturesViewAdapter(getSupportFragmentManager(), FeatureList.getFiltered(getLastSeenVersionCode(), isFirstRun(), isBeta)); @@ -154,7 +156,7 @@ static public void runIfNeeded(Context context) { } static private boolean shouldShow(Context context) { - final boolean isBeta = context.getResources().getBoolean(R.bool.is_beta); + boolean isBeta = BuildConfig.BUILD_TYPE.equals(MainApp.BUILD_TYPE_BETA); return (isFirstRun() && context instanceof AccountAuthenticatorActivity) || ( !(isFirstRun() && (context instanceof FileDisplayActivity)) && @@ -235,5 +237,4 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, return v; } } - -} +} \ No newline at end of file diff --git a/src/com/owncloud/android/ui/whatsnew/ProgressIndicator.java b/src/com/owncloud/android/ui/whatsnew/ProgressIndicator.java index 40cc19219f2..b632a9ab4b3 100644 --- a/src/com/owncloud/android/ui/whatsnew/ProgressIndicator.java +++ b/src/com/owncloud/android/ui/whatsnew/ProgressIndicator.java @@ -2,8 +2,8 @@ * ownCloud Android client application * * @author Bartosz Przybylski - * Copyright (C) 2015 Bartosz Przybylski - * Copyright (C) 2015 ownCloud Inc. + * Copyright (C) 2018 Bartosz Przybylski + * Copyright (C) 2018 ownCloud GmbH. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -96,5 +96,4 @@ private void setup() { mDotsContainer.setLayoutParams(params); addView(mDotsContainer); } - -} +} \ No newline at end of file