File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
safebox/src/main/java/com/harrytmthy/safebox/state Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,15 @@ import java.util.concurrent.ConcurrentHashMap
21
21
import java.util.concurrent.CopyOnWriteArraySet
22
22
23
23
/* *
24
+ * **Deprecated:** SafeBox is designed to be a drop-in replacement for EncryptedSharedPreferences.
25
+ * State updates goes out-of-scope as SafeBox can no longer be closed.
26
+ *
24
27
* Public observer interface for monitoring SafeBox state changes.
25
28
*
26
29
* Allows clients to observe SafeBox's lifecycle state transitions for a given file name,
27
30
* enabling safer orchestration in multi-screen or asynchronous apps.
28
31
*/
32
+ @Deprecated(message = " SafeBoxGlobalStateObserver is deprecated and will be removed in v1.4." )
29
33
public object SafeBoxGlobalStateObserver {
30
34
31
35
private val stateHolder = ConcurrentHashMap <String , SafeBoxState >()
Original file line number Diff line number Diff line change @@ -19,12 +19,16 @@ package com.harrytmthy.safebox.state
19
19
import com.harrytmthy.safebox.SafeBox
20
20
21
21
/* *
22
+ * **Deprecated:** SafeBox is designed to be a drop-in replacement for EncryptedSharedPreferences.
23
+ * State updates goes out-of-scope as SafeBox can no longer be closed.
24
+ *
22
25
* Lifecycle state of a [SafeBox] instance.
23
26
*
24
27
* Emitted to [SafeBoxStateListener] for visibility during async work.
25
28
*
26
29
* @see SafeBoxStateListener
27
30
*/
31
+ @Deprecated(message = " SafeBoxState is deprecated and will be removed in v1.4." )
28
32
public enum class SafeBoxState {
29
33
30
34
/* *
Original file line number Diff line number Diff line change 17
17
package com.harrytmthy.safebox.state
18
18
19
19
/* *
20
+ * **Deprecated:** SafeBox is designed to be a drop-in replacement for EncryptedSharedPreferences.
21
+ * State updates goes out-of-scope as SafeBox can no longer be closed.
22
+ *
20
23
* A listener interface for observing [SafeBoxState] changes tied to a specific SafeBox file.
21
24
*
22
25
* This is typically used in non-singleton SafeBox use cases (e.g. ViewModel-scoped),
23
26
* where consumers need to track if the instance is starting, writing, or idle.
24
27
*
25
28
* @see SafeBoxState
26
29
*/
30
+ @Deprecated(message = " SafeBoxStateListener is deprecated and will be removed in v1.4." )
27
31
public fun interface SafeBoxStateListener {
28
32
29
33
/* *
You can’t perform that action at this time.
0 commit comments