summaryrefslogtreecommitdiff
path: root/java/com/android/voicemail/stub/StubVoicemailClient.java
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2017-07-17 17:51:50 -0700
committerEric Erfanian <erfanian@google.com>2017-07-25 16:41:46 +0000
commita0da39f9961e55c645aaeadb174a97ae9e66d8ec (patch)
tree0510626a5b7001e9a8eaea5e46a233b83e498047 /java/com/android/voicemail/stub/StubVoicemailClient.java
parent3b232751f69e028d7825efb7e6513045babd0ebb (diff)
Ignore SIM removed event when the system is shutting down
When the SIM is removed, the VVM account will be deactivated to protect user data. When the system is shutting down, the modem shutdown process will be interpreted as SIM removal and the event will be sent. This causes VVM to return to "not activated" state every time the phone is rebooted. If the phone is booted without signal or in airplane mode, the VVM tab will be missing since activation is not attempted without signal. In this CL, BOOT_COMPLETED and ACTION_SHUTDOWN will be used to store the "shutting down" state in a shared preference. If the SIM is removed between ACTION_SHUTDOWN and BOOT_COMPLETED, it will be ignored. SIM removal in FBE is already ignored. SIM removal in power off state is never handled. If the broadcasts are missed (which is improbable), removing the SIM will not remove the VVM tab, until removing it again after the next boot. Bug: 63642638 Test: OmtpServiceTest PiperOrigin-RevId: 162298120 Change-Id: I8e093607529de75c28a4869861f18d28406f8042
Diffstat (limited to 'java/com/android/voicemail/stub/StubVoicemailClient.java')
-rw-r--r--java/com/android/voicemail/stub/StubVoicemailClient.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/java/com/android/voicemail/stub/StubVoicemailClient.java b/java/com/android/voicemail/stub/StubVoicemailClient.java
index 9a89e30c0..e5d51455c 100644
--- a/java/com/android/voicemail/stub/StubVoicemailClient.java
+++ b/java/com/android/voicemail/stub/StubVoicemailClient.java
@@ -93,4 +93,10 @@ public final class StubVoicemailClient implements VoicemailClient {
@NonNull Context context, @Nullable PhoneAccountHandle phoneAccountHandle) {
return new PersistableBundle();
}
+
+ @Override
+ public void onBoot(@NonNull Context context) {}
+
+ @Override
+ public void onShutdown(@NonNull Context context) {}
}