Merge "Keep Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED updated."
This commit is contained in:
committed by
Android (Google) Code Review
commit
1966cccd32
@@ -171,6 +171,43 @@ public class NetworkScoreManager {
|
||||
*/
|
||||
public static final int CACHE_FILTER_SCAN_RESULTS = 2;
|
||||
|
||||
/** @hide */
|
||||
@IntDef({RECOMMENDATIONS_ENABLED_FORCED_OFF, RECOMMENDATIONS_ENABLED_OFF,
|
||||
RECOMMENDATIONS_ENABLED_ON})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface RecommendationsEnabledSetting {}
|
||||
|
||||
/**
|
||||
* Recommendations have been forced off.
|
||||
* <p>
|
||||
* This value is never set by any of the NetworkScore classes, it must be set via other means.
|
||||
* This state is also "sticky" and we won't transition out of this state once entered. To move
|
||||
* to a different state this value has to be explicitly set to a different value via
|
||||
* other means.
|
||||
* @hide
|
||||
*/
|
||||
public static final int RECOMMENDATIONS_ENABLED_FORCED_OFF = -1;
|
||||
|
||||
/**
|
||||
* Recommendations are not enabled.
|
||||
* <p>
|
||||
* This is a transient state that can be entered when the default recommendation app is enabled
|
||||
* but no longer valid. This state will transition to RECOMMENDATIONS_ENABLED_ON when a valid
|
||||
* recommendation app is enabled.
|
||||
* @hide
|
||||
*/
|
||||
public static final int RECOMMENDATIONS_ENABLED_OFF = 0;
|
||||
|
||||
/**
|
||||
* Recommendations are enabled.
|
||||
* <p>
|
||||
* This is a transient state that means a valid recommendation app is active. This state will
|
||||
* transition to RECOMMENDATIONS_ENABLED_OFF if the current and default recommendation apps
|
||||
* become invalid.
|
||||
* @hide
|
||||
*/
|
||||
public static final int RECOMMENDATIONS_ENABLED_ON = 1;
|
||||
|
||||
private final Context mContext;
|
||||
private final INetworkScoreService mService;
|
||||
|
||||
|
||||
@@ -8234,7 +8234,14 @@ public final class Settings {
|
||||
* Value to specify if network recommendations from
|
||||
* {@link com.android.server.NetworkScoreService} are enabled.
|
||||
*
|
||||
* Type: int (0 for false, 1 for true)
|
||||
* Type: int
|
||||
* Valid values:
|
||||
* -1 = Forced off
|
||||
* 0 = Disabled
|
||||
* 1 = Enabled
|
||||
*
|
||||
* Most readers of this setting should simply check if value == 1 to determined the
|
||||
* enabled state.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
|
||||
Reference in New Issue
Block a user