Skip to content

Commit 4ff7b48

Browse files
committed
remove wifi service and its dependencies
1 parent 9563036 commit 4ff7b48

File tree

8 files changed

+28
-104
lines changed

8 files changed

+28
-104
lines changed

android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<uses-permission android:name="android.permission.VIBRATE" />
1111
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>
1212
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove"/>
13-
<uses-permission android:name="android.vending.CHECK_LICENSE" tools:node="remove"/>
13+
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" tools:node="remove"/>
1414
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
1515
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
1616

17+
<uses-permission android:name="android.vending.CHECK_LICENSE" tools:node="remove"/>
18+
1719
<application
1820
android:name="com.hamagen.MainApplication"
1921
android:label="@string/app_name"

ios/Podfile.lock

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,6 @@ PODS:
294294
- React
295295
- react-native-netinfo (5.6.2):
296296
- React
297-
- react-native-network-info (5.2.1):
298-
- React
299297
- react-native-safe-area-context (0.7.3):
300298
- React
301299
- react-native-settings (0.2.3):
@@ -375,10 +373,6 @@ PODS:
375373
- React
376374
- RNScreens (2.0.0-beta.2):
377375
- React
378-
- RNSha1 (1.2.3):
379-
- React
380-
- RNWifi (2.4.0):
381-
- React
382376
- Yoga (1.14.0)
383377

384378
DEPENDENCIES:
@@ -412,7 +406,6 @@ DEPENDENCIES:
412406
- react-native-google-maps (from `../node_modules/react-native-maps`)
413407
- react-native-maps (from `../node_modules/react-native-maps`)
414408
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
415-
- react-native-network-info (from `../node_modules/react-native-network-info`)
416409
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
417410
- react-native-settings (from `../node_modules/react-native-settings`)
418411
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
@@ -442,8 +435,6 @@ DEPENDENCIES:
442435
- RNPermissions (from `../node_modules/react-native-permissions`)
443436
- RNReanimated (from `../node_modules/react-native-reanimated`)
444437
- RNScreens (from `../node_modules/react-native-screens`)
445-
- RNSha1 (from `../node_modules/react-native-sha1`)
446-
- RNWifi (from `../node_modules/react-native-wifi-reborn`)
447438
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
448439

449440
SPEC REPOS:
@@ -514,8 +505,6 @@ EXTERNAL SOURCES:
514505
:path: "../node_modules/react-native-maps"
515506
react-native-netinfo:
516507
:path: "../node_modules/@react-native-community/netinfo"
517-
react-native-network-info:
518-
:path: "../node_modules/react-native-network-info"
519508
react-native-safe-area-context:
520509
:path: "../node_modules/react-native-safe-area-context"
521510
react-native-settings:
@@ -572,10 +561,6 @@ EXTERNAL SOURCES:
572561
:path: "../node_modules/react-native-reanimated"
573562
RNScreens:
574563
:path: "../node_modules/react-native-screens"
575-
RNSha1:
576-
:path: "../node_modules/react-native-sha1"
577-
RNWifi:
578-
:path: "../node_modules/react-native-wifi-reborn"
579564
Yoga:
580565
:path: "../node_modules/react-native/ReactCommon/yoga"
581566

@@ -620,7 +605,6 @@ SPEC CHECKSUMS:
620605
react-native-google-maps: 0a989abda71059db2caa98b9dacca7a8f38a47d0
621606
react-native-maps: f4b89da81626ad7f151a8bfcb79733295d31ce5c
622607
react-native-netinfo: 73303369946c2487c600418961bfdc87748b832f
623-
react-native-network-info: d1290ffc0bd0709e11436f5b8d7f605dcc5c4530
624608
react-native-safe-area-context: e200d4433aba6b7e60b52da5f37af11f7a0b0392
625609
react-native-settings: 67977214c0f7d6062ad25581107c16a7a27af2a8
626610
react-native-splash-screen: f15e2d96fd6afc5c882b1dd0b443d07295e2c7c5
@@ -649,8 +633,6 @@ SPEC CHECKSUMS:
649633
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
650634
RNReanimated: b2ab0b693dddd2339bd2f300e770f6302d2e960c
651635
RNScreens: 5e4758109c6d35f9a009ce72af873df907548020
652-
RNSha1: 6de589cd0b0397d0f6248a2e5ee9e5f0d7da38dc
653-
RNWifi: 1747f039612dd494192ba6c8bc498606ad9f3ec4
654636
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
655637

