Skip to content

Commit 02746d6

Browse files
committed
Remove ACCESS_NETWORK_STATE permission
1 parent caf664b commit 02746d6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

java/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
2828
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
2929

30+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:node="remove"/>
31+
3032
<application android:label="@string/english_ime_name"
3133
android:icon="@mipmap/ic_launcher"
3234
android:roundIcon="@mipmap/ic_launcher_round"

java/src/org/futo/inputmethod/latin/xlm/TrainingWorker.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ public fun scheduleTrainingWorkerBackground(context: Context) {
298298
val constraints = Constraints.Builder()
299299
.setRequiresBatteryNotLow(true)
300300
.setRequiresCharging(true)
301-
.setRequiredNetworkType(NetworkType.UNMETERED) // If device is on a metered network, the user may be travelling
302-
//.setRequiresDeviceIdle(true)
301+
.setRequiresDeviceIdle(true)
302+
//.setRequiredNetworkType(NetworkType.UNMETERED) // If device is on a metered network, the user may be travelling
303303
.build()
304304

305305
val request = PeriodicWorkRequest.Builder(

0 commit comments

Comments
 (0)