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

Commit 0051106f authored by chen xu's avatar chen xu
Browse files

support limited sim function notification under dsds

warn users that sim voice & data function might be limited
during DSDS due to sharing the same radio. this is controlled
by carrier config, carrier which provide emergency service can
choose to notify users that their service might be impacted
under certain dual sim scenarios.

Bug: 134790138
Test: Manual
Change-Id: I8ae33fc9d775b9654587f0e863a51115ca6065db
parent 66670cea
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -187,6 +187,9 @@
    <string name="notification_channel_wfc">Wi-Fi calling</string>
    <!-- Telephony notification channel name for a channel containing SIM notifications -->
    <string name="notification_channel_sim">SIM status</string>
    <!-- Telephony notification channel name for a channel containing high priority SIM notifications -->
    <string name="notification_channel_sim_high_prio">High priority SIM status</string>


    <!-- Displayed to tell the user that peer changed TTY mode -->
    <string name="peerTtyModeFull">Peer requested TTY Mode FULL</string>
+1 −0
Original line number Diff line number Diff line
@@ -647,6 +647,7 @@
  <java-symbol type="string" name="notification_channel_voice_mail" />
  <java-symbol type="string" name="notification_channel_wfc" />
  <java-symbol type="string" name="notification_channel_sim" />
  <java-symbol type="string" name="notification_channel_sim_high_prio" />
  <java-symbol type="string" name="SetupCallDefault" />
  <java-symbol type="string" name="accept" />
  <java-symbol type="string" name="activity_chooser_view_see_all" />
+10 −0
Original line number Diff line number Diff line
@@ -2112,6 +2112,15 @@ public class CarrierConfigManager {
    public static final String KEY_DATA_WARNING_NOTIFICATION_BOOL =
            "data_warning_notification_bool";

    /**
     * Controls if the device should automatically warn the user that sim voice & data function
     * might be limited due to dual sim scenario. When set to {@true} display the notification,
     * {@code false} otherwise.
     * @hide
     */
    public static final String KEY_LIMITED_SIM_FUNCTION_NOTIFICATION_FOR_DSDS_BOOL =
            "limited_sim_function_notification_for_dsds_bool";

    /**
     * Controls the cellular data limit.
     * <p>
@@ -3260,6 +3269,7 @@ public class CarrierConfigManager {
        sDefaults.putInt(KEY_MONTHLY_DATA_CYCLE_DAY_INT, DATA_CYCLE_USE_PLATFORM_DEFAULT);
        sDefaults.putLong(KEY_DATA_WARNING_THRESHOLD_BYTES_LONG, DATA_CYCLE_USE_PLATFORM_DEFAULT);
        sDefaults.putBoolean(KEY_DATA_WARNING_NOTIFICATION_BOOL, true);
        sDefaults.putBoolean(KEY_LIMITED_SIM_FUNCTION_NOTIFICATION_FOR_DSDS_BOOL, false);
        sDefaults.putLong(KEY_DATA_LIMIT_THRESHOLD_BYTES_LONG, DATA_CYCLE_USE_PLATFORM_DEFAULT);
        sDefaults.putBoolean(KEY_DATA_LIMIT_NOTIFICATION_BOOL, true);
        sDefaults.putBoolean(KEY_DATA_RAPID_NOTIFICATION_BOOL, true);