Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d52f79b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Define a new config key for the recommendation provider app."

parents 040e425b 27d14c46
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1286,6 +1286,16 @@
        <item>com.android.networkrecommendation</item>
    </string-array>

    <!-- The package name of the default network recommendation app.
         A network recommendation provider must:
             * Be granted the SCORE_NETWORKS permission.
             * Include a Service for the android.net.scoring.RECOMMEND_NETWORKS action
               protected by the BIND_NETWORK_RECOMMENDATION_SERVICE permission.

         This must be set to a valid network recommendation app.
     -->
    <string name="config_defaultNetworkRecommendationProviderPackage" translatable="false">com.android.networkrecommendation</string>

    <!-- Whether to enable Hardware FLP overlay which allows Hardware FLP to be
         replaced by an app at run-time. When disabled, only the
         config_hardwareFlpPackageName package will be searched for Hardware Flp,
+1 −0
Original line number Diff line number Diff line
@@ -2790,6 +2790,7 @@

  <!-- Network Recommendation -->
  <java-symbol type="array" name="config_networkRecommendationPackageNames" />
  <java-symbol type="string" name="config_defaultNetworkRecommendationProviderPackage" />

  <!-- Whether allow 3rd party apps on internal storage. -->
  <java-symbol type="bool" name="config_allow3rdPartyAppOnInternal" />
+0 −3
Original line number Diff line number Diff line
@@ -227,7 +227,4 @@

    <!--  default setting for Settings.System.END_BUTTON_BEHAVIOR : END_BUTTON_BEHAVIOR_SLEEP -->
    <integer name="def_end_button_behavior">0x2</integer>

    <!--Default settings for network recommendations. -->
    <string name="def_network_recommendations_package" translatable="false">com.android.networkrecommendation</string>
</resources>
+1 −18
Original line number Diff line number Diff line
@@ -3182,24 +3182,7 @@ public class SettingsProvider extends ContentProvider {
                }

                if (currentVersion == 138) {
                    // Version 139: Applying the default to NETWORK_RECOMMENDATIONS_PACKAGE
                    if (userId == UserHandle.USER_SYSTEM) {
                        final SettingsState globalSettings = getGlobalSettingsLocked();
                        final String defaultAppPackage = getContext().getResources()
                                .getString(R.string.def_network_recommendations_package);

                        // Set the network recommendations package name
                        globalSettings.insertSettingLocked(
                                Global.NETWORK_RECOMMENDATIONS_PACKAGE,
                                defaultAppPackage, null, true,
                                SettingsState.SYSTEM_PACKAGE_NAME);

                        // Clear the scorer setting since it's no longer needed.
                        globalSettings.insertSettingLocked(
                                Global.NETWORK_SCORER_APP,
                                null, null, true,
                                SettingsState.SYSTEM_PACKAGE_NAME);
                    }
                    // Version 139: Removed.
                    currentVersion = 139;
                }