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(android): amend hasActivityTransitions() for transitions #10832
Conversation
Tests:
|
0f48283
to
b426ebf
Compare
{ | ||
return false; | ||
super.onResume(); | ||
loadScript(); |
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.
@jquick-axway Any thoughts on moving loadScript()
over to onResume()
?
The reason for this is due to handleOpen(options)
occurring before the RootActivity has resumed. Which prevents the transition from happening.
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'm open to the idea. It should reduce app startup stutter as well. Let's test it out.
I think the only thing we lose is Activity.onCreate
callback support for the root activity, but that's not useful. You're also less likely to receive newintent
event from the root activity, but everyone should be reading the launch intent on app startup anyways and not depend on this behavior. We might have to worry about assumptions made after the windowCreated()
call in the TiBaseActivity.onCreate()
. We might be okay, but that's the part we need to safe-guard.
@garymathews , since you've changed the code to call For example:
// This will only be logged once since "app.js" was already required-in.
// But the "ti.main.js" script will be re-executed, which is not what we want.
Ti.API.info("@@@ app.js was loaded."); So, we'll probably want to do something like this... private boolean wasScriptLoaded;
void protected loadScript()
{
if (this.wasScriptLoaded) {
return;
}
try {
String fullUrl = resolveUrl(this.url);
KrollRuntime.getInstance().runModule(KrollAssetHelper.readAsset(fullUrl), fullUrl, activityProxy);
this.wasScriptLoaded = true;
} finally {
Log.d(TAG, "Signal JS loaded", Log.DEBUG_MODE);
}
} |
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.
CR: Pass
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.
FR Passed: Application no longer hangs with the test case above and when using Yeti, transition element seem fine as well when a sharedElement
has not been specified.
Test Environment
Google pixel xl 7.1.1 sim
APPC CLI: 7.0.10
Operating System Name: Mac OS Mojave
Operating System Version: 10.14.2
Node.js Version: 8.9.1
Xcode 10.1
…idev#10832)" This reverts commit 14ad127.
hasActivityTransitions()
to allow transitions when asharedElement
has not been specifiedTEST CASE
JIRA Ticket