@@ -64,6 +64,7 @@ public class ExperimentalSettingsActivity extends AppCompatActivity {
6464 private View autoFallbackThresholdLayout ;
6565 private SeekBar seekBarFallbackThreshold ;
6666 private SwitchCompat showSpeedInNotificationSwitch ;
67+ private SwitchCompat showTrafficChartSwitch ;
6768 private SwitchCompat adBlockSwitch ;
6869
6970 @ Override
@@ -87,6 +88,9 @@ private void initializeVariable() {
8788 showSpeedInNotificationSwitch = findViewById (R .id .show_speed_in_notification_switch );
8889 showSpeedInNotificationSwitch .setChecked (SharedPrefUtils .getShowSpeedInNotification (this ));
8990
91+ showTrafficChartSwitch = findViewById (R .id .show_traffic_chart_switch );
92+ showTrafficChartSwitch .setChecked (SharedPrefUtils .getShowTrafficChart (this ));
93+
9094 adBlockSwitch = findViewById (R .id .ad_block_switch );
9195 adBlockSwitch .setChecked (SharedPrefUtils .getAdBlockEnabled (this ));
9296
@@ -215,6 +219,7 @@ private void resetToDefault() {
215219 customDnsSwitch .setChecked (false );
216220 customDnsInput .setText ("" );
217221 showSpeedInNotificationSwitch .setChecked (false );
222+ showTrafficChartSwitch .setChecked (true );
218223 adBlockSwitch .setChecked (true );
219224 switchNetworkType .setChecked (true );
220225 switchIPAddress .setChecked (true );
@@ -228,6 +233,7 @@ private void resetToDefault() {
228233 SharedPrefUtils .saveCustomDnsEnabled (this , false );
229234 SharedPrefUtils .saveCustomDnsIpv4 (this , "" );
230235 SharedPrefUtils .saveShowSpeedInNotification (this , false );
236+ SharedPrefUtils .saveShowTrafficChart (this , true );
231237 SharedPrefUtils .saveAdBlockEnabled (this , true );
232238 SharedPrefUtils .saveReconnectOnChangeNetworkTypeEnabled (this , true );
233239 SharedPrefUtils .saveReconnectOnChangeIPEnabled (this , true );
@@ -328,6 +334,7 @@ private void saveAndFinish() {
328334 XLog .tag (TAG ).i ("Experimental settings saved [watchNetwork=%b, watchIP=%b, attempts=%d, delay=%ds]" , switchNetworkType .isChecked (), switchIPAddress .isChecked (), seekBarAttemptsCount .getProgress (), seekBarDelayBetween .getProgress () + 1 );
329335
330336 SharedPrefUtils .saveShowSpeedInNotification (this , showSpeedInNotificationSwitch .isChecked ());
337+ SharedPrefUtils .saveShowTrafficChart (this , showTrafficChartSwitch .isChecked ());
331338 SharedPrefUtils .saveAdBlockEnabled (this , adBlockSwitch .isChecked ());
332339 SharedPrefUtils .saveReconnectOnChangeNetworkTypeEnabled (this , switchNetworkType .isChecked ());
333340 SharedPrefUtils .saveReconnectOnChangeIPEnabled (this , switchIPAddress .isChecked ());
0 commit comments