Upgrade CaptivePortalLogin to SDK 31

Upgrade CaptivePortalLogin to SDK 31. Also, specify the
`android:exported` value in OpenTextFileActivity because apps
targeting android 12 and higher are required to specify an
explicit value when the corresponding component has an intent
filter defined.

Test: atest CaptivePortalLoginTests
Bug: 211367787
Change-Id: I256a372a3c073ac71e5b3be3c81b8a1d318823a2
3 files changed