Skip to content

Commit 372532e

Browse files
committed
revert: [android] assert cannot register empty client*
Current implementation on all platforms allowed, to support existing implementation this assertion is reverted.
1 parent 75b4fed commit 372532e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Fix: `ActiveCall` is not null even after the Call is declined.
77
* Fix: Android foreground service not starting on Android +11, many thanks to [@mohsen-jalali](https://github.com/mohsen-jalali)
88
* Fix: Android foreground microphone permission not granted on Android +14.
9+
* Revert: [Android] allow registering clients with an empty name (supporting current implementation).
910

1011
## 0.1.0
1112

android/src/main/kotlin/com/twilio/twilio_voice/storage/StorageImpl.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,17 @@ class StorageImpl(ctx: Context) : Storage {
7575
}
7676

7777
override fun addRegisteredClient(id: String, name: String): Boolean {
78-
assert(id.isNotEmpty()) { "addRegisteredClient: id cannot be empty" }
78+
// TODO: remove this assert, it's not needed now.
79+
// assert(id.isNotEmpty()) { "addRegisteredClient: id cannot be empty" }
7980
prefs.let {
8081
val editor = it.edit()
8182
return editor.putString(id, name).commit()
8283
}
8384
}
8485

8586
override fun removeRegisteredClient(id: String): Boolean {
86-
assert(id.isNotEmpty()) { "removeRegisteredClient: id cannot be empty" }
87+
// TODO: remove this assert, it's not needed now.
88+
// assert(id.isNotEmpty()) { "removeRegisteredClient: id cannot be empty" }
8789
prefs.let {
8890
val editor = it.edit()
8991
return editor.remove(id).commit()

0 commit comments

Comments
 (0)