mirror of https://github.com/nextcloud/android
Drop Android 5.0 support
Resolves #8508 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
2dd46ea967
commit
4fd407bc11
|
@ -1,3 +1,12 @@
|
|||
## 3.17.0 (-, -, -)
|
||||
|
||||
- New upload manager @ezaquarii
|
||||
- UI improvements
|
||||
|
||||
Minimum: NC 16 Server, Android 5.0 Lollipop
|
||||
|
||||
For a full list, please see https://github.com/nextcloud/android/milestone/59
|
||||
|
||||
## 3.16.1 (June, 01, 2021)
|
||||
|
||||
- Fix media tab not showing images/videos
|
||||
|
|
|
@ -126,7 +126,7 @@ android {
|
|||
compileSdkVersion 29
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 29
|
||||
|
||||
// arguments to be passed to functional tests
|
||||
|
|
|
@ -34,8 +34,4 @@ class DeviceInfo {
|
|||
fun hasCamera(context: Context): Boolean {
|
||||
return context.packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY)
|
||||
}
|
||||
|
||||
fun editorSupported(): Boolean {
|
||||
return apiLevel < Build.VERSION_CODES.LOLLIPOP
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,12 +60,7 @@ internal class PowerManagementServiceImpl(
|
|||
return false
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
if (deviceInfo.apiLevel >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
return platformPowerManager.isPowerSaveMode
|
||||
}
|
||||
// For older versions, we just say that device is not in power save mode
|
||||
return false
|
||||
return platformPowerManager.isPowerSaveMode
|
||||
}
|
||||
|
||||
override val isPowerSavingExclusionAvailable: Boolean
|
||||
|
@ -80,8 +75,7 @@ internal class PowerManagementServiceImpl(
|
|||
when {
|
||||
plugged == BatteryManager.BATTERY_PLUGGED_USB -> true
|
||||
plugged == BatteryManager.BATTERY_PLUGGED_AC -> true
|
||||
deviceInfo.apiLevel >= Build.VERSION_CODES.JELLY_BEAN_MR1 &&
|
||||
plugged == BatteryManager.BATTERY_PLUGGED_WIRELESS -> true
|
||||
plugged == BatteryManager.BATTERY_PLUGGED_WIRELESS -> true
|
||||
else -> false
|
||||
}
|
||||
} ?: false
|
||||
|
|
|
@ -282,7 +282,7 @@ public class FileMenuFilter {
|
|||
List<Integer> toHide,
|
||||
OCCapability capability
|
||||
) {
|
||||
if (deviceInfo.editorSupported() || files.iterator().next().isEncrypted()) {
|
||||
if (files.iterator().next().isEncrypted()) {
|
||||
toHide.add(R.id.action_edit);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -34,14 +34,13 @@ import com.owncloud.android.files.FileMenuFilter
|
|||
import com.owncloud.android.ui.asynctasks.TextEditorLoadUrlTask
|
||||
import javax.inject.Inject
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
class TextEditorWebView : EditorWebView() {
|
||||
@Inject
|
||||
lateinit var appInfo: AppInfo
|
||||
@Inject
|
||||
lateinit var deviceInfo: DeviceInfo
|
||||
|
||||
@SuppressLint("AddJavascriptInterface") // suppress warning as webview is only used >= Lollipop
|
||||
@SuppressLint("AddJavascriptInterface") // suppress warning as webview is only used > Lollipop
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
|
|
|
@ -83,9 +83,9 @@ class TestPowerManagementService {
|
|||
@Test
|
||||
fun `power saving queries power manager on API 21+`() {
|
||||
// GIVEN
|
||||
// API level >= 21
|
||||
// API level >= 22 (since 22+ is supported)
|
||||
// power save mode is on
|
||||
whenever(deviceInfo.apiLevel).thenReturn(Build.VERSION_CODES.LOLLIPOP)
|
||||
whenever(deviceInfo.apiLevel).thenReturn(Build.VERSION_CODES.LOLLIPOP_MR1)
|
||||
whenever(platformPowerManager.isPowerSaveMode).thenReturn(true)
|
||||
|
||||
// WHEN
|
||||
|
@ -97,22 +97,6 @@ class TestPowerManagementService {
|
|||
verify(platformPowerManager).isPowerSaveMode
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `power saving is not available below API 21`() {
|
||||
// GIVEN
|
||||
// API level <21
|
||||
whenever(deviceInfo.apiLevel).thenReturn(Build.VERSION_CODES.KITKAT)
|
||||
|
||||
// WHEN
|
||||
// power save mode is checked
|
||||
|
||||
// THEN
|
||||
// power save mode is disabled
|
||||
// power manager is not queried
|
||||
assertFalse(powerManagementService.isPowerSavingEnabled)
|
||||
verify(platformPowerManager, never()).isPowerSaveMode
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `power saving exclusion is available for flagged vendors`() {
|
||||
for (vendor in PowerManagementServiceImpl.OVERLY_AGGRESSIVE_POWER_SAVING_VENDORS) {
|
||||
|
|
Loading…
Reference in New Issue