Current network bonus score adjustment

make current network bonus more dynamic across RSSI and throughput:
1) a minimum bonus score X (currently 20)
2) a potentially larger value (Y percent of current score)
Take a maximum of these two values.
Both X and Y are configurable through overlay. This makes network more sticky at high RSSI/throughput cases.

The above bonus score is not applied if current network is not internet validated and user doesn't expect it.

Bug: 153447053
Bug: 153662212
Test: atest com.android.server.wifi
Change-Id: Ia75fd6945b8d3f5837c08ff2a983ec883920376f
diff --git a/service/res/values/config.xml b/service/res/values/config.xml
index 4d351b1..183e725 100644
--- a/service/res/values/config.xml
+++ b/service/res/values/config.xml
@@ -89,8 +89,11 @@
          These values can be reduced to allow overlapping between categories. -->
     <integer translatable="false" name="config_wifiFrameworkSavedNetworkBonus">500</integer>
     <integer translatable="false" name="config_wifiFrameworkUnmeteredNetworkBonus">1000</integer>
-
-    <integer translatable="false" name="config_wifiFrameworkCurrentNetworkBonus">20</integer>
+    <!-- Integer specifying the minimum bonus for current network -->
+    <integer translatable="false" name="config_wifiFrameworkCurrentNetworkBonusMin">20</integer>
+    <!-- Integer specifying the percent bonus for current network. The percent is applied to
+         the sum of rssi base score and throughput score-->
+    <integer translatable="false" name="config_wifiFrameworkCurrentNetworkBonusPercent">20</integer>
     <integer translatable="false" name="config_wifiFrameworkSecureNetworkBonus">10</integer>
 
     <!-- The duration in minutes to strongly favor the last-selected network over other options. -->