-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #5404 : Migrate onBackPressed #5427
Conversation
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 16 MiB (old), 16 MiB (new), 67 KiB (Removed) APK download size (estimated): 14 MiB (old), 14 MiB (new), 54 KiB (Removed) Method count: 221791 (old), 221727 (new), 64 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6550 (old), 6492 (new), 58 (Removed)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 15 MiB (old), 15 MiB (new), 66 KiB (Removed)
Configuration hdpiAPK file size: 59 KiB (old), 59 KiB (new), 280 bytes (Removed) Configuration ldpiAPK file size: 56 KiB (old), 56 KiB (new), 352 bytes (Removed) Configuration mdpiAPK file size: 53 KiB (old), 53 KiB (new), 288 bytes (Removed) Configuration tvdpiAPK file size: 102 KiB (old), 102 KiB (new), 488 bytes (Removed) Configuration xhdpiAPK file size: 67 KiB (old), 67 KiB (new), 344 bytes (Removed) Configuration xxhdpiAPK file size: 76 KiB (old), 76 KiB (new), 288 bytes (Removed) Configuration xxxhdpiAPK file size: 79 KiB (old), 78 KiB (new), 296 bytes (Removed) AlphaExpand to see flavor specificsUniversal APKAPK file size: 10 MiB (old), 9 MiB (new), 67 KiB (Removed) APK download size (estimated): 9150 KiB (old), 9091 KiB (new), 58 KiB (Removed) Method count: 99436 (old), 99376 (new), 60 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5432 (new), 72 (Removed)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 66 KiB (Removed)
Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 204 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 336 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 208 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 89 KiB (new), 340 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 268 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 68 KiB (new), 208 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 212 bytes (Removed) BetaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 67 KiB (Removed) APK download size (estimated): 9135 KiB (old), 9080 KiB (new), 55 KiB (Removed) Method count: 99436 (old), 99376 (new), 60 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5432 (new), 72 (Removed)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 66 KiB (Removed)
Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 204 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 336 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 208 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 89 KiB (new), 340 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 268 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 68 KiB (new), 208 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 212 bytes (Removed) GaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 67 KiB (Removed) APK download size (estimated): 9136 KiB (old), 9080 KiB (new), 55 KiB (Removed) Method count: 99436 (old), 99376 (new), 60 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5432 (new), 72 (Removed)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 66 KiB (Removed)
Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 204 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 336 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 208 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 89 KiB (new), 340 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 268 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 68 KiB (new), 208 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 212 bytes (Removed) |
@adhiamboperes please check. If this is alright then I would proceed with the others as well. |
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 16 MiB (old), 16 MiB (new), 67 KiB (Removed) APK download size (estimated): 14 MiB (old), 14 MiB (new), 54 KiB (Removed) Method count: 221791 (old), 221727 (new), 64 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6550 (old), 6492 (new), 58 (Removed)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 15 MiB (old), 15 MiB (new), 66 KiB (Removed)
Configuration hdpiAPK file size: 59 KiB (old), 59 KiB (new), 280 bytes (Removed) Configuration ldpiAPK file size: 56 KiB (old), 56 KiB (new), 352 bytes (Removed) Configuration mdpiAPK file size: 53 KiB (old), 53 KiB (new), 288 bytes (Removed) Configuration tvdpiAPK file size: 102 KiB (old), 102 KiB (new), 488 bytes (Removed) Configuration xhdpiAPK file size: 67 KiB (old), 67 KiB (new), 344 bytes (Removed) Configuration xxhdpiAPK file size: 76 KiB (old), 76 KiB (new), 288 bytes (Removed) Configuration xxxhdpiAPK file size: 79 KiB (old), 78 KiB (new), 296 bytes (Removed) AlphaExpand to see flavor specificsUniversal APKAPK file size: 10 MiB (old), 9 MiB (new), 67 KiB (Removed) APK download size (estimated): 9150 KiB (old), 9091 KiB (new), 58 KiB (Removed) Method count: 99436 (old), 99376 (new), 60 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5432 (new), 72 (Removed)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 66 KiB (Removed)
Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 204 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 336 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 208 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 89 KiB (new), 340 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 268 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 68 KiB (new), 208 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 212 bytes (Removed) BetaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 67 KiB (Removed) APK download size (estimated): 9135 KiB (old), 9080 KiB (new), 55 KiB (Removed) Method count: 99436 (old), 99376 (new), 60 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5432 (new), 72 (Removed)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 66 KiB (Removed)
Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 204 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 336 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 208 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 89 KiB (new), 340 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 268 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 68 KiB (new), 208 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 212 bytes (Removed) GaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 67 KiB (Removed) APK download size (estimated): 9136 KiB (old), 9080 KiB (new), 55 KiB (Removed) Method count: 99436 (old), 99376 (new), 60 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5432 (new), 72 (Removed)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 66 KiB (Removed)
Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 204 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 336 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 208 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 89 KiB (new), 340 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 268 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 68 KiB (new), 208 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 212 bytes (Removed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Tejas-67!
The main comment is to use onBackPressedDispatcher.addCallback()
for backward compatibility, but I have seen your comment in the PR description that this doesn't work above api 33. Could you please confirm that?
I would also encourage handling the back press in a function that you can call, that will remove the need to move code from the presenter to activity or fragment in some cases.
@@ -86,6 +88,46 @@ class AdministratorControlsActivity : | |||
isProfileDeletionDialogVisible | |||
) | |||
title = resourceHandler.getStringInLocale(R.string.administrator_controls) | |||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { | |||
onBackInvokedDispatcher.registerOnBackInvokedCallback(1000) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be a constant, e.g. OnBackInvokedDispatcher.PRIORITY_DEFAULT
private fun getProfileEditActivity(): ProfileEditActivity? { | ||
return activity as ProfileEditActivity? | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? It does not appear to be in use.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { | ||
onBackInvokedDispatcher.registerOnBackInvokedCallback(1000) { | ||
val fragment = | ||
supportFragmentManager.findFragmentById( | ||
R.id.administrator_controls_fragment_multipane_placeholder | ||
) | ||
/* | ||
* If the current fragment is ProfileListFragment then the activity should end on back press. | ||
* If it's instead ProfileEditFragment then profileListFragment should be inflated via | ||
* handleOnBackPressed. | ||
*/ | ||
if (fragment is ProfileEditFragment) { | ||
administratorControlsActivityPresenter.handleOnBackPressed() | ||
} else { | ||
onBackPressedDispatcher.onBackPressed() | ||
} | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose removing this bit of the onBackInvokedDispatcher.registerOnBackInvokedCallback() and remaining with the part that is under "else".
According to the documentation, https://developer.android.com/reference/android/app/Activity#onBackPressed(), onBackPressedDispatcher.addCallback()
is backward compatible, eliminating the need to gate the logic with the sdk version.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { | ||
onBackInvokedDispatcher.registerOnBackInvokedCallback(1000) { | ||
val isMultipane: Boolean = intent.extras!!.getBoolean(IS_MULTIPANE_EXTRA_KEY, false) | ||
if (isMultipane) { | ||
onBackPressedDispatcher.onBackPressed() | ||
} else { | ||
val intent = Intent(this, ProfileListActivity::class.java) | ||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) | ||
startActivity(intent) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment regarding gating sdk
onBackPressedDispatcher.addCallback( | ||
this@ProfileEditActivity, object: OnBackPressedCallback(true) { | ||
override fun handleOnBackPressed() { | ||
val isMultipane: Boolean = intent.extras!!.getBoolean(IS_MULTIPANE_EXTRA_KEY, false) | ||
if (isMultipane) { | ||
onBackPressedDispatcher.onBackPressed() | ||
} else { | ||
val intent = Intent(this@ProfileEditActivity, ProfileListActivity::class.java) | ||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) | ||
startActivity(intent) | ||
} | ||
} | ||
}) | ||
} | ||
(activityComponent as ActivityComponentImpl).inject(this) | ||
profileEditActivityPresenter.handleOnCreate() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can improve readability by putting this in a function.
onBackPressedDispatcher.addCallback( | |
this@ProfileEditActivity, object: OnBackPressedCallback(true) { | |
override fun handleOnBackPressed() { | |
val isMultipane: Boolean = intent.extras!!.getBoolean(IS_MULTIPANE_EXTRA_KEY, false) | |
if (isMultipane) { | |
onBackPressedDispatcher.onBackPressed() | |
} else { | |
val intent = Intent(this@ProfileEditActivity, ProfileListActivity::class.java) | |
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) | |
startActivity(intent) | |
} | |
} | |
}) | |
} | |
(activityComponent as ActivityComponentImpl).inject(this) | |
profileEditActivityPresenter.handleOnCreate() | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
.... | |
handleBackPress() | |
} | |
private fun handleBackPress() { | |
onBackPressedDispatcher.addCallback( | |
this@AdministratorControlsActivity, object : OnBackPressedCallback(true) { | |
override fun handleOnBackPressed() { | |
val fragment = | |
supportFragmentManager.findFragmentById( | |
R.id.administrator_controls_fragment_multipane_placeholder | |
) | |
/* | |
* If the current fragment is ProfileListFragment then the activity should end on back press. | |
* If it's instead ProfileEditFragment then profileListFragment should be inflated via | |
* handleOnBackPressed. | |
*/ | |
if (fragment is ProfileEditFragment) { | |
administratorControlsActivityPresenter.handleOnBackPressed() | |
} else { | |
isEnabled = false | |
onBackPressedDispatcher.onBackPressed() | |
isEnabled = true | |
} | |
} | |
}) | |
} |
app/src/main/AndroidManifest.xml
Outdated
@@ -14,6 +14,7 @@ | |||
android:icon="@mipmap/launcher_icon" | |||
android:label="@string/app_name" | |||
android:supportsRtl="true" | |||
android:enableOnBackInvokedCallback="true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed as far as I can tell.
Unassigning @adhiamboperes since the review is done. |
Hi @Tejas-67, it looks like some changes were requested on this pull request by @adhiamboperes. PTAL. Thanks! |
b1c4081
to
daeb26b
Compare
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 16 MiB (old), 16 MiB (new), 1116 bytes (Added) APK download size (estimated): 14 MiB (old), 14 MiB (new), 640 bytes (Added) Method count: 221791 (old), 221811 (new), 20 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6550 (old), 6550 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 15 MiB (old), 15 MiB (new), 1120 bytes (Added) Configuration hdpiAPK file size: 59 KiB (old), 59 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 56 KiB (old), 56 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 53 KiB (old), 53 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 102 KiB (old), 102 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 67 KiB (old), 67 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 76 KiB (old), 76 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 79 KiB (old), 79 KiB (new), 0 bytes (No change) AlphaExpand to see flavor specificsUniversal APKAPK file size: 10 MiB (old), 10 MiB (new), 788 bytes (Added) APK download size (estimated): 9150 KiB (old), 9151 KiB (new), 947 bytes (Added) Method count: 99436 (old), 99450 (new), 14 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 788 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) BetaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 796 bytes (Added) APK download size (estimated): 9135 KiB (old), 9136 KiB (new), 431 bytes (Added) Method count: 99436 (old), 99450 (new), 14 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 796 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) GaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 776 bytes (Added) APK download size (estimated): 9136 KiB (old), 9137 KiB (new), 1291 bytes (Added) Method count: 99436 (old), 99450 (new), 14 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 780 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) |
dc0fd1f
to
1109437
Compare
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 16 MiB (old), 16 MiB (new), 2052 bytes (Added) APK download size (estimated): 14 MiB (old), 14 MiB (new), 1323 bytes (Added) Method count: 221791 (old), 221842 (new), 51 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6550 (old), 6550 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 15 MiB (old), 15 MiB (new), 2056 bytes (Added) Configuration hdpiAPK file size: 59 KiB (old), 59 KiB (new), 4 bytes (Removed) Configuration ldpiAPK file size: 56 KiB (old), 56 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 53 KiB (old), 53 KiB (new), 4 bytes (Removed) Configuration tvdpiAPK file size: 102 KiB (old), 102 KiB (new), 4 bytes (Removed) Configuration xhdpiAPK file size: 67 KiB (old), 67 KiB (new), 4 bytes (Removed) Configuration xxhdpiAPK file size: 76 KiB (old), 76 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 79 KiB (old), 79 KiB (new), 0 bytes (No change) AlphaExpand to see flavor specificsUniversal APKAPK file size: 10 MiB (old), 10 MiB (new), 2044 bytes (Added) APK download size (estimated): 9150 KiB (old), 9151 KiB (new), 1398 bytes (Added) Method count: 99436 (old), 99474 (new), 38 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 2044 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 4 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 4 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 4 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 4 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) BetaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 1956 bytes (Added) APK download size (estimated): 9135 KiB (old), 9137 KiB (new), 2031 bytes (Added) Method count: 99436 (old), 99474 (new), 38 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 1956 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 4 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 4 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 4 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 4 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) GaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 1924 bytes (Added) APK download size (estimated): 9136 KiB (old), 9136 KiB (new), 794 bytes (Added) Method count: 99436 (old), 99474 (new), 38 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 1932 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 4 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 4 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 4 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 4 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) |
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 16 MiB (old), 16 MiB (new), 2052 bytes (Added) APK download size (estimated): 14 MiB (old), 14 MiB (new), 1323 bytes (Added) Method count: 221791 (old), 221842 (new), 51 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6550 (old), 6550 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 15 MiB (old), 15 MiB (new), 2056 bytes (Added) Configuration hdpiAPK file size: 59 KiB (old), 59 KiB (new), 4 bytes (Removed) Configuration ldpiAPK file size: 56 KiB (old), 56 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 53 KiB (old), 53 KiB (new), 4 bytes (Removed) Configuration tvdpiAPK file size: 102 KiB (old), 102 KiB (new), 4 bytes (Removed) Configuration xhdpiAPK file size: 67 KiB (old), 67 KiB (new), 4 bytes (Removed) Configuration xxhdpiAPK file size: 76 KiB (old), 76 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 79 KiB (old), 79 KiB (new), 0 bytes (No change) AlphaExpand to see flavor specificsUniversal APKAPK file size: 10 MiB (old), 10 MiB (new), 2044 bytes (Added) APK download size (estimated): 9150 KiB (old), 9151 KiB (new), 1398 bytes (Added) Method count: 99436 (old), 99474 (new), 38 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 2044 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 4 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 4 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 4 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 4 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) BetaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 1956 bytes (Added) APK download size (estimated): 9135 KiB (old), 9137 KiB (new), 2031 bytes (Added) Method count: 99436 (old), 99474 (new), 38 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 1956 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 4 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 4 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 4 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 4 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) GaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 1924 bytes (Added) APK download size (estimated): 9136 KiB (old), 9136 KiB (new), 794 bytes (Added) Method count: 99436 (old), 99474 (new), 38 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 1932 bytes (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 4 bytes (Removed) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 4 bytes (Removed) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 4 bytes (Removed) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 4 bytes (Removed) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 4 bytes (Removed) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) |
hey @adhiamboperes, I have migrated the activities, but facing problem in the WalkthroughFinalFragmentPresenter. Even after setting up the onBackPressedDispatcher in the WalkthroughFinalActivity, I am unable to get the reference of the onBackPressedDispatcher in the Presenter. how can i fix this? |
Could you please share a screenshot of your implementation so that I can understand your issue better? |
Hi @Tejas-67, could you please provide an update on your progress? If you are facing any blockers, let us know. Kindly attach all the relevant details and push the code that is not working, so we can have a clearer understanding of the issues. |
hey @Vishwajith-Shettigar , I am done with the WalkthroughFinalPresenter as well. But I am facing this error while pushing the code. `buf_lint_check.sh: line 13: ../oppia-android-tools/buf-Darwin-x86_64: No such file or directory Protobuf lint check issues found. Please fix them before pushing your code` Any idea on how to fix this? |
Since I'm a Windows user, I never encountered this (this lint check doesn't support Windows, I assume), but I can see you may have made changes in protobuf files. If so, check for lint issues. But I don't have a clue about this (maybe you missed some commands while setting up oppia-android) @adhiamboperes may help you! |
@Tejas-67 Could you please confirm that you have the If not, on your terminal, cd into the project root and run command Please let me know if this works, or revisit the wiki installation part for M1 Mac, and look at the instructions for using a Rossetta terminal. |
@adhiamboperes I have the oppia-android-tools folder already, but i have buf-Darwin-arm64 instead of buf-Darwin-x86_64 . |
Do you use intel Mac or M1/M2 |
@adhiamboperes , M2 |
Hi @Tejas-67, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
Explanation
Fix #5404
For devices running on API 33 or above, onBackPressedDispatcher doesn't work, hence we need to use onBackInvokeDispatcher.
In the app:manifest,
<application android:enableOnBackInvokedCallback="true"/>
has been added so that the onBackInvokedDispatcher works.
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: