[Wi-Fi] Use startActivityForResult instead of startActivity to launch google help page

The startActivity API can not launch the help page.
Change to use startActivityForResult to launch.

Bug: 143784389
Test: Add learnMore_launchesHelp_shouldStartActivityForResult unit test to check if startActivityForResult be called.
Change-Id: Ia3ef82f94d4c8feb71131b44be26df74d6259805
This commit is contained in:
govenliu
2020-03-10 13:30:19 +08:00
parent e28309b2dc
commit 6794ce8233
2 changed files with 20 additions and 7 deletions

View File

@@ -99,7 +99,7 @@ public class WifiScanningRequiredFragment extends InstrumentedDialogFragment imp
Intent intent = getHelpIntent(getContext());
if (intent != null) {
try {
startActivity(intent);
getActivity().startActivityForResult(intent, 0);
} catch (ActivityNotFoundException e) {
Log.e(TAG, "Activity was not found for intent, " + intent.toString());
}