Notify OTA Emergency Number Database Installation complete

1) Introduce a system api intent for notifying OTA emergency number
database installation complete
2) Notify the installation complete in ConfigUpdater

Test: Build
Bug: 136027884
Change-Id: I62777e9e2a4a2cc3b5207c504884762768ad08e0
This commit is contained in:
Shuo Qian
2019-10-18 15:10:35 -07:00
parent 4f842f444c
commit 00a3710617
4 changed files with 19 additions and 1 deletions

View File

@@ -8320,6 +8320,7 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void toggleRadioOnOff(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void toggleRadioOnOff();
method public void updateServiceLocation(); method public void updateServiceLocation();
field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_ANOMALY_REPORTED = "android.telephony.action.ANOMALY_REPORTED"; field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_ANOMALY_REPORTED = "android.telephony.action.ANOMALY_REPORTED";
field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_OTA_EMERGENCY_NUMBER_DB_INSTALLED = "android.telephony.action.OTA_EMERGENCY_NUMBER_DB_INSTALLED";
field public static final String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED"; field public static final String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED";
field public static final String ACTION_SIM_CARD_STATE_CHANGED = "android.telephony.action.SIM_CARD_STATE_CHANGED"; field public static final String ACTION_SIM_CARD_STATE_CHANGED = "android.telephony.action.SIM_CARD_STATE_CHANGED";
field public static final String ACTION_SIM_SLOT_STATUS_CHANGED = "android.telephony.action.SIM_SLOT_STATUS_CHANGED"; field public static final String ACTION_SIM_SLOT_STATUS_CHANGED = "android.telephony.action.SIM_SLOT_STATUS_CHANGED";

View File

@@ -497,6 +497,7 @@
<protected-broadcast android:name="android.telephony.action.CARRIER_CONFIG_CHANGED" /> <protected-broadcast android:name="android.telephony.action.CARRIER_CONFIG_CHANGED" />
<protected-broadcast android:name="android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED" /> <protected-broadcast android:name="android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED" />
<protected-broadcast android:name="android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED" /> <protected-broadcast android:name="android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED" />
<protected-broadcast android:name="android.telephony.action.OTA_EMERGENCY_NUMBER_DB_INSTALLED" />
<protected-broadcast android:name="android.telephony.action.SECRET_CODE" /> <protected-broadcast android:name="android.telephony.action.SECRET_CODE" />
<protected-broadcast android:name="android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION" /> <protected-broadcast android:name="android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION" />
<protected-broadcast android:name="android.telephony.action.SUBSCRIPTION_PLANS_CHANGED" /> <protected-broadcast android:name="android.telephony.action.SUBSCRIPTION_PLANS_CHANGED" />

View File

@@ -18,6 +18,7 @@ package com.android.server.updates;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.telephony.TelephonyManager;
import android.util.Slog; import android.util.Slog;
/** /**
@@ -34,6 +35,11 @@ public class EmergencyNumberDbInstallReceiver extends ConfigUpdateInstallReceive
@Override @Override
protected void postInstall(Context context, Intent intent) { protected void postInstall(Context context, Intent intent) {
Slog.i(TAG, "Emergency number database is updated in file partition"); Slog.i(TAG, "Emergency number database is updated in file partition");
// TODO Send a notification to EmergencyNumberTracker for updating of emergency number db.
// Notify EmergencyNumberTracker for emergency number installation complete.
Intent notifyInstallComplete = new Intent(
TelephonyManager.ACTION_OTA_EMERGENCY_NUMBER_DB_INSTALLED);
context.sendBroadcast(
notifyInstallComplete, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE);
} }
} }

View File

@@ -10869,6 +10869,16 @@ public class TelephonyManager {
} }
} }
/**
* Broadcast intent action for Ota emergency number database installation complete.
*
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
@SystemApi
public static final String ACTION_OTA_EMERGENCY_NUMBER_DB_INSTALLED =
"android.telephony.action.OTA_EMERGENCY_NUMBER_DB_INSTALLED";
/** /**
* Returns whether {@link TelephonyManager#ACTION_EMERGENCY_ASSISTANCE emergency assistance} is * Returns whether {@link TelephonyManager#ACTION_EMERGENCY_ASSISTANCE emergency assistance} is
* available on the device. * available on the device.