Skip to content

Commit f275650

Browse files
committed
Optimize code and add failed sample
1 parent a43259a commit f275650

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/src/main/java/com/githang/dinny/app/ActivityProtocol.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ interface ActivityProtocol {
1717
@ToActivity(TestActivity::class)
1818
fun newTestIntent(context: Context): Intent
1919

20+
// would be failed because Intent.putExtra method doesn't support HashMap type.
21+
@ToActivity(TestActivity::class)
22+
fun newTestIntent(context: Context, @Extra("map") map: HashMap<String, String>): Intent
23+
2024
@ToActivity(TestActivity::class)
2125
fun newTestIntent(
2226
context: Context,

library/src/main/java/com/githang/dinny/ProtocolMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ProtocolMethod {
2020
private ExtraHandler[] extraHandlers;
2121
private boolean start;
2222

23-
public ProtocolMethod(Class<? extends Activity> target, ExtraHandler[] extraHandlers, boolean start) {
23+
private ProtocolMethod(Class<? extends Activity> target, ExtraHandler[] extraHandlers, boolean start) {
2424
this.target = target;
2525
this.extraHandlers = extraHandlers;
2626
this.start = start;

0 commit comments

Comments
 (0)