Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 6bf1b14

Browse files
authored
Events: map no CLASSification to Android ACCESS_DEFAULT instead of ACCESS_PUBLIC (#183)
1 parent 16a4f22 commit 6bf1b14

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/src/androidTest/kotlin/at/bitfire/ical4android/AndroidEventTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ class AndroidEventTest {
745745
fun testBuildEvent_Classification_None() {
746746
buildEvent(true) {
747747
}.let { result ->
748-
assertEquals(Events.ACCESS_PUBLIC, result.getAsInteger(Events.ACCESS_LEVEL))
748+
assertEquals(Events.ACCESS_DEFAULT, result.getAsInteger(Events.ACCESS_LEVEL))
749749
assertNull(firstUnknownProperty(result))
750750
}
751751
}

lib/src/main/kotlin/at/bitfire/ical4android/AndroidEvent.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,8 @@ abstract class AndroidEvent(
983983

984984
builder .withValue(Events.AVAILABILITY, if (event.opaque) Events.AVAILABILITY_BUSY else Events.AVAILABILITY_FREE)
985985
.withValue(Events.ACCESS_LEVEL, when (event.classification) {
986-
null, Clazz.PUBLIC -> Events.ACCESS_PUBLIC
986+
null -> Events.ACCESS_DEFAULT
987+
Clazz.PUBLIC -> Events.ACCESS_PUBLIC
987988
Clazz.CONFIDENTIAL -> Events.ACCESS_CONFIDENTIAL
988989
else /* including Events.ACCESS_PRIVATE */ -> Events.ACCESS_PRIVATE
989990
})

0 commit comments

Comments
 (0)