Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release/11.5.1 into master #8971

Merged
merged 7 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ android {

defaultConfig {
applicationId "org.wordpress.android"
versionName "11.5"
versionCode 661
versionName "11.5.1"
versionCode 664
minSdkVersion 21
targetSdkVersion 26

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import org.wordpress.android.ui.stockmedia.StockMediaPickerActivity;
import org.wordpress.android.ui.themes.ThemeBrowserActivity;
import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.AppLog.T;
import org.wordpress.android.util.ToastUtils;
import org.wordpress.android.util.UrlUtils;
import org.wordpress.android.util.WPActivityUtils;
Expand All @@ -86,6 +87,7 @@
import java.util.Map;

import static org.wordpress.android.analytics.AnalyticsTracker.ACTIVITY_LOG_ACTIVITY_ID_KEY;
import static org.wordpress.android.analytics.AnalyticsTracker.Stat.STATS_ACCESS_ERROR;
import static org.wordpress.android.ui.pages.PagesActivityKt.EXTRA_PAGE_REMOTE_ID_KEY;
import static org.wordpress.android.ui.stats.StatsActivity.LOGGED_INTO_JETPACK;
import static org.wordpress.android.viewmodel.activitylog.ActivityLogDetailViewModelKt.ACTIVITY_LOG_ID_KEY;
Expand Down Expand Up @@ -257,9 +259,20 @@ public static void viewQuickStartForResult(Activity activity) {
}

public static void viewBlogStats(Context context, SiteModel site) {
Intent intent = new Intent(context, org.wordpress.android.ui.stats.refresh.StatsActivity.class);
intent.putExtra(WordPress.SITE, site);
context.startActivity(intent);
if (site == null) {
AppLog.e(T.STATS, "SiteModel is null when opening the stats.");
AnalyticsTracker.track(
STATS_ACCESS_ERROR,
ActivityLauncher.class.getName(),
"NullPointerException",
"Failed to open Stats because of the null SiteModel"
);
ToastUtils.showToast(context, R.string.stats_cannot_be_started, ToastUtils.Duration.SHORT);
} else {
Intent intent = new Intent(context, org.wordpress.android.ui.stats.refresh.StatsActivity.class);
intent.putExtra(WordPress.SITE, site);
context.startActivity(intent);
}
}

public static void viewFollowersStats(Context context, SiteModel site) {
Expand Down Expand Up @@ -330,7 +343,7 @@ public static void viewReferrersStats(Context context, SiteModel site, StatsTime
}

public static void viewClicksStats(Context context, SiteModel site, StatsTimeframe statsTimeframe,
String selectedDate) {
String selectedDate) {
Intent intent = new Intent(context, StatsViewAllActivity.class);
intent.putExtra(StatsAbstractFragment.ARGS_VIEW_TYPE, StatsViewType.CLICKS);
intent.putExtra(StatsAbstractFragment.ARGS_TIMEFRAME, statsTimeframe);
Expand Down Expand Up @@ -358,7 +371,7 @@ public static void viewCountriesStats(Context context, SiteModel site, StatsTime
}

public static void viewVideoPlays(Context context, SiteModel site, StatsTimeframe statsTimeframe,
String selectedDate) {
String selectedDate) {
Intent intent = new Intent(context, StatsViewAllActivity.class);
intent.putExtra(StatsAbstractFragment.ARGS_VIEW_TYPE, StatsViewType.VIDEO_PLAYS);
intent.putExtra(StatsAbstractFragment.ARGS_TIMEFRAME, statsTimeframe);
Expand All @@ -372,7 +385,7 @@ public static void viewVideoPlays(Context context, SiteModel site, StatsTimefram
}

public static void viewSearchTerms(Context context, SiteModel site, StatsTimeframe statsTimeframe,
String selectedDate) {
String selectedDate) {
Intent intent = new Intent(context, StatsViewAllActivity.class);
intent.putExtra(StatsAbstractFragment.ARGS_VIEW_TYPE, StatsViewType.SEARCH_TERMS);
intent.putExtra(StatsAbstractFragment.ARGS_TIMEFRAME, statsTimeframe);
Expand All @@ -386,7 +399,7 @@ public static void viewSearchTerms(Context context, SiteModel site, StatsTimefra
}

public static void viewAuthorsStats(Context context, SiteModel site, StatsTimeframe statsTimeframe,
String selectedDate) {
String selectedDate) {
Intent intent = new Intent(context, StatsViewAllActivity.class);
intent.putExtra(StatsAbstractFragment.ARGS_VIEW_TYPE, StatsViewType.AUTHORS);
intent.putExtra(StatsAbstractFragment.ARGS_TIMEFRAME, statsTimeframe);
Expand Down
1 change: 1 addition & 0 deletions WordPress/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@
<string name="stats_publicize_service_label">Service</string>
<string name="stats_publicize_followers_label">Followers</string>
<string name="stats_from_to_dates_in_week_label">%1$s - %2$s</string>
<string name="stats_cannot_be_started">We cannot open the statistics at the moment. Please try again later</string>

<!-- Jetpack install -->
<string name="jetpack">Jetpack</string>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ subprojects {
}

ext {
fluxCVersion = '8905b77d0755c3b0e802697177ae56b475aece37'
fluxCVersion = 'fe614fb5b6a1ea13c1b8ba4e4b3fd8c74f8f5090'
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public enum Stat {
READER_SAVED_LIST_VIEWED_FROM_POST_LIST_NOTICE,
READER_SAVED_LIST_VIEWED_FROM_POST_DETAILS_NOTICE,
STATS_ACCESSED,
STATS_ACCESS_ERROR,
STATS_INSIGHTS_ACCESSED,
STATS_PERIOD_DAYS_ACCESSED,
STATS_PERIOD_WEEKS_ACCESSED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,8 @@ public static String getEventNameForStat(AnalyticsTracker.Stat stat) {
return "account_logout";
case STATS_ACCESSED:
return "stats_accessed";
case STATS_ACCESS_ERROR:
return "stats_access_error";
case STATS_INSIGHTS_ACCESSED:
return "stats_insights_accessed";
case STATS_PERIOD_DAYS_ACCESSED:
Expand Down