Skip to content

Commit

Permalink
Merge pull request #12203 from wordpress-mobile/merge/15.1-code-freez…
Browse files Browse the repository at this point in the history
…e-to-master

Merge 15.1 code freeze to master
  • Loading branch information
jkmassel authored Jun 16, 2020
2 parents abd8a2f + 6366f1d commit b4fb424
Show file tree
Hide file tree
Showing 212 changed files with 10,618 additions and 4,298 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- restore-gutenberg-bundle-cache
- run:
name: Ensure assets folder exists
command: mkdir libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
command: mkdir -p libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- attach_workspace:
at: libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- run:
Expand All @@ -132,7 +132,7 @@ jobs:
- restore-gutenberg-bundle-cache
- run:
name: Ensure assets folder exists
command: mkdir libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
command: mkdir -p libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- attach_workspace:
at: libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- run:
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
- restore-gutenberg-bundle-cache
- run:
name: Ensure assets folder exists
command: mkdir libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
command: mkdir -p libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- attach_workspace:
at: libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- run:
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
- restore-gutenberg-bundle-cache
- run:
name: Ensure assets folder exists
command: mkdir libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
command: mkdir -p libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- attach_workspace:
at: libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- run:
Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
- restore-gutenberg-bundle-cache
- run:
name: Ensure assets folder exists
command: mkdir libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
command: mkdir -p libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- attach_workspace:
at: libs/gutenberg-mobile/react-native-gutenberg-bridge/android/src/main/assets
- run:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ it on [Google Play](https://play.google.com/store/apps/details?id=org.wordpress.
Notes:

* To use WordPress.com features (login to WordPress.com, access Reader and Stats, etc) you need a WordPress.com OAuth2 ID and secret. Please read the [OAuth2 Authentication](#oauth2-authentication) section.
* While loading/building the app in Android Studio ignore the prompt to update the gradle plugin version as that will probably introduce build errors. On the other hand, feel free to update if you are planning to work on ensuring the compatibility of the newer version.


## OAuth2 Authentication ##
Expand Down
9 changes: 8 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
15.1
15.2
-----

15.1
-----
* Fixes issue on Notifications tab when two screens were drawn on top of each other
* [**] Fix video thumbnails, settings and preview in Media section for private sites
* [**] Block Editor: Adds editor support for theme defined colors and theme defined gradients on cover and button blocks.
* [*] Support for breaking out of captions/citation authors by pressing enter on the following blocks: image, video, gallery, quote, and pullquote.

15.0
-----
* [*] Fix wrong icon is used when a Password is visible
Expand Down
11 changes: 5 additions & 6 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ android {
if (project.hasProperty("versionName")) {
versionName project.property("versionName")
} else {
versionName "alpha-228"
versionName "alpha-229"
}
versionCode 879
versionCode 882
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion

Expand Down Expand Up @@ -85,9 +85,9 @@ android {
dimension "buildType"
// Only set the release version if one isn't provided
if (!project.hasProperty("versionName")) {
versionName "15.0"
versionName "15.1-rc-1"
}
versionCode 880
versionCode 881
buildConfigField "boolean", "ME_ACTIVITY_AVAILABLE", "false"
buildConfigField "boolean", "TENOR_AVAILABLE", "false"
buildConfigField "boolean", "READER_IMPROVEMENTS_PHASE_2", "false"
Expand Down Expand Up @@ -252,8 +252,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
androidTestImplementation('com.github.tomakehurst:wiremock:2.23.2') {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
androidTestImplementation('com.github.tomakehurst:wiremock:2.26.3') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
exclude group: 'org.apache.commons', module: 'commons-lang3'
exclude group: 'asm', module: 'asm'
Expand Down
12 changes: 5 additions & 7 deletions WordPress/src/main/java/org/wordpress/android/WordPress.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
import org.wordpress.android.util.AppLog.T;
import org.wordpress.android.util.AppThemeUtils;
import org.wordpress.android.util.BitmapLruCache;
import org.wordpress.android.util.CrashLoggingUtils;
import org.wordpress.android.util.CrashLogging;
import org.wordpress.android.util.DateTimeUtils;
import org.wordpress.android.util.FluxCUtils;
import org.wordpress.android.util.LocaleManager;
Expand Down Expand Up @@ -161,6 +161,7 @@ public class WordPress extends MultiDexApplication implements HasServiceInjector
@Inject ImageManager mImageManager;
@Inject PrivateAtomicCookie mPrivateAtomicCookie;
@Inject ImageEditorTracker mImageEditorTracker;
@Inject CrashLogging mCrashLogging;

// For development and production `AnalyticsTrackerNosara`, for testing a mocked `Tracker` will be injected.
@Inject Tracker mTracker;
Expand Down Expand Up @@ -230,17 +231,15 @@ public void onCreate() {
// This call needs be made before accessing any methods in android.webkit package
setWebViewDataDirectorySuffixOnAndroidP();

if (CrashLoggingUtils.shouldEnableCrashLogging(getContext())) {
CrashLoggingUtils.startCrashLogging(getContext());
}

initWellSql();

// Init Dagger
initDaggerComponent();
component().inject(this);
mDispatcher.register(this);

mCrashLogging.start(getContext());

// Init static fields from dagger injected singletons, for legacy Actions and Utilities
sRequestQueue = mRequestQueue;
sImageLoader = mImageLoader;
Expand All @@ -257,7 +256,7 @@ public void onLog(T tag, LogLevel logLevel, String message) {
StringBuffer sb = new StringBuffer();
sb.append(logLevel.toString()).append("/").append(AppLog.TAG).append("-")
.append(tag.toString()).append(": ").append(message);
CrashLoggingUtils.log(sb.toString());
mCrashLogging.log(sb.toString());
}
});
AppLog.i(T.UTILS, "WordPress.onCreate");
Expand Down Expand Up @@ -862,7 +861,6 @@ public void onAppGoesToBackground() {
AppLog.d(T.MAIN, "ConnectionChangeReceiver successfully unregistered");
} catch (IllegalArgumentException e) {
AppLog.e(T.MAIN, "ConnectionChangeReceiver was already unregistered");
CrashLoggingUtils.log(e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.wordpress.android.ui.reader.models.ReaderBlogIdPostId;
import org.wordpress.android.ui.reader.models.ReaderBlogIdPostIdList;
import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.CrashLoggingUtils;
import org.wordpress.android.util.SqlUtils;

import java.util.Locale;
Expand Down Expand Up @@ -1096,7 +1095,6 @@ private static ReaderPostList getPostListFromCursor(Cursor cursor) {
} while (cursor.moveToNext());
}
} catch (IllegalStateException e) {
CrashLoggingUtils.log(e);
AppLog.e(AppLog.T.READER, e);
}
return posts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,20 @@
import org.wordpress.android.ui.posts.PostDatePickerDialogFragment;
import org.wordpress.android.ui.posts.PostListFragment;
import org.wordpress.android.ui.posts.PostNotificationScheduleTimeDialogFragment;
import org.wordpress.android.ui.posts.PostSettingsTagsActivity;
import org.wordpress.android.ui.posts.PostSettingsTagsFragment;
import org.wordpress.android.ui.posts.PostTimePickerDialogFragment;
import org.wordpress.android.ui.posts.PostsListActivity;
import org.wordpress.android.ui.posts.PrepublishingHomeAdapter;
import org.wordpress.android.ui.posts.PrepublishingHomeFragment;
import org.wordpress.android.ui.posts.PrepublishingBottomSheetFragment;
import org.wordpress.android.ui.posts.PrepublishingTagsFragment;
import org.wordpress.android.ui.posts.PublishNotificationReceiver;
import org.wordpress.android.ui.posts.SelectCategoriesActivity;
import org.wordpress.android.ui.posts.adapters.AuthorSelectionAdapter;
import org.wordpress.android.ui.posts.services.AztecVideoLoader;
import org.wordpress.android.ui.posts.prepublishing.PrepublishingPublishSettingsFragment;
import org.wordpress.android.ui.posts.prepublishing.visibility.PrepublishingVisibilityAdapter;
import org.wordpress.android.ui.posts.prepublishing.visibility.PrepublishingVisibilityFragment;
import org.wordpress.android.ui.prefs.AccountSettingsFragment;
import org.wordpress.android.ui.prefs.AppSettingsActivity;
import org.wordpress.android.ui.prefs.AppSettingsFragment;
Expand Down Expand Up @@ -131,6 +139,8 @@
import org.wordpress.android.ui.reader.adapters.ReaderCommentAdapter;
import org.wordpress.android.ui.reader.adapters.ReaderPostAdapter;
import org.wordpress.android.ui.reader.adapters.ReaderUserAdapter;
import org.wordpress.android.ui.reader.discover.interests.ReaderInterestsFragment;
import org.wordpress.android.ui.reader.discover.ReaderDiscoverFragment;
import org.wordpress.android.ui.reader.services.update.ReaderUpdateLogic;
import org.wordpress.android.ui.reader.views.ReaderLikingUsersView;
import org.wordpress.android.ui.reader.views.ReaderSiteHeaderView;
Expand Down Expand Up @@ -162,6 +172,7 @@
import org.wordpress.android.ui.uploads.UploadService;
import org.wordpress.android.ui.whatsnew.FeatureAnnouncementDialogFragment;
import org.wordpress.android.ui.whatsnew.FeatureAnnouncementListAdapter;
import org.wordpress.android.util.CrashLogging;
import org.wordpress.android.util.HtmlToSpannedConverter;
import org.wordpress.android.util.WPWebViewClient;
import org.wordpress.android.util.image.getters.WPCustomImageGetter;
Expand Down Expand Up @@ -329,8 +340,6 @@ public interface AppComponent extends AndroidInjector<WordPress> {

void inject(EditPostSettingsFragment object);

void inject(PostSettingsTagsActivity object);

void inject(PostsListActivity object);

void inject(AuthorSelectionAdapter object);
Expand Down Expand Up @@ -497,6 +506,22 @@ public interface AppComponent extends AndroidInjector<WordPress> {

void inject(PageParentSearchFragment object);

void inject(PrepublishingBottomSheetFragment object);

void inject(PrepublishingHomeFragment object);

void inject(PrepublishingHomeAdapter object);

void inject(PrepublishingTagsFragment object);

void inject(PostSettingsTagsFragment object);

void inject(PrepublishingPublishSettingsFragment object);

void inject(PrepublishingVisibilityFragment object);

void inject(PrepublishingVisibilityAdapter object);

void inject(AppSettingsActivity object);

void inject(FeatureAnnouncementDialogFragment object);
Expand All @@ -505,10 +530,18 @@ public interface AppComponent extends AndroidInjector<WordPress> {

void inject(ReaderFragment object);

void inject(ReaderDiscoverFragment object);

void inject(ReaderSearchActivity object);

void inject(ReaderInterestsFragment object);

void inject(HomepageSettingsDialog object);

void inject(CrashLogging object);

void inject(AztecVideoLoader object);

// Allows us to inject the application without having to instantiate any modules, and provides the Application
// in the app graph
@Component.Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import org.wordpress.android.fluxc.store.AccountStore
import org.wordpress.android.fluxc.store.SiteStore
import org.wordpress.android.support.SupportHelper
import org.wordpress.android.support.ZendeskHelper
import org.wordpress.android.support.ZendeskPlanFieldHelper
import org.wordpress.android.util.CrashLogging
import javax.inject.Singleton

@Module
Expand All @@ -15,10 +17,16 @@ class SupportModule {
fun provideZendeskHelper(
accountStore: AccountStore,
siteStore: SiteStore,
supportHelper: SupportHelper
): ZendeskHelper = ZendeskHelper(accountStore, siteStore, supportHelper)
supportHelper: SupportHelper,
zendeskPlanFieldHelper: ZendeskPlanFieldHelper
): ZendeskHelper = ZendeskHelper(accountStore, siteStore, supportHelper, zendeskPlanFieldHelper)

@Singleton
@Provides
fun provideSupportHelper(): SupportHelper = SupportHelper()

@Singleton
@Provides
fun provideZendeskPlanFieldHelper(remoteLoggingUtils: CrashLogging): ZendeskPlanFieldHelper =
ZendeskPlanFieldHelper(remoteLoggingUtils)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@

import org.wordpress.android.ui.JetpackRemoteInstallViewModel;
import org.wordpress.android.ui.domains.DomainRegistrationMainViewModel;
import org.wordpress.android.ui.main.MeViewModel;
import org.wordpress.android.ui.plans.PlansViewModel;
import org.wordpress.android.ui.posts.EditPostPublishSettingsViewModel;
import org.wordpress.android.ui.posts.PostListMainViewModel;
import org.wordpress.android.ui.posts.PrepublishingHomeViewModel;
import org.wordpress.android.ui.posts.PrepublishingTagsViewModel;
import org.wordpress.android.ui.posts.PrepublishingViewModel;
import org.wordpress.android.ui.posts.editor.StorePostViewModel;
import org.wordpress.android.ui.posts.prepublishing.PrepublishingPublishSettingsViewModel;
import org.wordpress.android.ui.posts.prepublishing.visibility.PrepublishingVisibilityViewModel;
import org.wordpress.android.ui.prefs.homepage.HomepageSettingsViewModel;
import org.wordpress.android.ui.reader.ReaderCommentListViewModel;
import org.wordpress.android.ui.reader.discover.ReaderDiscoverViewModel;
import org.wordpress.android.ui.reader.discover.interests.ReaderInterestsViewModel;
import org.wordpress.android.ui.reader.subfilter.SubFilterViewModel;
import org.wordpress.android.ui.reader.viewmodels.NewsCardViewModel;
import org.wordpress.android.ui.reader.viewmodels.ReaderPostListViewModel;
Expand Down Expand Up @@ -302,6 +310,16 @@ abstract class ViewModelModule {
@ViewModelKey(ReaderViewModel.class)
abstract ViewModel readerParentPostListViewModel(ReaderViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(ReaderDiscoverViewModel.class)
abstract ViewModel readerDiscoverViewModel(ReaderDiscoverViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(ReaderInterestsViewModel.class)
abstract ViewModel readerInterestsViewModel(ReaderInterestsViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(NewsCardViewModel.class)
Expand All @@ -312,6 +330,36 @@ abstract class ViewModelModule {
@ViewModelKey(HomepageSettingsViewModel.class)
abstract ViewModel homepageSettingsDialogViewModel(HomepageSettingsViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(PrepublishingViewModel.class)
abstract ViewModel prepublishingViewModel(PrepublishingViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(PrepublishingHomeViewModel.class)
abstract ViewModel prepublishingOptionsViewModel(PrepublishingHomeViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(PrepublishingTagsViewModel.class)
abstract ViewModel prepublishingTagsViewModel(PrepublishingTagsViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(PrepublishingPublishSettingsViewModel.class)
abstract ViewModel prepublishingPublishSettingsViewModel(PrepublishingPublishSettingsViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(PrepublishingVisibilityViewModel.class)
abstract ViewModel prepublishingVisibilityViewModel(PrepublishingVisibilityViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(MeViewModel.class)
abstract ViewModel meViewModel(MeViewModel viewModel);

@Binds
abstract ViewModelProvider.Factory provideViewModelFactory(ViewModelFactory viewModelFactory);
}
Loading

0 comments on commit b4fb424

Please sign in to comment.