• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.server.uwb;
18 
19 import android.content.Context;
20 import android.os.Handler;
21 import android.provider.DeviceConfig;
22 import android.util.Log;
23 
24 import com.android.uwb.resources.R;
25 
26 /**
27  * This class allows getting all configurable flags from DeviceConfig.
28  */
29 public class DeviceConfigFacade {
30     private static final String LOG_TAG = DeviceConfigFacade.class.getSimpleName();
31 
32     /**
33      */
34     private static final int MAX_FOV = 180;
35 
36     public static final int DEFAULT_RANGING_RESULT_LOG_INTERVAL_MS = 5_000;
37     private static final int MS_IN_HOUR = 60 * 60 * 1000;
38     public static final int DEFAULT_BUG_REPORT_MIN_INTERVAL_MS = 24 * MS_IN_HOUR;
39     private static final String TAG = "DeviceConfigFacadeUwb";
40 
41     public enum PoseSourceType {
42         NONE,
43         ROTATION_VECTOR,
44         GYRO,
45         SIXDOF,
46         DOUBLE_INTEGRATE,
47     }
48 
49     private final Context mContext;
50 
51     // Cached values of fields updated via updateDeviceConfigFlags()
52     private int mRangingResultLogIntervalMs;
53     private boolean mDeviceErrorBugreportEnabled;
54     private boolean mSessionInitErrorBugreportEnabled;
55     private int mBugReportMinIntervalMs;
56     private boolean mEnableFilters;
57     private int mFilterDistanceInliersPercent;
58     private int mFilterDistanceWindow;
59     private int mFilterAngleInliersPercent;
60     private int mFilterAngleWindow;
61     private PoseSourceType mPoseSourceType;
62     private boolean mEnablePrimerEstElevation;
63     private boolean mEnablePrimerAoA;
64     private boolean mEnablePrimerFov;
65     private int mPrimerFovDegree;
66     private boolean mEnableBackAzimuth;
67     private boolean mEnableBackAzimuthMasking;
68     private int mBackAzimuthWindow;
69     private float mFrontAzimuthRadiansPerSecond;
70     private float mBackAzimuthRadiansPerSecond;
71     private float mMirrorScoreStdRadians;
72     private float mBackNoiseInfluenceCoeff;
73     private int mPredictionTimeoutSeconds;
74 
75     // Config parameters related to Advertising Profile.
76     private int mAdvertiseAoaCriteriaAngle;
77     private int mAdvertiseTimeThresholdMillis;
78     private int mAdvertiseArraySizeToCheck;
79     private int mAdvertiseArrayStartIndexToCalVariance;
80     private int mAdvertiseArrayEndIndexToCalVariance;
81     private int mAdvertiseTrustedVarianceValue;
82 
83     // Config parameters related to Rx/Tx data packets.
84     private int mRxDataMaxPacketsToStore;
85     // Flag to enable unlimited background ranging.
86     private boolean mBackgroundRangingEnabled;
87     // Flag to disable error streak timer when a session is ongoing.
88     private boolean mRangingErrorStreakTimerEnabled;
89     // Flag to enable sending ranging stopped params.
90     private boolean mCccRangingStoppedParamsSendEnabled;
91     // Flag to enable the UWB Initiation time as an absolute time, for a CCC ranging session.
92     private boolean mCccAbsoluteUwbInitiationTimeEnabled;
93     // Flag to enable usage of location APIs for country code determination
94     private boolean mLocationUseForCountryCodeEnabled;
95     // Flag to disable UWB until first toggle
96     private boolean mUwbDisabledUntilFirstToggle;
97     // Flag to interpret CCC supported sync codes value as little endian
98     private boolean mCccSupportedSyncCodesLittleEndian;
99     // Flag to control whether RANGE_DATA_NTF_CONFIG and related fields should be configured
100     // for a CCC ranging session.
101     private boolean mCccSupportedRangeDataNtfConfig;
102     private boolean mPersistentCacheUseForCountryCodeEnabled;
103     private boolean mHwIdleTurnOffEnabled;
104     private boolean mFusedCountryCodeProviderEnabled;
105     private boolean mIsAntennaModeConfigSupported;
106     private String[] mMccMncOemOverrideList;
107     private boolean mIsRandomHopmodekeySupported;
108     private boolean mFiraExtensionForCCCSupported;
109 
DeviceConfigFacade(Handler handler, Context context)110     public DeviceConfigFacade(Handler handler, Context context) {
111         mContext = context;
112 
113         updateDeviceConfigFlags();
114         DeviceConfig.addOnPropertiesChangedListener(
115                 DeviceConfig.NAMESPACE_UWB,
116                 command -> handler.post(command),
117                 properties -> {
118                     updateDeviceConfigFlags();
119                 });
120     }
121 
updateDeviceConfigFlags()122     private void updateDeviceConfigFlags() {
123         String poseSourceName;
124         mRangingResultLogIntervalMs = DeviceConfig.getInt(DeviceConfig.NAMESPACE_UWB,
125                 "ranging_result_log_interval_ms", DEFAULT_RANGING_RESULT_LOG_INTERVAL_MS);
126         mDeviceErrorBugreportEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_UWB,
127                 "device_error_bugreport_enabled", true);
128         mSessionInitErrorBugreportEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_UWB,
129                 "session_init_error_bugreport_enabled", true);
130         mBugReportMinIntervalMs = DeviceConfig.getInt(DeviceConfig.NAMESPACE_UWB,
131                 "bug_report_min_interval_ms", DEFAULT_BUG_REPORT_MIN_INTERVAL_MS);
132 
133         // Default values come from the overlay file (config.xml).
134         mEnableFilters = DeviceConfig.getBoolean(
135                 DeviceConfig.NAMESPACE_UWB,
136                 "enable_filters",
137                 mContext.getResources().getBoolean(R.bool.enable_filters)
138         );
139         mFilterDistanceInliersPercent = DeviceConfig.getInt(
140                 DeviceConfig.NAMESPACE_UWB,
141                 "filter_distance_inliers_percent",
142                 mContext.getResources().getInteger(R.integer.filter_distance_inliers_percent)
143         );
144         mFilterDistanceWindow = DeviceConfig.getInt(
145                 DeviceConfig.NAMESPACE_UWB,
146                 "filter_distance_window",
147                 mContext.getResources().getInteger(R.integer.filter_distance_window)
148         );
149         mFilterAngleInliersPercent = DeviceConfig.getInt(
150                 DeviceConfig.NAMESPACE_UWB,
151                 "filter_angle_inliers_percent",
152                 mContext.getResources().getInteger(R.integer.filter_angle_inliers_percent)
153         );
154         mFilterAngleWindow = DeviceConfig.getInt(
155                 DeviceConfig.NAMESPACE_UWB,
156                 "filter_angle_window",
157                 mContext.getResources().getInteger(R.integer.filter_angle_window)
158         );
159         poseSourceName = DeviceConfig.getString(
160                 DeviceConfig.NAMESPACE_UWB,
161                 "pose_source_type",
162                 mContext.getResources().getString(R.string.pose_source_type)
163         );
164         mEnablePrimerEstElevation = DeviceConfig.getBoolean(
165                 DeviceConfig.NAMESPACE_UWB,
166                 "enable_primer_est_elevation",
167                 mContext.getResources().getBoolean(R.bool.enable_primer_est_elevation)
168         );
169         mEnablePrimerAoA = DeviceConfig.getBoolean(
170                 DeviceConfig.NAMESPACE_UWB,
171                 "enable_primer_aoa",
172                 mContext.getResources().getBoolean(R.bool.enable_primer_aoa)
173         );
174         mPrimerFovDegree = DeviceConfig.getInt(
175                 DeviceConfig.NAMESPACE_UWB,
176                 "primer_fov_degrees",
177                 mContext.getResources().getInteger(R.integer.primer_fov_degrees)
178         );
179         mPredictionTimeoutSeconds = DeviceConfig.getInt(
180                 DeviceConfig.NAMESPACE_UWB,
181                 "prediction_timeout_seconds",
182                 mContext.getResources().getInteger(R.integer.prediction_timeout_seconds)
183         );
184         mEnableBackAzimuth = DeviceConfig.getBoolean(
185                 DeviceConfig.NAMESPACE_UWB,
186                 "enable_azimuth_mirroring",
187                 mContext.getResources().getBoolean(R.bool.enable_azimuth_mirroring)
188         );
189         mEnableBackAzimuthMasking = DeviceConfig.getBoolean(
190                 DeviceConfig.NAMESPACE_UWB,
191                 "predict_rear_azimuths",
192                 mContext.getResources().getBoolean(R.bool.predict_rear_azimuths)
193         );
194         mBackAzimuthWindow = DeviceConfig.getInt(
195                 DeviceConfig.NAMESPACE_UWB,
196                 "mirror_detection_window",
197                 mContext.getResources().getInteger(R.integer.mirror_detection_window)
198         );
199         int frontAzimuthDegreesPerSecond = DeviceConfig.getInt(
200                 DeviceConfig.NAMESPACE_UWB,
201                 "front_mirror_dps",
202                 mContext.getResources().getInteger(R.integer.front_mirror_dps)
203         );
204         int backAzimuthDegreesPerSecond = DeviceConfig.getInt(
205                 DeviceConfig.NAMESPACE_UWB,
206                 "back_mirror_dps",
207                 mContext.getResources().getInteger(R.integer.back_mirror_dps)
208         );
209         int mirrorScoreStdDegrees = DeviceConfig.getInt(
210                 DeviceConfig.NAMESPACE_UWB,
211                 "mirror_score_std_degrees",
212                 mContext.getResources().getInteger(R.integer.mirror_score_std_degrees)
213         );
214         int backNoiseInfluencePercent = DeviceConfig.getInt(
215                 DeviceConfig.NAMESPACE_UWB,
216                 "back_noise_influence_percent",
217                 mContext.getResources().getInteger(R.integer.back_noise_influence_percent)
218         );
219 
220         // Read the Advertising profile config parameters.
221         mAdvertiseAoaCriteriaAngle = DeviceConfig.getInt(
222                 DeviceConfig.NAMESPACE_UWB,
223                 "advertise_aoa_criteria_angle",
224                 mContext.getResources().getInteger(R.integer.advertise_aoa_criteria_angle)
225         );
226         mAdvertiseTimeThresholdMillis = DeviceConfig.getInt(
227                 DeviceConfig.NAMESPACE_UWB,
228                 "advertise_time_threshold_millis",
229                 mContext.getResources().getInteger(R.integer.advertise_time_threshold_millis)
230         );
231         mAdvertiseArraySizeToCheck = DeviceConfig.getInt(
232                 DeviceConfig.NAMESPACE_UWB,
233                 "advertise_array_size_to_check",
234                 mContext.getResources().getInteger(R.integer.advertise_array_size_to_check)
235         );
236         mAdvertiseArrayStartIndexToCalVariance = DeviceConfig.getInt(
237                 DeviceConfig.NAMESPACE_UWB,
238                 "advertise_array_start_index_to_cal_variance",
239                 mContext.getResources().getInteger(
240                         R.integer.advertise_array_start_index_to_cal_variance)
241         );
242         mAdvertiseArrayEndIndexToCalVariance = DeviceConfig.getInt(
243                 DeviceConfig.NAMESPACE_UWB,
244                 "advertise_array_end_index_to_cal_variance",
245                 mContext.getResources().getInteger(
246                         R.integer.advertise_array_end_index_to_cal_variance)
247         );
248         mAdvertiseTrustedVarianceValue = DeviceConfig.getInt(
249                 DeviceConfig.NAMESPACE_UWB,
250                 "advertise_trusted_variance_value",
251                 mContext.getResources().getInteger(R.integer.advertise_trusted_variance_value)
252         );
253 
254         // Rx data packets.
255         mRxDataMaxPacketsToStore = DeviceConfig.getInt(
256                 DeviceConfig.NAMESPACE_UWB,
257                 "rx_data_max_packets_to_store",
258                 mContext.getResources().getInteger(R.integer.rx_data_max_packets_to_store)
259         );
260 
261         mBackgroundRangingEnabled = DeviceConfig.getBoolean(
262                 DeviceConfig.NAMESPACE_UWB,
263                 "background_ranging_enabled",
264                 mContext.getResources().getBoolean(R.bool.background_ranging_enabled)
265         );
266 
267         mRangingErrorStreakTimerEnabled = DeviceConfig.getBoolean(
268                 DeviceConfig.NAMESPACE_UWB,
269                 "ranging_error_streak_timer_enabled",
270                 mContext.getResources().getBoolean(R.bool.ranging_error_streak_timer_enabled)
271         );
272 
273         mCccRangingStoppedParamsSendEnabled = DeviceConfig.getBoolean(
274                 DeviceConfig.NAMESPACE_UWB,
275                 "ccc_ranging_stopped_params_send_enabled",
276                 mContext.getResources().getBoolean(R.bool.ccc_ranging_stopped_params_send_enabled)
277         );
278 
279         mCccAbsoluteUwbInitiationTimeEnabled = DeviceConfig.getBoolean(
280                 DeviceConfig.NAMESPACE_UWB,
281                 "ccc_absolute_uwb_initiation_time_enabled",
282                 mContext.getResources().getBoolean(R.bool.ccc_absolute_uwb_initiation_time_enabled)
283         );
284 
285         mLocationUseForCountryCodeEnabled = DeviceConfig.getBoolean(
286                 DeviceConfig.NAMESPACE_UWB,
287                 "location_use_for_country_code_enabled",
288                 mContext.getResources().getBoolean(R.bool.location_use_for_country_code_enabled)
289         );
290 
291         mUwbDisabledUntilFirstToggle = DeviceConfig.getBoolean(
292                 DeviceConfig.NAMESPACE_UWB,
293                 "uwb_disabled_until_first_toggle",
294                 mContext.getResources().getBoolean(R.bool.uwb_disabled_until_first_toggle)
295         );
296 
297         mCccSupportedSyncCodesLittleEndian = DeviceConfig.getBoolean(
298                 DeviceConfig.NAMESPACE_UWB,
299                 "ccc_supported_sync_codes_little_endian",
300                 mContext.getResources().getBoolean(R.bool.ccc_supported_sync_codes_little_endian)
301         );
302 
303         mCccSupportedRangeDataNtfConfig = DeviceConfig.getBoolean(
304                 DeviceConfig.NAMESPACE_UWB,
305                 "ccc_supported_range_data_ntf_config",
306                 mContext.getResources().getBoolean(R.bool.ccc_supported_range_data_ntf_config)
307         );
308 
309         mPersistentCacheUseForCountryCodeEnabled = DeviceConfig.getBoolean(
310                 DeviceConfig.NAMESPACE_UWB,
311                 "persistent_cache_use_for_country_code_enabled",
312                 mContext.getResources().getBoolean(
313                         R.bool.persistent_cache_use_for_country_code_enabled)
314         );
315 
316         mHwIdleTurnOffEnabled = DeviceConfig.getBoolean(
317                 DeviceConfig.NAMESPACE_UWB,
318                 "hw_idle_turn_off_enabled",
319                 mContext.getResources().getBoolean(R.bool.hw_idle_turn_off_enabled)
320         );
321 
322         mFusedCountryCodeProviderEnabled = DeviceConfig.getBoolean(
323                 DeviceConfig.NAMESPACE_UWB,
324                 "fused_country_code_provider_enabled",
325                 mContext.getResources().getBoolean(R.bool.fused_country_code_provider_enabled)
326         );
327 
328         mIsAntennaModeConfigSupported = DeviceConfig.getBoolean(
329                 DeviceConfig.NAMESPACE_UWB,
330                 "is_antenna_mode_config_supported",
331                 mContext.getResources().getBoolean(R.bool.is_antenna_mode_config_supported)
332         );
333 
334         // device config override with array is not supported, so just read the resource.
335         mMccMncOemOverrideList = mContext.getResources()
336                 .getStringArray(R.array.mcc_mcc_oem_override_list);
337 
338         mIsRandomHopmodekeySupported = mContext.getResources()
339                 .getBoolean(R.bool.enable_random_hopmodekey);
340 
341         // A little parsing and cleanup:
342         mFrontAzimuthRadiansPerSecond = (float) Math.toRadians(frontAzimuthDegreesPerSecond);
343         mBackAzimuthRadiansPerSecond = (float) Math.toRadians(backAzimuthDegreesPerSecond);
344         mMirrorScoreStdRadians = (float) Math.toRadians(mirrorScoreStdDegrees);
345         mBackNoiseInfluenceCoeff = backNoiseInfluencePercent / 100F;
346         try {
347             mPoseSourceType = PoseSourceType.valueOf(poseSourceName);
348         } catch (IllegalArgumentException e) {
349             mPoseSourceType = PoseSourceType.ROTATION_VECTOR;
350             Log.e(LOG_TAG, "UWB pose source '" + poseSourceName + "' defined in flags or"
351                     + "overlay file is invalid. Defaulting to " + mPoseSourceType.name());
352         }
353         mEnablePrimerFov = mPrimerFovDegree > 0 && mPrimerFovDegree < MAX_FOV;
354 
355         // device config override with array is not supported, so just read the resource.
356         mFiraExtensionForCCCSupported = mContext.getResources()
357                 .getBoolean(R.bool.fira_supported_extension_ccc);
358     }
359 
360     /**
361      * Gets ranging result logging interval in ms
362      */
363     public int getRangingResultLogIntervalMs() {
364         return mRangingResultLogIntervalMs;
365     }
366 
367     /**
368      * Gets the feature flag for reporting device error
369      */
370     public boolean isDeviceErrorBugreportEnabled() {
371         return mDeviceErrorBugreportEnabled;
372     }
373 
374     /**
375      * Gets the feature flag for reporting session init error
376      */
377     public boolean isSessionInitErrorBugreportEnabled() {
378         return mSessionInitErrorBugreportEnabled;
379     }
380 
381     /**
382      * Gets minimum wait time between two bug report captures
383      */
384     public int getBugReportMinIntervalMs() {
385         return mBugReportMinIntervalMs;
386     }
387 
388     /**
389      * Gets the flag for enabling UWB filtering.
390      */
391     public boolean isEnableFilters() {
392         return mEnableFilters;
393     }
394 
395     /**
396      * Gets the percentage (0-100) of inliers to be used in the distance filter cut.
397      */
398     public int getFilterDistanceInliersPercent() {
399         return mFilterDistanceInliersPercent;
400     }
401 
402     /**
403      * Gets the size of the distance filter moving window.
404      */
405     public int getFilterDistanceWindow() {
406         return mFilterDistanceWindow;
407     }
408 
409     /**
410      * Gets the percentage (0-100) of inliers to be used inthe angle filter cut.
411      */
412     public int getFilterAngleInliersPercent() {
413         return mFilterAngleInliersPercent;
414     }
415 
416     /**
417      * Gets the size of the angle filter moving window.
418      */
419     public int getFilterAngleWindow() {
420         return mFilterAngleWindow;
421     }
422 
423     /**
424      * Gets the type of pose source that should be used by default.
425      */
426     public PoseSourceType getPoseSourceType() {
427         return mPoseSourceType;
428     }
429 
430     /**
431      * Gets the flag that enables the elevation estimation primer.
432      */
433     public boolean isEnablePrimerEstElevation() {
434         return mEnablePrimerEstElevation;
435     }
436 
437     /**
438      * Gets the flag that enables the primer that converts AoA to spherical coordinates.
439      */
440     public boolean isEnablePrimerAoA() {
441         return mEnablePrimerAoA;
442     }
443 
444     /**
445      * Gets a value indicating if the FOV primer should be enabled.
446      */
447     public boolean isEnablePrimerFov() {
448         return mEnablePrimerFov;
449     }
450 
451     /**
452      * Gets the configured field of view.
453      */
454     public int getPrimerFovDegree() {
455         return mPrimerFovDegree;
456     }
457 
458     /**
459      * Gets how long to replace reports with an error status with predicted reports in seconds.
460      */
461     public int getPredictionTimeoutSeconds() {
462         return mPredictionTimeoutSeconds;
463     }
464 
465     /**
466      * Gets the flag that enables back-azimuth detection.
467      */
468     public boolean isEnableBackAzimuth() {
469         return mEnableBackAzimuth;
470     }
471 
472     /**
473      * Gets the flag that causes rear azimuth values to be replaced with predictions.
474      */
475     public boolean isEnableBackAzimuthMasking() {
476         return mEnableBackAzimuthMasking;
477     }
478 
479     /**
480      * Gets the size of the back-azimuth detection window.
481      */
482     public int getBackAzimuthWindow() {
483         return mBackAzimuthWindow;
484     }
485 
486     /**
487      * Gets minimum correlation rate required to assume azimuth readings are coming from the front.
488      */
489     public float getFrontAzimuthRadiansPerSecond() {
490         return mFrontAzimuthRadiansPerSecond;
491     }
492 
493     /**
494      * Gets minimum correlation rate required to assume azimuth readings are coming from the back.
495      */
496     public float getBackAzimuthRadiansPerSecond() {
497         return mBackAzimuthRadiansPerSecond;
498     }
499 
500     /**
501      * Gets the standard deviation of the mirror detection bell curve.
502      */
503     public float getMirrorScoreStdRadians() {
504         return mMirrorScoreStdRadians;
505     }
506 
507     /**
508      * Gets a coefficient of how much noise adds to the back-facing mirroring score.
509      */
510     public float getBackNoiseInfluenceCoeff() {
511         return mBackNoiseInfluenceCoeff;
512     }
513 
514     /**
515      * Gets the Advertising Profile AoA Criteria Angle.
516      */
517     public int getAdvertiseAoaCriteriaAngle() {
518         return mAdvertiseAoaCriteriaAngle;
519     }
520 
521     /**
522      * Gets the Advertising profile time threshold (for the received Owr Aoa Measurements).
523      */
524     public int getAdvertiseTimeThresholdMillis() {
525         return mAdvertiseTimeThresholdMillis;
526     }
527 
528     /**
529      * Gets the Advertising profile Array Size (of the stored values from Owr Aoa Measurements).
530      */
531     public int getAdvertiseArraySizeToCheck() {
532         return mAdvertiseArraySizeToCheck;
533     }
534 
535     /**
536      * Gets the Advertising profile Array Start Index (of the stored values from Owr Aoa
537      * Measurements), which we will use to calculate Variance.
538      */
539     public int getAdvertiseArrayStartIndexToCalVariance() {
540         return mAdvertiseArrayStartIndexToCalVariance;
541     }
542 
543     /**
544      * Gets the Advertising profile Array End Index (of the stored values from Owr Aoa
545      * Measurements), which we will use to calculate Variance.
546      */
547     public int getAdvertiseArrayEndIndexToCalVariance() {
548         return mAdvertiseArrayEndIndexToCalVariance;
549     }
550 
551     /**
552      * Gets the Advertising profile Trusted Variance Value (the threshold within which computed
553      * variance from the Owr Aoa Measurements is acceptable).
554      */
555     public int getAdvertiseTrustedVarianceValue() {
556         return mAdvertiseTrustedVarianceValue;
557     }
558 
559     /**
560      * Gets the max number of Rx data packets (received on a UWB session from the remote device),
561      * to be stored in the UWB framework.
562      */
563     public int getRxDataMaxPacketsToStore() {
564         return mRxDataMaxPacketsToStore;
565     }
566 
567     /**
568      * Returns whether background ranging is enabled or not.
569      * If enabled:
570      *  * Background 3p apps are allowed to open new ranging sessions
571      *  * When previously foreground 3p apps moves to background, sessions are not terminated
572      */
573     public boolean isBackgroundRangingEnabled() {
574         return mBackgroundRangingEnabled;
575     }
576 
577     /**
578      * Returns whether ranging error streak timer is enabled or not.
579      * If disabled, session would not be automatically stopped if there is no peer available.
580      */
581     public boolean isRangingErrorStreakTimerEnabled() {
582         return mRangingErrorStreakTimerEnabled;
583     }
584 
585     /**
586      * Returns whether to send ranging stopped params for CCC session stop or not.
587      * If enabled, newly added `CccRangingStoppedParams` are sent in `onStopped()` callback.
588      */
589     public boolean isCccRangingStoppedParamsSendEnabled() {
590         return mCccRangingStoppedParamsSendEnabled;
591     }
592 
593     /**
594      * Returns whether an absolute UWB initiation time should be computed and configured for
595      * CCC ranging session(s).
596      * If disabled, a relative UWB initiation time (the value in CCCStartRangingParams), is
597      * configured for the CCC ranging session.
598      */
599     public boolean isCccAbsoluteUwbInitiationTimeEnabled() {
600         return mCccAbsoluteUwbInitiationTimeEnabled;
601     }
602 
603     /**
604      * Returns whether to use location APIs in the algorithm to determine country code or not.
605      * If disabled, will use other sources (telephony, wifi, etc) to determine device location for
606      * UWB regulatory purposes.
607      */
608     public boolean isLocationUseForCountryCodeEnabled() {
609         return mLocationUseForCountryCodeEnabled;
610     }
611 
612     /**
613      * Returns whether to disable uwb until first toggle or not.
614      * If enabled, UWB will remain disabled on boot until the user toggles UWB on for the
615      * first time.
616      */
617     public boolean isUwbDisabledUntilFirstToggle() {
618         return mUwbDisabledUntilFirstToggle;
619     }
620 
621     /**
622      * Returns whether CCC supported sync codes value is interpreted as little endian.
623      */
624     public boolean isCccSupportedSyncCodesLittleEndian() {
625         return mCccSupportedSyncCodesLittleEndian;
626     }
627 
628     /**
629      * Returns whether the RANGE_DATA_NTF_CONFIG and related fields are supported (ie, should be
630      * configured), for a CCC ranging session.
631      */
632     public boolean isCccSupportedRangeDataNtfConfig() {
633         return mCccSupportedRangeDataNtfConfig;
634     }
635 
636     /**
637      * Returns whether to use persistent cache in the algorithm to determine country code or not.
638      */
639     public boolean isPersistentCacheUseForCountryCodeEnabled() {
640         return mPersistentCacheUseForCountryCodeEnabled;
641     }
642 
643     /**
644      * Returns whether hardware idle turn off is enabled or not.
645      */
646     public boolean isHwIdleTurnOffEnabled() {
647         return mHwIdleTurnOffEnabled;
648     }
649 
650     /**
651      * Returns whether used country code provider is enabled or not.
652      */
653     public boolean isFusedCountryCodeProviderEnabled() {
654         return mFusedCountryCodeProviderEnabled;
655     }
656 
657     /**
658      * Returns whether antenna mode configuration is supported or not.
659      */
660     public boolean isAntennaModeConfigSupported() { return mIsAntennaModeConfigSupported; }
661 
662     /**
663      * Returns array of mcc/mnc where oem override country code should be used.
664      * Empty array means no override.
665      */
666     public String[] getMccMncOemOverrideList() {
667         return mMccMncOemOverrideList;
668     }
669 
670      /**
671      * Returns whether random hopmodekey is supported or not.
672      */
673     public boolean isRandomHopmodekeySupported() {
674         return mIsRandomHopmodekeySupported;
675     }
676 
677     /**
678      * Returns whether FiRa CCC capability UCI Specification applied or not.
679      */
680     public boolean isFiraSupportedExtensionForCCC() {
681         return mFiraExtensionForCCCSupported;
682     }
683 }
684