Personalized settings

The Android Settings app provides a list of suggestions to the users in Android 8.0. These suggestions typically promote features of the phone, and they are customizable (e.g., "Set Do Not Disturb schedule" or "Turn on Wi-Fi Calling"). This feature provides ranking for suggestions, based on any contextual signal or the user's past interactions with suggestions.

The current default Android Open Source Project (AOSP) ranking model is based on user's previous interactions with the suggestion, which is a simple linear model trained with logistic regression to properly weight the interaction signals. The default implementation uses suggestions shown, clicked or dismissed as indicators along with the recency of these events to rank the suggestions and increase the chance of predicting a user's interaction with these suggestions. This model was built with a limited amount of logged user data. Device manufacturers (OEMs) can develop their own ranking model based on any collected data and potentially include contextual signals and calibrate the ranking.

Implementation

Find the default packages/apps/Settings/src/com/android/settings/dashboard/suggestions/SuggestionRanker.java implementation in AOSP.

This feature is guarded by a flag, isSmartSuggestionEnabled, which is set to false by default. If enabled (set to true), the feature operates without additional modification using the default AOSP implementation. OEMs can either use the default implementation or introduce their own implementation to enable this feature.

OEMs may customize the feature by implementing platform/packages/apps/Settings/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProvider.java feature and Overriding the file's rankSuggestions method. This method gets two lists containing suggestion Tiles and the corresponding suggestionIds. This method should reorder the tiles in the list only according to the desired ranking score. The suggestionIds can be used to uniquely identify suggestions and extract the required past information about the suggestion, depending on the ranking implementation (e.g., recency of interaction with this particular suggestion).

Validation

Implementers can ensure their version of the feature works as intended by writing their own unit tests similar to packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionRankerTest.java to verify the ranking.