Skip to content

Commit

Permalink
Add force enabled backends array
Browse files Browse the repository at this point in the history
* For easy use on adding default backends as overlay or rro
  • Loading branch information
erfanoabdi committed Nov 18, 2020
1 parent bfd8c2d commit a92a60c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ class UnifiedLocationClient private constructor(context: Context) {
} catch (e: Exception) {
Log.w(TAG, "Failed to register location callback", e)
}
context.get()?.resources?.getStringArray(R.array.force_location_backends)?.let { setLocationBackends(it + getLocationBackends()) }
context.get()?.resources?.getStringArray(R.array.force_geocoder_backends)?.let { setGeocoderBackends(it + getGeocoderBackends()) }
updateServiceInterval()
if (continuations.size > 0) {
Log.d(TAG, "Resuming ${continuations.size} continuations")
Expand Down
24 changes: 24 additions & 0 deletions client/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013-2020 microG Project Team
~
~ 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.
-->

<resources>
<string-array name="force_location_backends" translatable="false">
</string-array>

<string-array name="force_geocoder_backends" translatable="false">
</string-array>
</resources>

0 comments on commit a92a60c

Please sign in to comment.