-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Intent for launching a specific App In CommCare #2710
Conversation
…imedia as part of app installs in tests
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.
One or two minor comments but otherwise this looks great!
if (sesssionEndpointAppID != null) { | ||
CommCareApp currentApp = CommCareApplication.instance().getCurrentApp(); | ||
if (currentApp != null) { | ||
return !currentApp.getUniqueId().contentEquals(sesssionEndpointAppID); |
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.
Curious about the use of contentEquals() here instead of just equals(). From what I understand contentEquals() just calls equals() under the hood when the passed input is a String, so functionally there should be no difference. So this may just be a consistency nit.
But in LoginActivity line 561 I see we're only calling equals(). When I search for "getUniqueId." I see 4 times that we use equals() and one that we use contentEquals(). Okay to ignore this if you don't think it's worth changing.
String presetAppId = activity.getPresetAppID(); | ||
if (presetAppId != null) { | ||
for (ApplicationRecord readyApp : readyApps) { | ||
if (readyApp.getUniqueId().contentEquals(presetAppId)) { |
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.
contentEquals() again, see above comment.
Summary
Adds a way to launch a particular CC app using an intent as -
commit by commit
Safety Assurance
Automated test coverage
coverage for new functionality is in PR, installs and logins have ample tests.
Safety story
Tests should cover for any regressions on the dipatch and login pages.