Schematize Telephony System Properties
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.
Bug: 117924132
Bug: 141246285
Test: lunch blueline-userdebug; m checkbuild
Change-Id: I61f07d29ae871b856ebbcf690238e35f265b56c2
diff --git a/src/com/android/phone/EmergencyCallbackModeService.java b/src/com/android/phone/EmergencyCallbackModeService.java
index a07f7aa..41d83c4 100644
--- a/src/com/android/phone/EmergencyCallbackModeService.java
+++ b/src/com/android/phone/EmergencyCallbackModeService.java
@@ -30,13 +30,12 @@
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
-import android.os.SystemProperties;
+import android.sysprop.TelephonyProperties;
import android.util.Log;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.util.NotificationChannelController;
import java.text.SimpleDateFormat;
@@ -50,7 +49,7 @@
public class EmergencyCallbackModeService extends Service {
// Default Emergency Callback Mode timeout value
- private static final int DEFAULT_ECM_EXIT_TIMER_VALUE = 300000;
+ private static final long DEFAULT_ECM_EXIT_TIMER_VALUE = 300000L;
private static final String LOG_TAG = "EmergencyCallbackModeService";
private NotificationManager mNotificationManager = null;
@@ -139,8 +138,7 @@
*/
private void startTimerNotification() {
// Get Emergency Callback Mode timeout value
- long ecmTimeout = SystemProperties.getLong(
- TelephonyProperties.PROPERTY_ECM_EXIT_TIMER, DEFAULT_ECM_EXIT_TIMER_VALUE);
+ long ecmTimeout = TelephonyProperties.ecm_exit_timer().orElse(DEFAULT_ECM_EXIT_TIMER_VALUE);
// Show the notification
showNotification(ecmTimeout);