Skip to content

Commit 2ded422

Browse files
Merge pull request #530 from glennhartmann/map-of-to-immutablemap-of
Use Guava's ImmutableMap.of() instead of Map.of().
2 parents 40390f0 + e0ce682 commit 2ded422

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

androidbrowserhelper/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ dependencies {
7373
implementation 'androidx.annotation:annotation:1.1.0'
7474
implementation 'androidx.core:core:1.0.2'
7575
implementation 'androidx.appcompat:appcompat:1.7.0'
76+
implementation 'com.google.guava:guava:33.4.8-android'
7677

7778
testImplementation 'junit:junit:4.12'
7879
testImplementation 'org.mockito:mockito-core:3.0.0'

androidbrowserhelper/src/main/java/com/google/androidbrowserhelper/trusted/LauncherActivityMetadata.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import java.util.List;
3333
import java.util.Map;
3434

35+
import com.google.common.collect.ImmutableMap;
36+
3537
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT;
3638

3739
/**
@@ -162,7 +164,7 @@ public class LauncherActivityMetadata {
162164
private static final String LAUNCH_HANDLER_CLIENT_MODE_METADATA_NAME
163165
= "android.support.customtabs.trusted.LAUNCH_HANDLER_CLIENT_MODE";
164166
private static final Map<String, Integer> LAUNCH_HANDLER_CLIENT_MODE_MAP =
165-
Map.of(
167+
ImmutableMap.of(
166168
"navigate-existing", LaunchHandlerClientMode.NAVIGATE_EXISTING,
167169
"focus-existing", LaunchHandlerClientMode.FOCUS_EXISTING,
168170
"navigate-new", LaunchHandlerClientMode.NAVIGATE_NEW,

0 commit comments

Comments
 (0)