Skip to content
Open
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 @@ -20,8 +20,7 @@ class TestFontScaleConfigurationUtilActivity : InjectableAutoLocalizedAppCompatA
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
(activityComponent as ActivityComponentImpl).inject(this)
@Suppress("DEPRECATION") // TODO(#5405): Ensure the correct type is being retrieved.
val readingTextSize = checkNotNull(
Comment on lines -23 to -24

@adhiamboperes adhiamboperes Apr 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The supress annotation is removed but no change haas been made, why?

val readingTextSize = checkNotNull(
intent.getProtoExtra(
TEST_FONT_SCALE_CONFIGURATION_UTIL_ACTIVITY_PARAMS_KEY,
TestFontScaleConfigurationUtilActivityParams.getDefaultInstance()
Expand Down
29 changes: 15 additions & 14 deletions third_party/maven_install.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
"__INPUT_ARTIFACTS_HASH": 848297255,
"__RESOLVED_ARTIFACTS_HASH": 733469183,
"__INPUT_ARTIFACTS_HASH": -1738401753,
"__RESOLVED_ARTIFACTS_HASH": 223568274,
"conflict_resolution": {
"androidx.annotation:annotation:1.1.0": "androidx.annotation:annotation:1.2.0",
"androidx.constraintlayout:constraintlayout:1.1.3": "androidx.constraintlayout:constraintlayout:2.0.1",
"androidx.core:core-ktx:1.0.1": "androidx.core:core-ktx:1.1.0",
"androidx.core:core:1.0.1": "androidx.core:core:1.7.0",
"androidx.fragment:fragment:1.1.0": "androidx.fragment:fragment:1.3.6",
"androidx.lifecycle:lifecycle-livedata-core:2.2.0": "androidx.lifecycle:lifecycle-livedata-core:2.3.1",
"androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0": "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1",
Expand Down Expand Up @@ -48,9 +46,9 @@
},
"androidx.annotation:annotation-experimental:aar": {
"shasums": {
"jar": "0157de61a2064047896a058080f3fd67ba57ad9a94857b3f7a363660243e3f90"
"jar": "abfd29c8556e5bd0325a9f769ab9e9d154ff4a5515c476cdd5a2a8285b1b19dc"
},
"version": "1.1.0"
"version": "1.3.0"
},
"androidx.appcompat:appcompat-resources:aar": {
"shasums": {
Expand Down Expand Up @@ -246,15 +244,15 @@
},
"androidx.core:core-ktx:aar": {
"shasums": {
"jar": "070cc5f8864f449128a2f4b25ca5b67aa3adca3ee1bd611e2eaf1a18fad83178"
"jar": "1542a1df7be908c95fee91b8dbc03fd974f53f11d84a85d881f95a52551c4051"
},
"version": "1.1.0"
"version": "1.9.0"
},
"androidx.core:core:aar": {
"shasums": {
"jar": "aaf6734226fff923784f92f65d78a2984dbf17534138855c5ce2038f18656e0b"
"jar": "8bda3ee3a88887d54f6679fb6b6cd788629f73234ac91c8bbed924e721ec85b8"
},
"version": "1.7.0"
"version": "1.9.0"
},
"androidx.cursoradapter:cursoradapter:aar": {
"shasums": {
Expand Down Expand Up @@ -1734,15 +1732,15 @@
},
"org.jetbrains.kotlin:kotlin-stdlib": {
"shasums": {
"jar": "739c526672bb337573b28f63afa8306eb088b0c3a0967f56d6c89f4a3012a492"
"jar": "e771fe74250a943e8f6346713201ff1d8cb95c3a5d1a91a22b65a9e04f6a8901"
},
"version": "1.6.21"
"version": "1.7.10"
},
"org.jetbrains.kotlin:kotlin-stdlib-common": {
"shasums": {
"jar": "183bec59cd9f3a14957b190e8c879cf1194bd1f106b0a7b6e1cbb8790d242363"
"jar": "19f102efe9629f8eabc63853ad15c533e47c47f91fca09285c5bde86e59f91d4"
},
"version": "1.6.21"
"version": "1.7.10"
},
"org.jetbrains.kotlin:kotlin-stdlib-jdk7": {
"shasums": {
Expand Down Expand Up @@ -2018,6 +2016,9 @@
"androidx.tracing:tracing:aar",
"org.jetbrains.kotlin:kotlin-stdlib"
],
"androidx.annotation:annotation-experimental:aar": [
"org.jetbrains.kotlin:kotlin-stdlib"
],
"androidx.appcompat:appcompat-resources:aar": [
"androidx.annotation:annotation",
"androidx.collection:collection",
Expand Down
4 changes: 2 additions & 2 deletions third_party/versions.bzl
Comment thread
adhiamboperes marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = {
"androidx.compose.runtime:runtime-livedata": "1.1.1",
"androidx.compose.ui:ui": "1.1.1",
"androidx.constraintlayout:constraintlayout": "1.1.3",
"androidx.core:core": "1.0.1",
"androidx.core:core-ktx": "1.0.1",
"androidx.core:core": "1.9.0",
Comment thread
adhiamboperes marked this conversation as resolved.
"androidx.core:core-ktx": "1.9.0",
"androidx.databinding:databinding-adapters": "3.4.2",
"androidx.databinding:databinding-common": "3.4.2",
"androidx.databinding:databinding-compiler": "3.4.2",
Expand Down

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file has removed some spaces, and I am not sure why.

Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
"""
General purposes utilities to manage extensions
"""

load("@io_bazel_rules_kotlin//kotlin:android.bzl", "kt_android_library")

kt_android_library(
name = "bundle_extensions",
srcs = [
"BundleExtensions.kt",
],
visibility = ["//:oppia_api_visibility"],
deps = [
"//third_party:androidx_core_core",
"//third_party:com_google_protobuf_protobuf-javalite",
],
)

kt_android_library(
name = "context_extensions",
srcs = [
Expand All @@ -25,15 +23,13 @@ kt_android_library(
"//third_party:com_google_protobuf_protobuf-javalite",
],
)

kt_android_library(
name = "string_extensions",
srcs = [
"StringExtensions.kt",
],
visibility = ["//:oppia_api_visibility"],
)

kt_android_library(
name = "iterable_extensions",
srcs = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.oppia.android.util.extensions

import android.annotation.TargetApi
import android.content.Intent
import android.os.Build
import android.os.Bundle
import androidx.core.os.BundleCompat
import com.google.protobuf.ByteString
import com.google.protobuf.InvalidProtocolBufferException
import com.google.protobuf.MessageLite
Expand Down Expand Up @@ -72,17 +71,6 @@ fun <T : MessageLite> Intent.getProtoExtra(name: String, defaultValue: T): T {
*/
fun Bundle.getStringFromBundle(key: String): String? = getString(key)

// TODO(#5405): Migrate this to BundleCompat.
private inline fun <reified T : Serializable> Bundle.getTypedSerializable(name: String): T? {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
getSerializableAboveApi32(name, T::class.java)
} else getSerializableBelowApi33(name)
}

@TargetApi(Build.VERSION_CODES.TIRAMISU)
private fun <T : Serializable> Bundle.getSerializableAboveApi32(name: String, type: Class<T>): T? =
getSerializable(name, type)
private inline fun <reified T : Serializable> Bundle.getTypedSerializable(name: String): T? =
BundleCompat.getSerializable(this, name, T::class.java)

@Suppress("DEPRECATION") // This is needed for old devices. New devices use the new API per above.
private inline fun <reified T : Serializable> Bundle.getSerializableBelowApi33(name: String): T? =
getSerializable(name) as? T
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ class BundleExtensionsTest {

assertThat(intent).extras().hasSize(1)
assertThat(intent).extras().containsKey("first_extra")
// TODO(#5405): Convert this to getSerializableExtra once Robolectric can be updated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any changes supporting the removal of this TODO, unless I am missing something.

assertThat(intent.getStringExtra("first_extra")).isNull()
}

Expand Down
Loading