|
@@ -35,6 +35,7 @@ class DownloadWizardActivity: BaseEuiccAccessActivity() {
|
|
|
var downloadStarted: Boolean,
|
|
var downloadStarted: Boolean,
|
|
|
var downloadTaskID: Long,
|
|
var downloadTaskID: Long,
|
|
|
var downloadError: LocalProfileAssistant.ProfileDownloadException?,
|
|
var downloadError: LocalProfileAssistant.ProfileDownloadException?,
|
|
|
|
|
+ var skipMethodSelect: Boolean,
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
private lateinit var state: DownloadWizardState
|
|
private lateinit var state: DownloadWizardState
|
|
@@ -63,17 +64,20 @@ class DownloadWizardActivity: BaseEuiccAccessActivity() {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
state = DownloadWizardState(
|
|
state = DownloadWizardState(
|
|
|
- null,
|
|
|
|
|
- intent.getIntExtra("selectedLogicalSlot", 0),
|
|
|
|
|
- "",
|
|
|
|
|
- null,
|
|
|
|
|
- null,
|
|
|
|
|
- null,
|
|
|
|
|
- false,
|
|
|
|
|
- -1,
|
|
|
|
|
- null
|
|
|
|
|
|
|
+ currentStepFragmentClassName = null,
|
|
|
|
|
+ selectedLogicalSlot = intent.getIntExtra("selectedLogicalSlot", 0),
|
|
|
|
|
+ smdp = "",
|
|
|
|
|
+ matchingId = null,
|
|
|
|
|
+ confirmationCode = null,
|
|
|
|
|
+ imei = null,
|
|
|
|
|
+ downloadStarted = false,
|
|
|
|
|
+ downloadTaskID = -1,
|
|
|
|
|
+ downloadError = null,
|
|
|
|
|
+ skipMethodSelect = false
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ handleDeepLink()
|
|
|
|
|
+
|
|
|
progressBar = requireViewById(R.id.progress)
|
|
progressBar = requireViewById(R.id.progress)
|
|
|
nextButton = requireViewById(R.id.download_wizard_next)
|
|
nextButton = requireViewById(R.id.download_wizard_next)
|
|
|
prevButton = requireViewById(R.id.download_wizard_back)
|
|
prevButton = requireViewById(R.id.download_wizard_back)
|
|
@@ -113,6 +117,19 @@ class DownloadWizardActivity: BaseEuiccAccessActivity() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private fun handleDeepLink() {
|
|
|
|
|
+ // If we get an LPA string from deep-link intents, extract from there.
|
|
|
|
|
+ // Note that `onRestoreInstanceState` could override this with user input,
|
|
|
|
|
+ // but that _is_ the desired behavior.
|
|
|
|
|
+ val uri = intent.data
|
|
|
|
|
+ if (uri?.scheme == "lpa") {
|
|
|
|
|
+ val parsed = ActivationCode.fromString(uri.schemeSpecificPart)
|
|
|
|
|
+ state.smdp = parsed.address
|
|
|
|
|
+ state.matchingId = parsed.matchingId
|
|
|
|
|
+ state.skipMethodSelect = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
override fun onProvideAssistContent(outContent: AssistContent?) {
|
|
override fun onProvideAssistContent(outContent: AssistContent?) {
|
|
|
super.onProvideAssistContent(outContent)
|
|
super.onProvideAssistContent(outContent)
|
|
|
outContent?.webUri = try {
|
|
outContent?.webUri = try {
|