Skip to content
Draft
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
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="org.oppia.android">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AppAndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.ui">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/DatabindingAdaptersManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.databinding.adapters">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/DatabindingResourcesManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.databinding">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/RecyclerviewAdaptersManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.recyclerview.adapters">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/ViewModelManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.vm">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/ViewModelsManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.view.models">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/ViewsManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.views">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ class AudioViewModel @Inject constructor(

if (languageCodeForDataSource != null) {
// TODO(#3791): Remove this dependency.
val locale = Locale(languageCodeForDataSource)
val locale = Locale.Builder()
.setLanguage(languageCodeForDataSource)
.build()
selectedLanguageName.set(locale.getDisplayLanguage(locale))

audioPlayerController.changeDataSource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ class AppLanguageResourceHandler @Inject constructor(

private fun getLocalizedDisplayName(languageCode: String, regionCode: String = ""): String {
// TODO(#3791): Remove this dependency.
val locale = Locale(languageCode, regionCode)
val locale = Locale.Builder()
.setLanguage(languageCode)
.setRegion(regionCode)
.build()
Comment on lines +191 to +194
return locale.getDisplayLanguage(locale).replaceFirstChar {
if (it.isLowerCase()) it.titlecase(locale) else it.toString()
}
Expand Down
8 changes: 4 additions & 4 deletions build_flavors.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ _FLAVOR_METADATA = {
"dev": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 35,
"target_sdk_version": 36,
"multidex": "native",
"proguard_specs": [], # Developer builds are not optimized.
"production_release": False,
Expand All @@ -51,7 +51,7 @@ _FLAVOR_METADATA = {
"alpha": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 35,
"target_sdk_version": 36,
"multidex": "native",
"proguard_specs": _PRODUCTION_PROGUARD_SPECS,
"production_release": True,
Expand All @@ -66,7 +66,7 @@ _FLAVOR_METADATA = {
"beta": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 35,
"target_sdk_version": 36,
"multidex": "native",
"proguard_specs": _PRODUCTION_PROGUARD_SPECS,
"production_release": True,
Expand All @@ -81,7 +81,7 @@ _FLAVOR_METADATA = {
"ga": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 35,
"target_sdk_version": 36,
"multidex": "native",
"proguard_specs": _PRODUCTION_PROGUARD_SPECS,
"production_release": True,
Expand Down
4 changes: 2 additions & 2 deletions build_vars.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
BUILD_SDK_VERSION = 35
BUILD_TOOLS_VERSION = "34.0.0"
BUILD_SDK_VERSION = 36
BUILD_TOOLS_VERSION = "36.0.0"
KOTLIN_COMPILER_VERSION = "1.6.10"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.config">

<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="36" />
</manifest>
2 changes: 1 addition & 1 deletion data/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<!-- TODO(#6010): Remove this manifest. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.data">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="36" />
</manifest>
2 changes: 1 addition & 1 deletion domain/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.domain">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="36" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LintModelCreator(
// Build configurations for Android app layer configuration
private const val PACKAGE_PREFIX = "org.oppia.android"
private const val MIN_SDK_VERSION = "21"
private const val TARGET_SDK_VERSION = "35"
private const val TARGET_SDK_VERSION = "36"

// Model directories are stable and won't change frequently therefore a longer TTL
private const val MODEL_CACHE_TTL_HOURS = 24L // 24 hours
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class AndroidBuildSdkPropertiesTest {
fun testBuildSdkVersion_isTheCorrectSdkVersion() {
val properties = AndroidBuildSdkProperties()

assertThat(properties.buildSdkVersion).isEqualTo(35)
assertThat(properties.buildSdkVersion).isEqualTo(36)
}

@Test
fun testBuildToolsVersion_isTheCorrectVersion() {
val properties = AndroidBuildSdkProperties()

assertThat(properties.buildToolsVersion).isEqualTo("34.0.0")
assertThat(properties.buildToolsVersion).isEqualTo("36.0.0")
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class AndroidLintRunnerTest {
companion object {
private const val JAVA_VERSION = "11.0.6"
private const val MIN_SDK_VERSION = "21"
private const val TARGET_SDK_VERSION = "35"
private const val TARGET_SDK_VERSION = "36"
}

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class LintModelCreatorTest {
assertThat(content).contains("<variant")
assertThat(content).contains("name=\"main\"")
assertThat(content).contains("minSdkVersion=\"21\"")
assertThat(content).contains("targetSdkVersion=\"35\"")
assertThat(content).contains("targetSdkVersion=\"36\"")
assertThat(content).contains("debuggable=\"true\"")
assertThat(content).contains("package=\"org.oppia.android.app\"")
assertThat(content).contains("<buildFeatures")
Expand Down
2 changes: 1 addition & 1 deletion testing/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.testing">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />

<application>
<activity android:name=".TextInputActionTestActivity"></activity>
Expand Down
2 changes: 1 addition & 1 deletion utility/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.util">
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="35" />
android:targetSdkVersion="36" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ class AccessibilityServiceImpl @Inject constructor(
return accessibilityManager.isEnabled
}

// TODO : Replace deprecated View.announceForAccessibility() with a direct
// AccessibilityManager.sendAccessibilityEvent(TYPE_ANNOUNCEMENT) call.
// Suppressed temporarily to unblock the Android 16 (SDK 36) target upgrade.
Comment on lines +20 to +22

@Suppress("DEPRECATION")
override fun announceForAccessibilityForView(view: View, text: CharSequence) {
view.announceForAccessibility(text)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ sealed class AndroidLocaleProfile {
}
}

override fun computeAndroidLocale(): Locale = Locale(languageCode, regionCode)
override fun computeAndroidLocale(): Locale =
Locale.Builder()
.setLanguage(languageCode)
.setRegion(regionCode)
.build()
Comment on lines +59 to +63
}

/**
Expand All @@ -73,7 +77,10 @@ sealed class AndroidLocaleProfile {
override fun matches(otherProfile: AndroidLocaleProfile): Boolean =
otherProfile is RegionOnlyProfile && regionCode == otherProfile.regionCode

override fun computeAndroidLocale(): Locale = Locale(/* language = */ "", regionCode)
override fun computeAndroidLocale(): Locale =
Locale.Builder()
.setRegion(regionCode)
.build()
}

/**
Expand All @@ -95,7 +102,10 @@ sealed class AndroidLocaleProfile {
}
}

override fun computeAndroidLocale(): Locale = Locale(languageCode)
override fun computeAndroidLocale(): Locale =
Locale.Builder()
.setLanguage(languageCode)
.build()
}

/**
Expand All @@ -119,7 +129,10 @@ sealed class AndroidLocaleProfile {
}
}

override fun computeAndroidLocale(): Locale = Locale(languageCode)
override fun computeAndroidLocale(): Locale =
Locale.Builder()
.setLanguage(languageCode)
.build()
}

/**
Expand Down
Loading