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

Commit 7be8e972 authored by Jeff Davidson's avatar Jeff Davidson
Browse files

Expose network scoring APIs to /system apps.

Ideally, we'd only expose the methods that we intend unbundled apps to
call (e.g. not NetworkScoreManager#setActiveScorer, which should only
be called by Settings), but this isn't harmful in terms of permissions
as the APIs still check security appropriately.

Bug: 15833200
Change-Id: I2047515b41c8be0cf7cb51dd495fe72309c05f68
parent 8b4649c2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.net;

import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;

@@ -26,6 +27,7 @@ import java.util.Objects;
 *
 * @hide
 */
@SystemApi
// NOTE: Ideally, we would abstract away the details of what identifies a network of a specific
// type, so that all networks appear the same and can be scored without concern to the network type
// itself. However, because no such cross-type identifier currently exists in the Android framework,
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.net;

import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.content.Context;
import android.content.Intent;
import android.net.NetworkScorerAppManager.NetworkScorerAppData;
@@ -52,6 +53,7 @@ import android.os.ServiceManager;
 *
 * @hide
 */
@SystemApi
public class NetworkScoreManager {
    /**
     * Activity action: ask the user to change the active network scorer. This will show a dialog
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.net;

import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;

@@ -49,6 +50,7 @@ import java.util.Objects;
 * @see ScoredNetwork
 * @hide
 */
@SystemApi
public class RssiCurve implements Parcelable {

    /** The starting dBm of the curve. */
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.net;

import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;

@@ -26,6 +27,7 @@ import java.util.Objects;
 *
 * @hide
 */
@SystemApi
public class ScoredNetwork implements Parcelable {

    /** A {@link NetworkKey} uniquely identifying this network. */
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.net;

import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;

@@ -28,6 +29,7 @@ import java.util.regex.Pattern;
 *
 * @hide
 */
@SystemApi
public class WifiKey implements Parcelable {

    // Patterns used for validation.
Loading