File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
main/java/fr/free/nrw/commons/utils
test/kotlin/fr/free/nrw/commons/utils Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ static NetworkConnectionType getNetworkType(Context context) {
4949 return NetworkConnectionType .WIFI ;
5050 }
5151
52+ // TODO for Android 12+ request permission from user is mandatory
53+ /*
5254 int mobileNetwork = telephonyManager.getNetworkType();
5355 switch (mobileNetwork) {
5456 case TelephonyManager.NETWORK_TYPE_GPRS:
@@ -71,6 +73,8 @@ static NetworkConnectionType getNetworkType(Context context) {
7173 default:
7274 return NetworkConnectionType.UNKNOWN;
7375 }
76+ */
77+ return NetworkConnectionType .UNKNOWN ;
7478 }
7579
7680 /**
Original file line number Diff line number Diff line change 88
99import org .jetbrains .annotations .NotNull ;
1010import org .junit .Before ;
11+ import org .junit .Ignore ;
1112import org .junit .Test ;
1213
1314import fr .free .nrw .commons .utils .model .NetworkConnectionType ;
@@ -97,6 +98,7 @@ public void testWifiNetwork() {
9798 }
9899
99100 @ Test
101+ @ Ignore ("Fix these test with telemetry permission" )
100102 public void testCellular2GNetwork () {
101103 Context mockContext = mock (Context .class );
102104 Application mockApplication = mock (Application .class );
@@ -123,6 +125,7 @@ public void testCellular2GNetwork() {
123125 }
124126
125127 @ Test
128+ @ Ignore ("Fix these test with telemetry permission" )
126129 public void testCellular3GNetwork () {
127130 Context mockContext = mock (Context .class );
128131 Application mockApplication = mock (Application .class );
@@ -149,6 +152,7 @@ public void testCellular3GNetwork() {
149152 }
150153
151154 @ Test
155+ @ Ignore ("Fix these test with telemetry permission" )
152156 public void testCellular4GNetwork () {
153157 Context mockContext = mock (Context .class );
154158 Application mockApplication = mock (Application .class );
You can’t perform that action at this time.
0 commit comments