Skip to content

Commit

Permalink
msm8974-common: Allow to disable the new scan API for manual network …
Browse files Browse the repository at this point in the history
…search.

The implementation to attempt new API and then fallback after
error is generic but may be not efficient. For the devices that
is not capable of using new API, it lengthens the network search
because of the new API scan trial in the first place and may fail
if the error is not properly caught.
(Refer to Ifebbac9965a40acaff0d50d32ca8603c72a6a77f for details)

As an alternative, this commit provides a config for devices that
are known as not capable of using new API to disable new API scan
and start network search through old API directly.
  • Loading branch information
nicorg2515 authored and ArianK16a committed Jun 7, 2019
1 parent 551cba8 commit bdc438f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions overlay-lineage/packages/services/Telephony/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!-- NOTE: Many variables that used to be in this file have been migrated to
CarrierConfigManager.java. Please consider whether new variables belong
there before adding to this file. Variables here should be more closely
related to devices than to networks. -->

<!-- Phone app resources that may need to be customized
for different hardware or product builds. -->
<resources>
<!-- Flag indicating if network query through TelephonyManager.requestNetworkScan() should be
disabled.
If set to true, it will send network query through Phone.getAvailableNetworks() directly
rather than attempt to query through TelephonyManager.requestNetworkScan() first. -->
<bool name="config_disable_TelephonyManager_network_scan">true</bool>
</resources>

0 comments on commit bdc438f

Please sign in to comment.