History log of /frameworks/support/app-toolkit/common/src/main/java/android/arch/core/internal/FastSafeIterableMap.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
76c131bad1324a65e35a962f7cb1e8ac4da3ef5b 26-Jul-2017 Sergey Vasilinets <sergeyv@google.com> Fixed remove function in FastSafeIterableMap

Bug: 64057125
Test: FastSafeIterableMap#testRemove, LifecycleRegistryTest#sameObserverReAddition
Change-Id: Ie97b62f756dd05fe507c2363dba8f9f0fc02fb77
/frameworks/support/app-toolkit/common/src/main/java/android/arch/core/internal/FastSafeIterableMap.java
b546e977676e83f932e88e6c6d4e6e2710621bc9 21-Jul-2017 Sergey Vasilinets <sergeyv@google.com> Introduce ordering invariants in LifecycleRegistry

Invariant 1: at any moment of time for observer1 & observer2 in
LifecycleRegistry's observers list:
if addition_order(observer1) < addition_order(observer2), then
state(observer1) >= state(observer2).

Invariant 2: Suppose in addition time of observer1 in the current stack
there is a function annotated with @OnLifecycleEvent called on an
observer2, then observer2 is called a parent of observer1 and
observer1 will be brought to state smaller than state(observer2)

Note: Usually Invariant 1 covers Invariant 2, except one corner case
when parent in addition time is already removed from observers list.

bug:63112687
Test: LifecycleRegistryTest
Change-Id: I7d197d96647b0307baf4624e5b2ec324133e4ccf
/frameworks/support/app-toolkit/common/src/main/java/android/arch/core/internal/FastSafeIterableMap.java