History log of /frameworks/base/core/java/android/net/NetworkScorerAppManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
161977998feebf0a855ea56558464470877040cf 04-Nov-2014 Jeff Davidson <jpd@google.com> Rename BROADCAST_SCORE_NETWORKS to BROADCAST_NETWORK_PRIVILEGED.

This is necessary/desired for two reasons:

1. UX around network scoring shipped with L despite lacking underlying
platform support. We do not want network scoring applications to
trigger this UX on L devices, and therefore we must break the contract
of what defines a network scorer so that apps build against the new
contract don't trigger the old UX.

2. As a start towards generalizing the term "score" for a potentially
broader role in the future, though that role is very much undefined.

Bug: 18160480
Change-Id: If228977513e32e45bc44dbeda24aa18436fdfca6
/frameworks/base/core/java/android/net/NetworkScorerAppManager.java
ac7285dc1e13f30d59dad30fe2ad1116e5f676cb 09-Aug-2014 Jeff Davidson <jpd@google.com> Security-related cleanup for network scoring.

-Perform additional checks for the SCORE_NETWORKS permission when
broadcasting scoring requests to the active scorer and when accepting
score updates. In theory, these checks are unnecessary as we manually
check package manager when obtaining the list of valid scorers, but
they cannot hurt to add.

-Fix multi-user. Since the active scorer is a global setting, we
ensure that scoring can only be done by apps available to the primary
user / owner of the phone, and that the request scores broadcast is
sent to that user's profile. When the scorer is changed, we send that
to all user profiles as it's just informational, although it's
unlikely that apps outside the primary user's profile would need to
respond.

Bug: 14117916
Bug: 16399238
Change-Id: Iaf06bda244eec730b590a30a3f4ffab4965bde96
/frameworks/base/core/java/android/net/NetworkScorerAppManager.java
b6646a8987a8ce6abd34cc05d9ca0193a6d7bea9 28-Jun-2014 Jeff Davidson <jpd@google.com> Allow network scorers to provide an opt-in activity.

A candidate scorer may have an activity registered to listen for the
ACTION_CUSTOM_ENABLE intent action. If so, when the user attempts to
select this scorer as the active one, this custom activity will be
launched and will be responsible for requesting that the framework
activate the scorer. This is to enable more complex opt-in flows prior
to becoming the active scorer.

Scorers which do not specify this activity will default to using the
framework switcher (currently ActiveNetworkScorerDialog, though this
may change).

Note that all switches must still go through the framework switcher;
the opt-in activity simply allows scorers to first show another screen
and perform the framework switch on their own terms.

Bug: 15775314
Change-Id: I3847e5d3161a8fcc9622abc03218795697c32778
/frameworks/base/core/java/android/net/NetworkScorerAppManager.java
c741553644f8b19c63938ab9e36af1721c2cfa34 24-Jun-2014 Jeff Davidson <jpd@google.com> Use/expose the receiver's label as the scorer name.

Allows scorer apps to set a custom name for the scoring functionality,
even if the app has other non-scoring responsibilities, in which case
the application's label would be too generic.

Bug: 15775300
Change-Id: I61a7d1966742d463508e6801b7845ced8392db84
/frameworks/base/core/java/android/net/NetworkScorerAppManager.java
ee2a1219d3c59d88c83fca65289166fa9d7e53e9 17-Apr-2014 Jeff Davidson <jpd@google.com> API tweaks for network score settings.

Expose "isAppValidScorer" so Settings can call it.

Also rename ACTION_CHANGE_DEFAULT to ACTION_CHANGE_ACTIVE for
consistency with other naming.

Change-Id: I6c2d0099622958f06c2916ca76090e14d5273c86
/frameworks/base/core/java/android/net/NetworkScorerAppManager.java
6a4b220f1263d95fdefe6361c2bc87bbb04bbed0 17-Apr-2014 Jeff Davidson <jpd@google.com> Initial implementation of NetworkScoreManager's backing service.

This service will ultimately be responsible for propagating scores
down to lower-level network subsystems. For now, it just keeps scores
in memory and exposes these for debugging purposes via "adb shell
dumpsys network_score".

This change also adds provisioning of a default scorer. When
NetworkScoreService is first initialized, it checks to see if it has
ever set a default scorer; if not, it reads a package name from a
build config property and attempts to set it as the default.

Also add autogenerated equals/hashCode methods to all parcelables.

Bug: 14111427
Bug: 13786258
Change-Id: I02271171653d42e12acd240b73b9e23950744f6b
/frameworks/base/core/java/android/net/NetworkScorerAppManager.java