File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
aztec/src/main/kotlin/org/wordpress/aztec/watchers/event Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1+ package org.wordpress.aztec.watchers.event.buckets
2+
3+ import org.wordpress.aztec.watchers.event.sequence.known.space.API25InWordSpaceInsertionEvent
4+
5+ class API25Bucket : Bucket () {
6+ init {
7+ // constructor - here add all identified sequences for this bucket
8+ userOperations.add(API25InWordSpaceInsertionEvent ())
9+ // mUserOperations.add(new ...);
10+ // mUserOperations.add(new ...);
11+ // mUserOperations.add(new ...);
12+ }
13+ }
Original file line number Diff line number Diff line change 11package org.wordpress.aztec.watchers.event.buckets
22
3- import org.wordpress.aztec.watchers.event.sequence.known.space.API26InWordSpaceInsertionEvent
3+ import org.wordpress.aztec.watchers.event.sequence.known.space.API25InWordSpaceInsertionEvent
44
55class API26Bucket : Bucket () {
66 init {
77 // constructor - here add all identified sequences for this bucket
8- userOperations.add(API26InWordSpaceInsertionEvent ())
8+ userOperations.add(API25InWordSpaceInsertionEvent ())
99 // mUserOperations.add(new ...);
1010 // mUserOperations.add(new ...);
1111 // mUserOperations.add(new ...);
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package org.wordpress.aztec.watchers.event.sequence
22
33import android.os.Build
44import org.wordpress.aztec.watchers.event.IEventInjector
5+ import org.wordpress.aztec.watchers.event.buckets.API25Bucket
56import org.wordpress.aztec.watchers.event.buckets.API26Bucket
67import org.wordpress.aztec.watchers.event.buckets.Bucket
78import org.wordpress.aztec.watchers.event.text.TextWatcherEvent
@@ -12,6 +13,8 @@ class ObservationQueue(val injector: IEventInjector) : EventSequence<TextWatcher
1213 init {
1314 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
1415 buckets.add(API26Bucket ())
16+ } else if (Build .VERSION .SDK_INT == Build .VERSION_CODES .N_MR1 ) {
17+ buckets.add(API25Bucket ())
1518 }
1619 /*
1720 remember to add here any other buckets and init logic as suitable, depending on the context
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import org.wordpress.aztec.watchers.event.text.TextWatcherEvent
1111/*
1212 This case implements the behavior observed in https://github.com/wordpress-mobile/AztecEditor-Android/issues/555
1313 */
14- class API26InWordSpaceInsertionEvent : UserOperationEvent () {
14+ class API25InWordSpaceInsertionEvent : UserOperationEvent () {
1515 private val SPACE = ' '
1616 private val SPACE_STRING = " " + SPACE
1717 private val MAXIMUM_TIME_BETWEEN_EVENTS_IN_PATTERN_MS = 50
@@ -35,7 +35,7 @@ class API26InWordSpaceInsertionEvent : UserOperationEvent() {
3535 val builderStep4 = TextWatcherEventInsertText .Builder ()
3636 val step4 = builderStep4.build()
3737
38- // add each of the steps that make up for the identified API26InWordSpaceInsertionEvent here
38+ // add each of the steps that make up for the identified API25InWordSpaceInsertionEvent here
3939 clear()
4040 addSequenceStep(step1)
4141 addSequenceStep(step2)
You can’t perform that action at this time.
0 commit comments