Skip to content

Commit ec5e3f4

Browse files
committed
Keep compatibility
1 parent fba05ee commit ec5e3f4

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ buildscript {
1515
ext.biometricVersion = '1.1.0'
1616
ext.coreVersion = '1.12.0'
1717
ext.fragmentVersion = '1.6.2'
18-
ext.lifecycleVersion = '2.7.0'
18+
ext.lifecycleVersion = '2.6.2'
1919
ext.loaderVersion = '1.1.0'
2020
ext.materialVersion = '1.11.0'
2121
ext.mediarouterVersion = '1.6.0'
2222
ext.multidexVersion = '2.0.1'
2323
ext.navigationVersion = '2.7.7'
2424
ext.preferenceVersion = '1.2.0'
2525
ext.recyclerviewVersion = '1.3.2'
26-
ext.webkitVersion = '1.10.0'
26+
ext.webkitVersion = '1.8.0'
2727

2828
ext.slf4jVersion = '1.7.36'
2929
ext.volleyVersion = '1.2.1'
@@ -33,7 +33,7 @@ buildscript {
3333

3434
ext.androidBuildVersionTools = '34.0.0'
3535

36-
ext.androidMinSdk = 19
36+
ext.androidMinSdk = 14
3737
ext.androidTargetSdk = 29
3838
ext.androidCompileSdk = 34
3939

play-services-core/src/main/java/org/microg/gms/auth/AccountContentProvider.java

+4
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ public Bundle call(String method, String arg, Bundle extras) {
7676
Account[] accounts = null;
7777
if (arg != null && (arg.equals(DEFAULT_ACCOUNT_TYPE) || arg.startsWith(DEFAULT_ACCOUNT_TYPE + "."))) {
7878
AccountManager am = AccountManager.get(getContext());
79+
if (SDK_INT >= 18) {
7980
accounts = am.getAccountsByTypeForPackage(arg, packageName);
81+
} else {
82+
accounts = am.getAccountsByType(arg);
83+
}
8084
if (SDK_INT >= 26 && accounts != null && arg.equals(DEFAULT_ACCOUNT_TYPE)) {
8185
for (Account account : accounts) {
8286
if (am.getAccountVisibility(account, packageName) == AccountManager.VISIBILITY_UNDEFINED &&

play-services-location/core/src/main/kotlin/org/microg/gms/location/settings/DetailedLocationSettingsStates.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fun Context.getDetailedLocationSettingsStates(): DetailedLocationSettingsStates
5151
val bluetoothLeSystemFeature = packageManager.hasSystemFeature(FEATURE_BLUETOOTH_LE)
5252
val locationManager = getSystemService<LocationManager>()
5353
val bluetoothManager = if (bluetoothLeSystemFeature) getSystemService<BluetoothManager>() else null
54-
val bleAdapter = bluetoothManager?.adapter
54+
val bleAdapter = if (SDK_INT >= 18) bluetoothManager?.adapter else null
5555

5656
return DetailedLocationSettingsStates(
5757
gpsSystemFeature = packageManager.hasSystemFeature(FEATURE_LOCATION_GPS),
@@ -66,7 +66,7 @@ fun Context.getDetailedLocationSettingsStates(): DetailedLocationSettingsStates
6666
packageManager.checkPermission(ACCESS_BACKGROUND_LOCATION, packageName) == PERMISSION_GRANTED,
6767
blePresent = bleAdapter != null,
6868
bleEnabled = bleAdapter?.isEnabled == true,
69-
bleScanAlways = Settings.Global.getInt(contentResolver, "ble_scan_always_enabled", 0) == 1,
70-
airplaneMode = Settings.Global.getInt(contentResolver, Settings.Global.AIRPLANE_MODE_ON, 0) != 0
69+
bleScanAlways = if (SDK_INT >= 17) Settings.Global.getInt(contentResolver, "ble_scan_always_enabled", 0) == 1 else false,
70+
airplaneMode = if (SDK_INT >= 17) Settings.Global.getInt(contentResolver, Settings.Global.AIRPLANE_MODE_ON, 0) != 0 else Settings.System.getInt(contentResolver, Settings.System.AIRPLANE_MODE_ON, 0) != 0
7171
)
7272
}

play-services-location/core/src/main/res/layout/activity_location_setting_checker.xml

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
android:layout_width="match_parent"
3333
android:layout_height="wrap_content"
3434
android:layout_marginVertical="8dp"
35+
android:layout_marginLeft="30dp"
3536
android:layout_marginStart="30dp"
3637
android:text="@string/location_settings_dialog_message_location_services_gps_and_nlp"
3738
android:textColor="#e4e1e5"
@@ -44,6 +45,7 @@
4445
android:layout_width="match_parent"
4546
android:layout_height="wrap_content"
4647
android:layout_marginVertical="8dp"
48+
android:layout_marginLeft="30dp"
4749
android:layout_marginStart="30dp"
4850
android:text="@string/location_settings_dialog_message_gls_consent"
4951
android:textColor="#e4e1e5"
@@ -67,6 +69,7 @@
6769
android:layout_width="match_parent"
6870
android:layout_height="wrap_content"
6971
android:layout_marginTop="30dp"
72+
android:layout_marginRight="10dp"
7073
android:layout_marginEnd="10dp"
7174
android:layout_marginBottom="24dp"
7275
android:gravity="right"

0 commit comments

Comments
 (0)