Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34690137 authored by rambowang's avatar rambowang
Browse files

Set default value for carrier config KEY_UNDELIVERED_SMS_MESSAGE_EXPIRATION_TIME

This cl sets the default value (7 days which is used in
SmsBroadcastUndelivered) for carrier config
KEY_UNDELIVERED_SMS_MESSAGE_EXPIRATION_TIME.

Without default value, the configs will not be returned from APIs
like CarrierConigManager.getConfigForSub if default and carrier
config app doesn't override them. It may cause caller
process crash if not handled properly.

Bug: 261776046
Test: atest FrameworksTelephonyTests
Test: Basic phone functional test (activation/call/data/messages...)
Change-Id: I46085146605db27ef2d7d393917584a96aceb7fd
parent 4b6e10ba
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -3530,7 +3530,7 @@ public class CarrierConfigManager {
    /**
    /**
     * When a partial sms / mms message stay in raw table for too long without being completed,
     * When a partial sms / mms message stay in raw table for too long without being completed,
     * we expire them and delete them from the raw table. This carrier config defines the
     * we expire them and delete them from the raw table. This carrier config defines the
     * expiration time.
     * expiration time. The default value is milliseconds in 7 days.
     * @hide
     * @hide
     */
     */
    public static final String KEY_UNDELIVERED_SMS_MESSAGE_EXPIRATION_TIME =
    public static final String KEY_UNDELIVERED_SMS_MESSAGE_EXPIRATION_TIME =
@@ -10318,6 +10318,8 @@ public class CarrierConfigManager {
                "NR_NSA_MMWAVE:145000,60000", "NR_SA:145000,60000", "NR_SA_MMWAVE:145000,60000"});
                "NR_NSA_MMWAVE:145000,60000", "NR_SA:145000,60000", "NR_SA_MMWAVE:145000,60000"});
        sDefaults.putBoolean(KEY_BANDWIDTH_NR_NSA_USE_LTE_VALUE_FOR_UPLINK_BOOL, false);
        sDefaults.putBoolean(KEY_BANDWIDTH_NR_NSA_USE_LTE_VALUE_FOR_UPLINK_BOOL, false);
        sDefaults.putString(KEY_WCDMA_DEFAULT_SIGNAL_STRENGTH_MEASUREMENT_STRING, "rssi");
        sDefaults.putString(KEY_WCDMA_DEFAULT_SIGNAL_STRENGTH_MEASUREMENT_STRING, "rssi");
        sDefaults.putLong(
                KEY_UNDELIVERED_SMS_MESSAGE_EXPIRATION_TIME, (long) (60 * 60 * 1000) * 24 * 7);
        sDefaults.putBoolean(KEY_CONFIG_SHOW_ORIG_DIAL_STRING_FOR_CDMA_BOOL, false);
        sDefaults.putBoolean(KEY_CONFIG_SHOW_ORIG_DIAL_STRING_FOR_CDMA_BOOL, false);
        sDefaults.putBoolean(KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL, false);
        sDefaults.putBoolean(KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL, false);
        sDefaults.putBoolean(KEY_CALL_FORWARDING_OVER_UT_WARNING_BOOL, false);
        sDefaults.putBoolean(KEY_CALL_FORWARDING_OVER_UT_WARNING_BOOL, false);