File tree Expand file tree Collapse file tree 4 files changed +47
-1
lines changed
main/java/com/instabug/flutter/modules
test/java/com/instabug/flutter Expand file tree Collapse file tree 4 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,14 @@ rootProject.allprojects {
16
16
repositories {
17
17
google()
18
18
mavenCentral()
19
+
20
+ maven {
21
+ url " https://mvn.instabug.com/nexus/repository/instabug-internal/"
22
+ credentials {
23
+ username " instabug"
24
+ password System . getenv(" INSTABUG_REPOSITORY_PASSWORD" )
25
+ }
26
+ }
19
27
}
20
28
}
21
29
@@ -44,7 +52,7 @@ android {
44
52
}
45
53
46
54
dependencies {
47
- api ' com.instabug.library:instabug:14.3.0'
55
+ api ' com.instabug.library:instabug:14.3.0.6760192-SNAPSHOT '
48
56
testImplementation ' junit:junit:4.13.2'
49
57
testImplementation " org.mockito:mockito-inline:3.12.1"
50
58
testImplementation " io.mockk:mockk:1.13.13"
Original file line number Diff line number Diff line change @@ -472,6 +472,11 @@ public void reply(Void reply) {
472
472
473
473
}
474
474
});
475
+
476
+ featureFlagsFlutterApi .onNetworkLogBodyMaxSizeChange (
477
+ (long ) featuresState .getNetworkLogCharLimit (),
478
+ reply -> {}
479
+ );
475
480
}
476
481
});
477
482
}
@@ -509,4 +514,21 @@ public void setNetworkLogBodyEnabled(@NonNull Boolean isEnabled) {
509
514
e .printStackTrace ();
510
515
}
511
516
}
517
+
518
+ @ Override
519
+ public void getNetworkBodyMaxSize (@ NonNull InstabugPigeon .Result <Long > result ) {
520
+ ThreadManager .runOnMainThread (
521
+ new Runnable () {
522
+ @ Override
523
+ public void run () {
524
+ try {
525
+ long networkCharLimit = InternalCore .INSTANCE .get_networkLogCharLimit ();
526
+ result .success (networkCharLimit );
527
+ } catch (Exception e ) {
528
+ e .printStackTrace ();
529
+ }
530
+ }
531
+ }
532
+ );
533
+ }
512
534
}
Original file line number Diff line number Diff line change @@ -658,4 +658,15 @@ public void testSetNetworkLogBodyDisabled() {
658
658
659
659
mInstabug .verify (() -> Instabug .setNetworkLogBodyEnabled (false ));
660
660
}
661
+
662
+ @ Test
663
+ public void testGetNetworkBodyMaxSize () {
664
+ int expected = 10240 ;
665
+ InstabugPigeon .Result <Long > result = makeResult ((actual ) -> assertEquals ((Long ) (long ) expected , actual ));
666
+
667
+ mockkObject (new InternalCore []{InternalCore .INSTANCE }, false );
668
+ every (mockKMatcherScope -> InternalCore .INSTANCE .get_networkLogCharLimit ()).returns (expected );
669
+
670
+ api .getNetworkBodyMaxSize (result );
671
+ }
661
672
}
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ abstract class FeatureFlagsFlutterApi {
7
7
bool isW3cExternalGeneratedHeaderEnabled,
8
8
bool isW3cCaughtHeaderEnabled,
9
9
);
10
+
11
+ void onNetworkLogBodyMaxSizeChange (int networkBodyMaxSize);
10
12
}
11
13
12
14
@HostApi ()
@@ -76,4 +78,7 @@ abstract class InstabugHostApi {
76
78
void willRedirectToStore ();
77
79
78
80
void setNetworkLogBodyEnabled (bool isEnabled);
81
+
82
+ @async
83
+ int ? getNetworkBodyMaxSize ();
79
84
}
You can’t perform that action at this time.
0 commit comments