656638
PODFILE CHECKSUM: 837d1b8bd2e1fdf1485b9358860cb5287bda5d36

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"ios-qa": "react-native run-ios --scheme hamagen-qa",
1010
"start": "react-native start",
1111
"test": "jest",
12-
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
12+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
13+
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix"
1314
},
1415
"dependencies": {
1516
"@react-native-community/async-storage": "1.7.1",
@@ -51,18 +52,15 @@
5152
"react-native-firebase": "5.6.0",
5253
"react-native-gesture-handler": "1.5.2",
5354
"react-native-maps": "0.27.1",
54-
"react-native-network-info": "5.2.1",
5555
"react-native-permissions": "2.1.5",
5656
"react-native-reanimated": "1.4.0",
5757
"react-native-safe-area-context": "0.7.3",
5858
"react-native-screens": "2.0.0-beta.2",
5959
"react-native-settings": "0.2.3",
60-
"react-native-sha1": "1.2.3",
6160
"react-native-splash-screen": "https://github.com/greenyossi/react-native-splash-screen.git",
6261
"react-native-sqlite-storage": "4.1.0",
6362
"react-native-uuid-generator": "^6.1.1",
6463
"react-native-webview": "^9.4.0",
65-
"react-native-wifi-reborn": "2.4.0",
6664
"react-redux": "7.1.3",
6765
"redux": "4.0.5",
6866
"redux-thunk": "2.3.0",

src/components/Drawer/HomeDrawerContent.tsx

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
1-
import React, { useState, useCallback } from 'react';
2-
import { ImageBackground, StyleSheet, TouchableOpacity, View } from 'react-native';
31
import { DrawerNavigationProp } from '@react-navigation/drawer';
2+
import React from 'react';
3+
import { StyleSheet, View } from 'react-native';
44
import { useDispatch, useSelector } from 'react-redux';
5-
import AsyncStorage from '@react-native-community/async-storage';
6-
import BackgroundGeolocation from 'react-native-background-geolocation';
7-
import { useFocusEffect } from '@react-navigation/native';
8-
import DrawerItem from './DrawerItem';
9-
import { Icon, Text } from '../common';
10-
import { Store } from '../../types';
5+
import { toggleWebview } from '../../actions/GeneralActions';
116
import {
12-
HIT_SLOP, PADDING_BOTTOM,
7+
PADDING_BOTTOM,
138
PADDING_TOP,
149
SCREEN_HEIGHT,
1510
SCREEN_WIDTH,
16-
USAGE_PRIVACY,
17-
VERSION_NAME,
18-
USER_AGREED_TO_BATTERY,
19-
IS_IOS,
20-
IS_SMALL_SCREEN,
11+
USAGE_PRIVACY
2112
} from '../../constants/Constants';
22-
import { toggleWebview } from '../../actions/GeneralActions';
23-
import { USER_DISABLED_BATTERY } from '../../constants/ActionTypes';
13+
import { Store } from '../../types';
14+
import { Icon, Text } from '../common';
15+
import DrawerItem from './DrawerItem';
2416

2517
interface Props {
2618
navigation: DrawerNavigationProp<any, 'DrawerStack'>

src/components/Main/ScanHomeHeader.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,16 @@ const ScanHomeHeader: FunctionComponent<ScanHomeHeaderProps> = ({ isRTL, languag
7272
<Icon source={require('../../assets/main/headerLogo.png')} width={89} height={43} />
7373
</View>
7474
<View style={{ flexDirection: isRTL ? 'row-reverse' : 'row' }}>
75-
{enableBle !== null && (<TouchableOpacity style={{ marginHorizontal: 20 }} hitSlop={HIT_SLOP} onPress={() => toggleBLEService(Boolean(!enableBle))}>
75+
{enableBle !== null && (
76+
<TouchableOpacity style={{ marginHorizontal: 20 }} hitSlop={HIT_SLOP} onPress={() => toggleBLEService(Boolean(!enableBle))}>
7677
<Icon source={enableBle ? require('../../assets/main/bluetoothOnBtn.png') : require('../../assets/main/bluetoothOffBtn.png')} width={23} />
77-
</TouchableOpacity>)}
78+
</TouchableOpacity>
79+
)}
7880
<TouchableOpacity hitSlop={HIT_SLOP} onPress={onShare}>
7981
<Icon source={require('../../assets/main/share.png')} width={20} />
8082
</TouchableOpacity>
8183
</View>
8284
</View>
83-
8485
<View style={styles.bottomEdge} />
8586
</ImageBackground>
8687
);

src/components/Main/Settings/BluetoothSettings.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,19 @@ const BluetoothSettings: FunctionComponent<Props> = ({ navigation }) => {
4848
>
4949

5050
<Text style={{ flex: 1, color: 'rgb(98,98,98)', textAlign: isRTL ? 'right' : 'left' }} bold>{enableBle ? BLEOn : BLEOff}</Text>
51-
<Switch
51+
<Switch
5252
thumbColor={enableBle ? MAIN_COLOR : WHITE}
53-
trackColor={{ true: 'rgb(145,199,231)', false: 'rgb(190,190,190' }}
53+
trackColor={{ true: 'rgb(145,199,231)', false: 'rgb(190,190,190)' }}
54+
ios_backgroundColor="rgb(190,190,190)"
5455
style={{ [isRTL ? 'marginRight' : 'marginLeft']: 10 }}
55-
value={Boolean(enableBle)}
56-
onValueChange={() => toggleBLEService(Boolean(!enableBle))}
56+
value={Boolean(enableBle)}
57+
onValueChange={() => {
58+
if (enableBle === null) {
59+
navigation.replace('Bluetooth');
60+
} else {
61+
toggleBLEService(!enableBle);
62+
}
63+
}}
5764
/>
5865

5966
</View>

src/services/WifiService.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

yarn.lock

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6744,11 +6744,6 @@ [email protected]:
67446744
resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.27.1.tgz#2f10cd417bb2fd938c9e015b1c9b6d9b1a44b97f"
67456745
integrity sha512-HygBkZBecTnIVRYrSiLRAvu4OmXOYso/A7c6Cy73HkOh9CgGV8Ap5eBea24tvmFGptjj5Hg8AJ94/YbmWK1Okw==
67466746

6747-
6748-
version "5.2.1"
6749-
resolved "https://registry.yarnpkg.com/react-native-network-info/-/react-native-network-info-5.2.1.tgz#b701f10d4ed1aeadcfe77b197328d1ae846f6d3a"
6750-
integrity sha512-iam74xXtrSqqZurCl1/bSjZ9jXcsJY84g7brx1/4uVGCY26c6m+4CArHNSHOsz5ATg2NQT+81sjNy0KlCPyK4g==
6751-
67526747
67536748
version "2.1.5"
67546749
resolved "https://registry.yarnpkg.com/react-native-permissions/-/react-native-permissions-2.1.5.tgz#6cfc4f1ab1590f4952299b7cdc9698525ad540e0"
@@ -6783,11 +6778,6 @@ [email protected]:
67836778
resolved "https://registry.yarnpkg.com/react-native-settings/-/react-native-settings-0.2.3.tgz#82ad78988da32750a2b1121d447537cef7020eed"
67846779
integrity sha512-8qOvtAaYif7eAFV2ToguHMaMd/EaaWbMUxJ/8i+dRlCfTjY2mAy6TwWcf3CF5mIN8OBXAui59hfgqDbWTb/loQ==
67856780

6786-
6787-
version "1.2.3"
6788-
resolved "https://registry.yarnpkg.com/react-native-sha1/-/react-native-sha1-1.2.3.tgz#d3438c692e509c75b84ce3a77c1686785f915bd3"
6789-
integrity sha512-XXkmK/lNY0JqWH0qeI4AOnKdm5Xx1H0CYAA1XsxUN+ihPvC9KY2gL7fVwcBodiuDYUJ8SMBvw6yMTacCk/Gwyg==
6790-
67916781
"react-native-splash-screen@https://github.com/greenyossi/react-native-splash-screen.git":
67926782
version "3.4.0"
67936783
resolved "https://github.com/greenyossi/react-native-splash-screen.git#e9c32d6c1fac8953ef80730ed69042b7c8068dd2"
@@ -6810,11 +6800,6 @@ react-native-webview@^9.4.0:
68106800
escape-string-regexp "2.0.0"
68116801
invariant "2.2.4"
68126802

6813-
6814-
version "2.4.0"
6815-
resolved "https://registry.yarnpkg.com/react-native-wifi-reborn/-/react-native-wifi-reborn-2.4.0.tgz#d5b9d8f3a6deba1cc4e2c0bcd17907f962599731"
6816-
integrity sha512-jp6BoXUBiGl+aR3QlEBHKbkEAy6eLv7rFPl4f1zUkcVXsWaGfTCw0JF2HcT+c6NLw5UkXmZNDB0WuxnvgU5FJg==
6817-
68186803
68196804
version "0.61.5"
68206805
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.61.5.tgz#6e21acb56cbd75a3baeb1f70201a66f42600bba8"

0 commit comments

Comments
 (0)