3678 Commits

Author SHA1 Message Date
Adeel Zafar
7807927562 Fixed write permission force settings bug
Removed the force variable that forced permission.
Permission will only appear if it is not allowed.
2019-07-31 23:38:42 +05:00
Adeel Zafar
38af60109a Fixes#1186 Allow user to disable data before turning on hotspot
Added a method isMobileDataEnabled() that uses ConnectivityManager
And checks if data is enabled or not.
If data is enabled, then it takes the user to enableDisableMobileData()
It shows the user Data Usage Summary settings screen.
2019-07-31 23:38:41 +05:00
Adeel Zafar
950ca069d5 Fixes#1187 Wifi-hotspot not working with devices>=Oreo fixed.
Created a location request
added onCompletionListener for LocationSettingsResponse
Checked LocationSettingsStates in onActivityResult()
Added gms location dependency.
2019-07-31 23:38:40 +05:00
Adeel Zafar
8349f6d380 Add location permissions 2019-07-31 23:38:39 +05:00
Adeel Zafar
d04839f6ef Workaround for Android versions >=Oreo
Worked with WifiManager's startLocalOnlyHotspotCallback
It is specifically for android versions>=O
2019-07-31 23:38:39 +05:00
Adeel Zafar
c8e975f8ed Add documentation to the code. 2019-07-31 23:38:38 +05:00
Adeel Zafar
dc425c2199 Fix write settings permission bug
Write settings permission popping up on every restart.
Using Toast to display Wifi Hotspot Enabled/Disabled
2019-07-31 23:38:38 +05:00
Adeel Zafar
d4b0ea1dd3 Add menu item to turn on/off Wifi Hotspot
Initialize WifiManager object in MainActivity.
And work with WifiHotspotManager class.
2019-07-31 23:38:37 +05:00
Adeel Zafar
bd328b5d1d Add method getWifiApState() and isWifiApEnabled()
It's used to get current state of wifi access point.
2019-07-31 23:38:36 +05:00
Adeel Zafar
8eff3c5d84 Add WIFI_AP_STATE_ENUMS
Declare enums to check the WifiAp state.
2019-07-31 23:38:36 +05:00
Adeel Zafar
2289a8821f Add wifi hotspot manager class
This classes manages all the wifi-hotspot logic.
It uses WifiManager and WifiConfiguration classes by Android.
Add method to check show write permission settings.
Add method setWifiEnabled to setup wifi hotspot
Add setters/getters for WifiConfiguration
2019-07-31 23:38:35 +05:00
Adeel Zafar
f11bde6313 Added permissions to work with wifi-hotspot
Wifi related permissions.
Write system settings permission.
2019-07-31 23:38:35 +05:00
Sean Mac Gillicuddy
a1fb3d0973 #1212 move the only tests that were getting picked up 2019-07-31 16:27:01 +01:00
Sean Mac Gillicuddy
ce8759ff49 #1212 mark all tests with test runner annotation 2019-07-31 15:53:40 +01:00
Sean Mac Gillicuddy
3a73b682c9 #1212 update deprecated test runner 2019-07-31 15:36:40 +01:00
Sean Mac Gillicuddy
6a352fe2c3 #121 move tests out of tests package as only they were getting picked up by ci? 2019-07-31 14:52:59 +01:00
Sean Mac Gillicuddy
896929a728 #1212 reduce test complexity 2019-07-31 14:26:54 +01:00
Seán Mac Gillicuddy
2957ea87f7
Merge pull request #1308 from kiwix/feature/macgills/#1307-autoformat
Feature/macgills/#1307 autoformat
2019-07-31 14:01:08 +01:00
Sean Mac Gillicuddy
c8a88284e0 #1307 update inspection profile to mirror gradle file 2019-07-31 13:18:39 +01:00
Sean Mac Gillicuddy
49751be4f3 #1307 reduce iconDensity to warning 2019-07-31 13:14:40 +01:00
Sean Mac Gillicuddy
3c8b11b602 #1212 disable leakcanary 2019-07-31 13:07:59 +01:00
Sean Mac Gillicuddy
86877e4cc1 #1307 autoformat post merge 2019-07-31 12:37:44 +01:00
Sean Mac Gillicuddy
cc5f062067 Merge remote-tracking branch 'origin/develop' into feature/macgills/#1307-autoformat
# Conflicts:
#	app/src/main/java/org/kiwix/kiwixmobile/downloader/DownloadFragment.kt
#	app/src/main/java/org/kiwix/kiwixmobile/utils/files/FileSearch.kt
#	app/src/main/java/org/kiwix/kiwixmobile/views/LanguageAdapter.kt
#	app/src/main/java/org/kiwix/kiwixmobile/views/LanguageSelectDialog.kt
#	app/src/main/java/org/kiwix/kiwixmobile/views/LanguageViewHolder.kt
#	app/src/main/java/org/kiwix/kiwixmobile/zim_manager/Language.kt
#	app/src/main/java/org/kiwix/kiwixmobile/zim_manager/ZimManageActivity.kt
#	app/src/main/java/org/kiwix/kiwixmobile/zim_manager/ZimManageViewModel.kt
#	app/src/main/java/org/kiwix/kiwixmobile/zim_manager/fileselect_view/ZimFileSelectFragment.kt
#	app/src/main/java/org/kiwix/kiwixmobile/zim_manager/library_view/LibraryFragment.kt
#	app/src/main/java/org/kiwix/kiwixmobile/zim_manager/library_view/adapter/base/AbsDelegateAdapter.kt
#	app/src/main/java/org/kiwix/kiwixmobile/zim_manager/library_view/adapter/base/AdapterDelegateManager.kt
#	app/src/test/java/org/kiwix/kiwixmobile/utils/files/FileSearchTest.kt
#	app/src/test/java/org/kiwix/kiwixmobile/zim_manager/ZimManageViewModelTest.kt
2019-07-31 12:35:46 +01:00
Aditya-Sood
0841d57045 Refactor: Delete extra files 2019-07-31 10:00:48 +05:30
Aditya-Sood
4b23a64f86 Refactor: Use AlertDialogShower for EnableLocationServices
- Also removed use of startActivityForResult() for EnableWifiP2pServices, since it is checked during the initialisation of WifiDirectManager in onCreate()
2019-07-31 09:56:33 +05:30
Aditya-Sood
0a5d924b5f Refactor: Use AlertDialogShower for EnableWifiP2pServices 2019-07-31 09:44:24 +05:30
Aditya-Sood
58c936b4fe Refactor 2019-07-31 09:11:40 +05:30
Sean Mac Gillicuddy
cb4427b737 #1212 comment out failing line and try arbitrary wait 2019-07-30 16:16:27 +01:00
Aditya-Sood
4797cae7fa Refactor: Correct use of tools:hint 2019-07-30 20:01:45 +05:30
Sean Mac Gillicuddy
a5a45af3ec #1212 print visibility -up timeout on tab clicking 2019-07-30 15:27:07 +01:00
Aditya-Sood
45cfc3d579
Merge branch 'develop' into feature/LocalFileTransfer 2019-07-30 19:27:24 +05:30
Sean Mac Gillicuddy
a17be030dc #1212 properly nest exceptions - increase timeout and try new id 2019-07-30 14:20:12 +01:00
Sean Mac Gillicuddy
23cf15456c #1212 avoid NPE on null resources - increase timeout for zim_downloader_list 2019-07-30 13:45:07 +01:00
Aditya-Sood
d02c940baa Refactor: Change location of constants 2019-07-30 18:04:50 +05:30
Sean Mac Gillicuddy
2758f36392 #1212 retrieve activity from intrumentation 2019-07-30 13:14:53 +01:00
Sean Mac Gillicuddy
b96f29f8b5 Merge remote-tracking branch 'origin/develop' into feature/macgills/#1212-automated-test-architecture 2019-07-30 12:44:28 +01:00
Sean Mac Gillicuddy
2271c4eb72 #1212 clean debug print 2019-07-30 12:44:08 +01:00
Aditya-Sood
2e41f51fc8 Refactor WifiDirectBroadcastReceiver
Shift all calls from WifiDirectBroadcastReceiver to WifiDirectManager through callbacks
2019-07-30 17:08:53 +05:30
Sean Mac Gillicuddy
5d02c8212c #1212 find using content description - allow for view hierarchy printing 2019-07-30 12:30:59 +01:00
Seán Mac Gillicuddy
8fd3e7e95e
Merge pull request #1293 from kiwix/feature/macgills/#1292-language-activity
Feature/macgills/#1292 language activity
2019-07-30 09:22:07 +01:00
Aditya-Sood
083d7768b8 Refactor WifiDirectManager 2019-07-30 12:55:43 +05:30
Sean Mac Gillicuddy
5e33a43eb7 #1212 comment out old mockwebserver usage 2019-07-29 16:00:57 +01:00
Sean Mac Gillicuddy
1ef34df9f3 #1212 add example of mocked network 2019-07-29 15:48:06 +01:00
Seán Mac Gillicuddy
bc38141aad
Merge pull request #1300 from kiwix/feature/shridhargoel/#1114-toolbar-swipe
Feature/shridhargoel/#1114 toolbar swipe
2019-07-29 12:53:29 +01:00
Sean Mac Gillicuddy
edee67b6ad Merge remote-tracking branch 'origin/develop' into feature/shridhargoel/#1114-toolbar-swipe 2019-07-29 12:03:02 +01:00
Sean Mac Gillicuddy
47a56f8238 #1114 suppress lint errors 2019-07-29 12:02:38 +01:00
Seán Mac Gillicuddy
b66890a469
Merge pull request #1306 from kiwix/feature/macgills/#101-proguard
#101 Add R8 configuration
2019-07-29 11:38:30 +01:00
Sean Mac Gillicuddy
9e84413e04 Merge remote-tracking branch 'origin/develop' into rate-app-counter 2019-07-29 10:27:00 +01:00
Seán Mac Gillicuddy
7263d0c028
Merge pull request #1317 from kiwix/hotfix/macgills/fix-build-with-trusty
Stop jdk installation failure
2019-07-29 10:13:39 +01:00
Sean Mac Gillicuddy
444fa311ba Stop jdk installation failure 2019-07-29 09:26:10 +01:00