Skip to content

Commit

Permalink
sync with develop and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
adhiamboperes committed Dec 11, 2023
2 parents ec0eded + c931ba4 commit 0f6c4b9
Show file tree
Hide file tree
Showing 101 changed files with 1,310 additions and 814 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ runs:
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "platform-tools"
shell: bash

- name: Install SDK 31
- name: Install SDK 33
run: |
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "platforms;android-31"
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "platforms;android-33"
shell: bash

- name: Install build tools 29.0.2
Expand Down
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ package_group(
"flavor": "oppia",
"min_sdk_version": 21,
"multidex": "native",
"target_sdk_version": 31,
"target_sdk_version": 33,
},
{
"flavor": "oppia_kitkat",
"main_dex_list": "//:config/kitkat_main_dex_class_list.txt",
"min_sdk_version": 19,
"multidex": "manual_main_dex",
"target_sdk_version": 31,
"target_sdk_version": 33,
},
]
]
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ load("//third_party:versions.bzl", "HTTP_DEPENDENCY_VERSIONS", "get_maven_depend
# TODO(#1542): Sync Android SDK version with the manifest.
android_sdk_repository(
name = "androidsdk",
api_level = 31,
api_level = 33,
build_tools_version = "29.0.2",
)

Expand Down Expand Up @@ -125,9 +125,9 @@ git_repository(
# to correctly size in-line SVGs (such as those needed for LaTeX-based math expressions).
git_repository(
name = "androidsvg",
commit = "1265eb1087056cf3fc2e10442e5545bc65c109ce",
commit = "5bc9c7553e94c3476e8ea32baea3c77567228fcd",
remote = "https://github.com/oppia/androidsvg",
shallow_since = "1686302944 -0700",
shallow_since = "1686304726 -0700",
)

git_repository(
Expand Down
1 change: 1 addition & 0 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ kt_android_library(
"//third_party:androidx_core_core-ktx",
"//third_party:androidx_databinding_databinding-common",
"//third_party:androidx_databinding_databinding-runtime",
"//third_party:androidx_fragment_fragment",
"//third_party:circularimageview_circular_image_view",
"//utility/src/main/java/org/oppia/android/util/accessibility",
"//utility/src/main/java/org/oppia/android/util/parser/html:html_parser",
Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 31
compileSdkVersion 33
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "org.oppia.android"
minSdkVersion 19
targetSdkVersion 31
targetSdkVersion 33
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand All @@ -23,6 +23,7 @@ android {
includeCompileClasspath true
}
}
vectorDrawables { useSupportLibrary true }
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
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="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="33" />
</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="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="33" />
</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="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="33" />
</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="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="33" />
</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="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="33" />
</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="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="33" />
</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="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="33" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class AdministratorControlsActivityPresenter @Inject constructor(
.findFragmentById(
R.id.administrator_controls_activity_fragment_navigation_drawer
) as NavigationDrawerFragment
navigationDrawerFragment.setUpDrawer(
navigationDrawerFragment.initializeDrawer(
binding.administratorControlsActivityDrawerLayout,
toolbar, /* menuItemId= */ 0
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import org.oppia.android.app.utility.lifecycle.LifecycleSafeTimerFactory
import org.oppia.android.app.view.ViewComponentFactory
import org.oppia.android.app.view.ViewComponentImpl
import org.oppia.android.domain.oppialogger.OppiaLogger
import org.oppia.android.util.platformparameter.EnableContinueButtonAnimation
import org.oppia.android.util.platformparameter.PlatformParameterValue
import org.oppia.android.util.system.OppiaClock
import javax.inject.Inject

Expand All @@ -25,12 +23,14 @@ class ContinueButtonView @JvmOverloads constructor(
defStyleAttr: Int = R.style.StateButtonActive
) : androidx.appcompat.widget.AppCompatButton(context, attrs, defStyleAttr) {

@field:[Inject EnableContinueButtonAnimation]
lateinit var enableContinueButtonAnimation: PlatformParameterValue<Boolean>
@Inject lateinit var fragment: Fragment
@Inject lateinit var oppiaClock: OppiaClock
@Inject lateinit var lifecycleSafeTimerFactory: LifecycleSafeTimerFactory
@Inject lateinit var oppiaLogger: OppiaLogger
@Inject
lateinit var fragment: Fragment
@Inject
lateinit var oppiaClock: OppiaClock
@Inject
lateinit var lifecycleSafeTimerFactory: LifecycleSafeTimerFactory
@Inject
lateinit var oppiaLogger: OppiaLogger

private var shouldAnimateContinueButtonLateinit: Boolean? = null
private val shouldAnimateContinueButton: Boolean
Expand Down Expand Up @@ -119,13 +119,11 @@ class ContinueButtonView @JvmOverloads constructor(

private fun startAnimating() {
val animation = AnimationUtils.loadAnimation(context, R.anim.wobble_button_animation)
if (enableContinueButtonAnimation.value) {
startAnimation(animation)
// Repeat the animation after a fixed interval.
lifecycleSafeTimerFactory.createTimer(INTERVAL_BETWEEN_CONTINUE_BUTTON_ANIM_MS)
.observe(fragment) {
startAnimating()
}
}
startAnimation(animation)
// Repeat the animation after a fixed interval.
lifecycleSafeTimerFactory.createTimer(INTERVAL_BETWEEN_CONTINUE_BUTTON_ANIM_MS)
.observe(fragment) {
startAnimating()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import android.view.KeyEvent.ACTION_UP
import android.view.KeyEvent.KEYCODE_BACK
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.EditText
import androidx.appcompat.widget.AppCompatEditText
import org.oppia.android.app.player.state.listener.StateKeyboardButtonListener
import org.oppia.android.app.utility.KeyboardHelper.Companion.hideSoftKeyboard
import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard
Expand All @@ -22,12 +22,12 @@ import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard

// TODO(#4135): Add a dedicated test suite for this class.

/** The custom EditText class for fraction input interaction view. */
/** The custom [AppCompatEditText] class for fraction input interaction view. */
class FractionInputInteractionView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = android.R.attr.editTextStyle
) : EditText(context, attrs, defStyle), View.OnFocusChangeListener {
) : AppCompatEditText(context, attrs, defStyle), View.OnFocusChangeListener {
private var hintText: CharSequence = ""
private val stateKeyboardButtonListener: StateKeyboardButtonListener

Expand Down Expand Up @@ -71,7 +71,7 @@ class FractionInputInteractionView @JvmOverloads constructor(

private fun restoreHint() {
hint = hintText
if (text.isEmpty()) setTypeface(typeface, Typeface.ITALIC)
if (text?.isEmpty() == true) setTypeface(typeface, Typeface.ITALIC)
setSingleLine(false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.util.AttributeSet
import android.view.KeyEvent
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.EditText
import androidx.appcompat.widget.AppCompatEditText
import org.oppia.android.app.player.state.listener.StateKeyboardButtonListener
import org.oppia.android.app.utility.KeyboardHelper.Companion.hideSoftKeyboard
import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard
Expand All @@ -19,7 +19,7 @@ import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard
// maxLength="200".

/**
* The custom [EditText] class for math expression interactions interaction view.
* The custom [AppCompatEditText] class for math expression interactions interaction view.
*
* Note that the hint should be set via [setPlaceholder] to ensure that it's properly initialized if
* using databinding, otherwise setting the hint through android:hint should work fine.
Expand All @@ -28,7 +28,7 @@ class MathExpressionInteractionsView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = android.R.attr.editTextStyle
) : EditText(context, attrs, defStyle), View.OnFocusChangeListener {
) : AppCompatEditText(context, attrs, defStyle), View.OnFocusChangeListener {
private var hintText: CharSequence = ""
private val stateKeyboardButtonListener: StateKeyboardButtonListener

Expand Down Expand Up @@ -84,7 +84,7 @@ class MathExpressionInteractionsView @JvmOverloads constructor(

private fun restoreHint() {
hint = hintText
if (text.isEmpty()) setTypeface(typeface, Typeface.ITALIC)
if (text?.isEmpty() == true) setTypeface(typeface, Typeface.ITALIC)
setSingleLine(false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import android.view.KeyEvent.ACTION_UP
import android.view.KeyEvent.KEYCODE_BACK
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.EditText
import androidx.appcompat.widget.AppCompatEditText
import org.oppia.android.app.player.state.listener.StateKeyboardButtonListener
import org.oppia.android.app.utility.KeyboardHelper.Companion.hideSoftKeyboard
import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard
Expand All @@ -20,12 +20,12 @@ import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard
// background="@drawable/edit_text_background"
// maxLength="200".

/** The custom EditText class for numeric input interaction view. */
/** The custom [AppCompatEditText] class for numeric input interaction view. */
class NumericInputInteractionView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = android.R.attr.editTextStyle
) : EditText(context, attrs, defStyle), View.OnFocusChangeListener {
) : AppCompatEditText(context, attrs, defStyle), View.OnFocusChangeListener {
private val stateKeyboardButtonListener: StateKeyboardButtonListener
private var hintText: CharSequence = ""

Expand Down Expand Up @@ -69,7 +69,7 @@ class NumericInputInteractionView @JvmOverloads constructor(

private fun restoreHint() {
hint = hintText
if (text.isEmpty()) setTypeface(typeface, Typeface.ITALIC)
if (text?.isEmpty() == true) setTypeface(typeface, Typeface.ITALIC)
setSingleLine(false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import android.util.AttributeSet
import android.view.KeyEvent
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.EditText
import androidx.appcompat.widget.AppCompatEditText
import org.oppia.android.app.player.state.listener.StateKeyboardButtonListener
import org.oppia.android.app.utility.KeyboardHelper

/** The custom EditText class for ratio input interaction view. */
/** The custom [AppCompatEditText] class for ratio input interaction view. */
class RatioInputInteractionView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = android.R.attr.editTextStyle
) : EditText(context, attrs, defStyle), View.OnFocusChangeListener {
) : AppCompatEditText(context, attrs, defStyle), View.OnFocusChangeListener {
private var hintText: CharSequence = ""
private val stateKeyboardButtonListener: StateKeyboardButtonListener

Expand Down Expand Up @@ -59,7 +59,7 @@ class RatioInputInteractionView @JvmOverloads constructor(

private fun restoreHint() {
hint = hintText
if (text.isEmpty()) setTypeface(typeface, Typeface.ITALIC)
if (text?.isEmpty() == true) setTypeface(typeface, Typeface.ITALIC)
setSingleLine(false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.util.AttributeSet
import android.view.KeyEvent
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.EditText
import androidx.appcompat.widget.AppCompatEditText
import org.oppia.android.app.player.state.listener.StateKeyboardButtonListener
import org.oppia.android.app.utility.KeyboardHelper.Companion.hideSoftKeyboard
import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard
Expand All @@ -17,12 +17,12 @@ import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard
// background="@drawable/edit_text_background"
// maxLength="200".

/** The custom EditText class for text input interaction view. */
/** The custom [AppCompatEditText] class for text input interaction view. */
class TextInputInteractionView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = android.R.attr.editTextStyle
) : EditText(context, attrs, defStyle), View.OnFocusChangeListener {
) : AppCompatEditText(context, attrs, defStyle), View.OnFocusChangeListener {
private var hintText: CharSequence = ""
private val stateKeyboardButtonListener: StateKeyboardButtonListener

Expand Down Expand Up @@ -66,7 +66,7 @@ class TextInputInteractionView @JvmOverloads constructor(

private fun restoreHint() {
hint = hintText
if (text.isEmpty()) setTypeface(typeface, Typeface.ITALIC)
setSingleLine(false)
if (text?.isEmpty() == true) setTypeface(typeface, Typeface.ITALIC)
isSingleLine = false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DeveloperOptionsActivityPresenter @Inject constructor(
.findFragmentById(
R.id.developer_options_activity_fragment_navigation_drawer
) as NavigationDrawerFragment
navigationDrawerFragment.setUpDrawer(
navigationDrawerFragment.initializeDrawer(
binding.developerOptionsActivityDrawerLayout,
toolbar, menuItemId = -1
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class NavigationDrawerFragment :
return navigationDrawerFragmentPresenter.handleCreateView(inflater, container)
}

fun setUpDrawer(drawerLayout: DrawerLayout, toolbar: Toolbar, menuItemId: Int) {
navigationDrawerFragmentPresenter.setUpDrawer(drawerLayout, toolbar, menuItemId)
fun initializeDrawer(drawerLayout: DrawerLayout, toolbar: Toolbar, menuItemId: Int) {
navigationDrawerFragmentPresenter.initializeDrawer(drawerLayout, toolbar, menuItemId)
}

override fun routeToProfileProgress(profileId: Int) {
Expand Down
Loading

0 comments on commit 0f6c4b9

Please sign in to comment.