Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void computePlatformResolvedLocale_fromAndroidN() {
// Tests the legacy pre API 24 algorithm.
@Test
@Config(
minSdk = Build.VERSION_CODES.JELLY_BEAN,
minSdk = Build.VERSION_CODES.KITKAT,
maxSdk = Build.VERSION_CODES.M,
qualifiers = "es-rMX")
public void computePlatformResolvedLocale_emptySupportedLocales_beforeAndroidN() {
Expand All @@ -252,7 +252,7 @@ public void computePlatformResolvedLocale_emptySupportedLocales_beforeAndroidN()
}

@Test
@Config(minSdk = Build.VERSION_CODES.JELLY_BEAN, maxSdk = Build.VERSION_CODES.M, qualifiers = "")
@Config(minSdk = Build.VERSION_CODES.KITKAT, maxSdk = Build.VERSION_CODES.M, qualifiers = "")
public void computePlatformResolvedLocale_selectFirstLocaleWhenNoUserSetting_beforeAndroidN() {
FlutterJNI flutterJNI = new FlutterJNI();
DartExecutor dartExecutor = mock(DartExecutor.class);
Expand All @@ -273,7 +273,7 @@ public void computePlatformResolvedLocale_selectFirstLocaleWhenNoUserSetting_bef

@Test
@Config(
minSdk = Build.VERSION_CODES.JELLY_BEAN,
minSdk = Build.VERSION_CODES.KITKAT,
maxSdk = Build.VERSION_CODES.M,
qualifiers = "fr-rCH")
public void computePlatformResolvedLocale_selectFirstLocaleWhenNoExactMatch_beforeAndroidN() {
Expand All @@ -299,7 +299,7 @@ public void computePlatformResolvedLocale_selectFirstLocaleWhenNoExactMatch_befo

@Test
@Config(
minSdk = Build.VERSION_CODES.JELLY_BEAN,
minSdk = Build.VERSION_CODES.KITKAT,
maxSdk = Build.VERSION_CODES.M,
qualifiers = "it-rIT")
public void computePlatformResolvedLocale_selectExactMatchLocale_beforeAndroidN() {
Expand All @@ -325,7 +325,7 @@ public void computePlatformResolvedLocale_selectExactMatchLocale_beforeAndroidN(

@Test
@Config(
minSdk = Build.VERSION_CODES.JELLY_BEAN,
minSdk = Build.VERSION_CODES.KITKAT,
maxSdk = Build.VERSION_CODES.M,
qualifiers = "fr-rCH")
public void computePlatformResolvedLocale_selectOnlyLanguageLocale_beforeAndroidN() {
Expand All @@ -351,35 +351,35 @@ public void computePlatformResolvedLocale_selectOnlyLanguageLocale_beforeAndroid
}

// Tests the legacy pre API 21 algorithm.
@Config(sdk = 16)
@Config(sdk = 19)
@Test
public void localeFromString_languageOnly() {
Locale locale = LocalizationPlugin.localeFromString("en");
assertEquals(locale, new Locale("en"));
}

@Config(sdk = 16)
@Config(sdk = 19)
@Test
public void localeFromString_languageAndCountry() {
Locale locale = LocalizationPlugin.localeFromString("en-US");
assertEquals(locale, new Locale("en", "US"));
}

@Config(sdk = 16)
@Config(sdk = 19)
@Test
public void localeFromString_languageCountryAndVariant() {
Locale locale = LocalizationPlugin.localeFromString("zh-Hans-CN");
assertEquals(locale, new Locale("zh", "CN", "Hans"));
}

@Config(sdk = 16)
@Config(sdk = 19)
@Test
public void localeFromString_underscore() {
Locale locale = LocalizationPlugin.localeFromString("zh_Hans_CN");
assertEquals(locale, new Locale("zh", "CN", "Hans"));
}

@Config(sdk = 16)
@Config(sdk = 19)
@Test
public void localeFromString_additionalVariantsAreIgnored() {
Locale locale = LocalizationPlugin.localeFromString("de-DE-u-co-phonebk");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
public class PlatformPluginTest {
private final Context ctx = ApplicationProvider.getApplicationContext();

@Config(sdk = 16)
@Config(sdk = 19)
@Test
public void itIgnoresNewHapticEventsOnOldAndroidPlatforms() {
View fakeDecorView = mock(View.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package io.flutter.plugin.platform;

import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import static android.os.Build.VERSION_CODES.P;
import static android.os.Build.VERSION_CODES.R;
import static org.junit.Assert.assertEquals;
Expand All @@ -28,7 +27,7 @@
@TargetApi(P)
public class SingleViewPresentationTest {
@Test
@Config(minSdk = JELLY_BEAN_MR1, maxSdk = R)
@Config(minSdk = KITKAT, maxSdk = R)
public void returnsOuterContextInputMethodManager() {
// There's a bug in Android Q caused by the IMM being instanced per display.
// https://github.com/flutter/flutter/issues/38375. We need the context returned by
Expand Down Expand Up @@ -59,7 +58,7 @@ public void returnsOuterContextInputMethodManager() {
}

@Test
@Config(minSdk = JELLY_BEAN_MR1, maxSdk = R)
@Config(minSdk = KITKAT, maxSdk = R)
public void returnsOuterContextInputMethodManager_createDisplayContext() {
// The IMM should also persist across display contexts created from the base context.

Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/test_runner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
compileSdkVersion 33

defaultConfig {
minSdkVersion 16
minSdkVersion 19
}

compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion testing/android_background_image/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
}
defaultConfig {
applicationId 'dev.flutter.android_background_image'
minSdkVersion 16
minSdkVersion 19
targetSdkVersion 33
versionCode 1
versionName '1.0'
Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
}
defaultConfig {
applicationId 'dev.flutter.scenarios'
minSdkVersion 18
minSdkVersion 19
targetSdkVersion 33
versionCode 1
versionName '1.0'
Expand Down