History log of /frameworks/base/core/java/android/net/NetworkScoreManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1588b3b0342bc652ad30b58adf24d547cb6f2992 12-Aug-2017 Jeremy Joslin <jjoslin@google.com> Cleaned up the permission checks in NetworkScoreService

Refactored the existing code into 3 permission check methods
to clear up what was being checked and to centralize the logic.

Bug:64313251
Test: bit services FrameworksServicesTests:com.android.server.NetworkScoreServiceTest
Test: bit FrameworksWifiTests:*
Test: gts-tradefed run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.netrec.NetRecHostTest
Change-Id: I77457ce7cf98252e83f4dfa6602da0179d638818
/frameworks/base/core/java/android/net/NetworkScoreManager.java
66042e0caf4c2eeb2dddd62cd6464b25f6aec718 14-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add permission checks to getActiveScorerPackage()." into oc-mr1-dev
2d55b186358a0b9473b0a5c5c0344476526a4b3d 12-Jul-2017 Jeremy Joslin <jjoslin@google.com> Add permission checks to getActiveScorerPackage().

Added and documented checks for REQUEST_NETWORK_SCORES
and SCORE_NETWORKS.

Bug: 62347124
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Test: gts-tradefed run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.netrec.NetRecHostTest
Change-Id: Ibeba7079b3d4a75e11aa0ede6ad2be1c7d48324f
/frameworks/base/core/java/android/net/NetworkScoreManager.java
59502ebcfd7c5629cda69326073c7717f3aa3d0e 15-Jul-2017 Jeremy Joslin <jjoslin@google.com> NetworkRecommendationProviders require the location permission.

Any NetworkRecommendationProvider bound to by the system must have
access to location (i.e. it holds the location permission and
location is enabled on the device).

If the location permission is revoked then the binding will be
disconnected and the system will revert to the default network
recommendation provider (if set and valid). If location access
is disabled on the device then the binding will be disconnected
but the system won't fall back to the default provider (because
it won't have location either), instead the current provider will
be re-enabled when location access is enabled again.

BUG:62263953
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Test: runtest frameworks-services -c com.android.server.NetworkScorerAppManagerTest
Change-Id: I93c37eeda47840d92f3ca52767e878dc19b46740
(cherry picked from commit d816abe97bce389dc0f56f3f2553b07483eca125)
/frameworks/base/core/java/android/net/NetworkScoreManager.java
d86b8fea43ebb6e5c31691b44d8ceb0d8d3c9072 03-Jun-2017 Jeff Sharkey <jsharkey@android.com> Annotate @SystemApi with required permissions.

Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
/frameworks/base/core/java/android/net/NetworkScoreManager.java
a9f933e53a6f4cf6152b0525cfafc602e5c3798f 28-Apr-2017 Jeremy Joslin <jjoslin@google.com> Revert permission check on setActiveScorer.

Reverted to the pre-O behavior of allowing the call if the caller
has the SCORE_NETWORKS permission.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 37722313
Change-Id: I54a99dde364d6a5c88d35072922020542c6ae003
/frameworks/base/core/java/android/net/NetworkScoreManager.java
b1a0139590448d706c778d22891efe80b05f11f2 14-Apr-2017 Jeremy Joslin <jjoslin@google.com> Remove the recommendation request impl and test code.

Removing most of the platform side request recommendation code and
its tests.

Test: adb shell am instrument -e class android.net.NetworkRecommendationProviderTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 37357264
Change-Id: I36e592c5c82c38aa2174a51cf02c6e9825ef4f11
/frameworks/base/core/java/android/net/NetworkScoreManager.java
d601360904df9b811205f44f15c89f12703d6d72 24-Mar-2017 Amin Shaikh <ashaikh@google.com> Parse NotificationChannel ID meta-data.

- Add this new meta-data field on NetworkRecommendationProvider to NetworkScorerAppData

Bug: 36571359
Test: runtest frameworks-services
Change-Id: Ic8c594bea406fc5183a4919b808bce5159912650
/frameworks/base/core/java/android/net/NetworkScoreManager.java
6487a2ff982035a65ab1dc6a8c4c1ed6f6af3979 11-Mar-2017 Joe LaPenna <jlapenna@google.com> Mark NetworkScoreManager.requestRecommendations hidden.

There are no instances of this call in master outside of platform.

BUG: 34169232
Test: make update-api; make; fastboot flashall

Change-Id: I4555af5487291097ca3768fdf071c4db7dd21288
/frameworks/base/core/java/android/net/NetworkScoreManager.java
9925c6a7e703a1267aef47d4b17c494d1fedb162 06-Mar-2017 Jeremy Joslin <jjoslin@google.com> Keep Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED updated.

Make sure Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED reflects
the current active scorer state. When valid the setting will have a
value of 1, when invalid it will be 0 (or more
accurately not 1, see below).

Introduced a new valid setting value, -1, which indicates the feature
has been forced off.

Test: runtest frameworks-services -c com.android.server.NetworkScorerAppManagerTest
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 35896421
Change-Id: I271725f798e5d0acc7c08c79678dba5115f8faad
/frameworks/base/core/java/android/net/NetworkScoreManager.java
8b1339af53c3e3287cfb98eb25c69f31739923e6 01-Mar-2017 Stephen Chen <stewchen@google.com> Add a network scorer label metadata field to NetworkScoreAppData

This field allows Network Score Services to pass an alternate label for
the scorer.

Bug: 35848510
Test: runtest --path
frameworks/base/services/tests/servicestests/src/com/android/server/NetworkScorerAppManagerTest.java
runtest --path
frameworks/base/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java

Change-Id: Ic28671c1663bd08b2406045d20c150a209d56054
/frameworks/base/core/java/android/net/NetworkScoreManager.java
e9052a3cbc1d8580f48548927a108d7d8262911a 28-Feb-2017 Jeremy Joslin <jjoslin@google.com> Cleanup else blocks on security checks.

Addresses post-submit comments from ag/1922454.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 35095406
Change-Id: Idccad9400f4f6ae4708b03d6b3a66373683f635b
/frameworks/base/core/java/android/net/NetworkScoreManager.java
f621bc973380bb87013c503f7daaf25fd0b94721 16-Feb-2017 Jeremy Joslin <jjoslin@google.com> Move NetworkScorerAppManager into com.android.server.

NetworkScorerAppManager is only used internally by the
NetworkScoreService and no longer needs to be part of core.
Extracted its inner class, NetworkScorerAppData, into a top-level
class and left it in android.net as it's used as part of the
NetworkScoreManager API.

Test: runtest frameworks-services -c com.android.server.NetworkScorerAppManagerTest
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 35095406
Change-Id: I201f081e05d0a909b4ae3142b63afc3e21548f77
/frameworks/base/core/java/android/net/NetworkScoreManager.java
bc9a8e6f5ba404261c6a7a7e49a529661e05e910 03-Feb-2017 Amin Shaikh <ashaikh@google.com> Add "Use open Wi-Fi automatically" setting.

- Add constant in NetworkScoreManager for the meta-data key required
for NetworkRecommendationProviders to specify which package provides
this feature.
- Add Setting to specify which package is enabled for providing this
feature.

Bug: 34773276
Test: make
Change-Id: I3f8209c21b8b219c242650f97ba407b5985a5250
/frameworks/base/core/java/android/net/NetworkScoreManager.java
f95c865411e30a9760ab381849173acadf969e9d 10-Feb-2017 Jeremy Joslin <jjoslin@google.com> Adding a new internal method to get all valid scorers.

New NetworkScoreManager method to get all valid scorers from the
NetworkScoreService. The implementation is stubbed out for the time
being.

Test: make
Bug: 35095406
Change-Id: Iece2cc10a0a9377f2d82385d172b06660bb9b130
/frameworks/base/core/java/android/net/NetworkScoreManager.java
a5172f69ca02f5338b4c36ad5e9b57b9fb4fd8d2 02-Feb-2017 Jeremy Joslin <jjoslin@google.com> New internal interface method to get the active scorer metadata.

Returns the cached NetworkScorerAppData from the connected service.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34773276
Change-Id: Ia8986e770c4ede0c0f7e2ad4f5bc0a0117a9ae2b
/frameworks/base/core/java/android/net/NetworkScoreManager.java
a480795e34485f10c235486fa780764afa179188 18-Jan-2017 Jeremy Joslin <jjoslin@google.com> Have requestRecommendation return a CompletableFuture.

Reworked the new requestRecommendation call to return a
CompletableFuture instead of using a custom callback.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33784158
Change-Id: If24a94eb6289cb1952052b2cc3bc7856ce2192a5
/frameworks/base/core/java/android/net/NetworkScoreManager.java
998d7ca56a1268a1249e2678e529caf4e8fd95ca 29-Dec-2016 Jeremy Joslin <jjoslin@google.com> Async network recommendation requests.

Exposing a new hidden API method that allows network recommendations
to be requested asynchronously.

Test: Built & run.
BUG:33784158
Change-Id: I8f84b09f43a6c5fae5d8f03ec01e75c25b4b62d6
/frameworks/base/core/java/android/net/NetworkScoreManager.java
6c1ca280b3bf5646afd5f0ef57beceb52233c782 10-Jan-2017 Jeremy Joslin <jjoslin@google.com> Move getActiveScorerPackage() to the score service.

Implemented getActiveScorerPackage() in the NetworkScoreService to
make it more efficient (no need to query PM).

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33781558
Change-Id: I2144351c2c09cad30f80399069364f3572e38445
/frameworks/base/core/java/android/net/NetworkScoreManager.java
134c9d3311debd96aa63510835d31465e97155e1 10-Jan-2017 Jeremy Joslin <jjoslin@google.com> Moved isCallerActiveScorer() to the score service.

Implemented isCallerActiveScorer() in the NetworkScoreService to make
it more efficient (no need to query PM). Exposed the call as a new
internal API on NetworkScoreManager and deprecated the call on
NetworkScorerAppManager.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33781558
Change-Id: I0e2142af95b068d322343f7c9362ac53d46b545e
/frameworks/base/core/java/android/net/NetworkScoreManager.java
5519d7cf71eefba0009d8b8b5b38e71d9001dfb8 06-Jan-2017 Jeremy Joslin <jjoslin@google.com> Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33752149
Change-Id: I7d91fa9a4f6ef4f9170c6af98567ce443c805e74
/frameworks/base/core/java/android/net/NetworkScoreManager.java
145c34316649ba0a5cdb8f7954a63419785f379d 09-Dec-2016 Jeremy Joslin <jjoslin@google.com> Implement the request and recommend calls.

Implemented requestRecommendation() and requestScores() to call
through to the bound network recommendation provider if available.

BUG: 33593157
BUG: 33668692
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Change-Id: I8e2ed73dc6876deb1a8bd47bcaeaca8db68f3a44
/frameworks/base/core/java/android/net/NetworkScoreManager.java
fa4f08ecee6579b1a4e4503312956ea19dd0b80e 06-Dec-2016 Jeremy Joslin <jjoslin@google.com> Implement the discovery of a network recommendation provider.

Updated the NetworkScorerAppManager to examine the list of configured
network recommendation providers and to select the first valid
provider.

As part of this update the old logic of looking for a valid network
scorer has been removed. Scorers/recommendation providers are only
selected from the configured list now. The setActiveScorer() method
has been deprecated as a result.

The NetworkScoreService has been updated to monitor the list of
potential recommendation providers and to reevaluate the binding
whenever they change. It also monitors the new setting for
NETWORK_RECOMMENDATIONS_ENABLED to connect or disconnect from the
provider as needed.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33158362
Change-Id: I42aeb5223da794f71f7e58cb1bdf18817200cbf2
/frameworks/base/core/java/android/net/NetworkScoreManager.java
c5ac587bf3bd23a18964f1344da5e71236012014 01-Dec-2016 Jeremy Joslin <jjoslin@google.com> Update registerNetworkScoreCache() to accept a filter type.

Defined a new IntDef in NetworkScoreManager named CacheUpdateFilter
with 3 values. Caches must be registered with a filter value and will
only receive updates based on their registered filter. Actual
filtering implementation will follow.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 32912120
Change-Id: I8940e0ed1a7bbcb5a81fb3b6a7fafe4fbbc33875
/frameworks/base/core/java/android/net/NetworkScoreManager.java
38724a234d8d45b25fa8c38eba637a30c4212a9b 08-Dec-2016 Amin Shaikh <ashaikh@google.com> Merge "Support multiple caches in NetworkScoreService." am: 78f3f0049e am: a7c0b73971 am: b45a4a5d1b
am: 5456cdbc27

Change-Id: I421cff1c47959c40088a31f72556630a8acd007e
972e236e84fd4073f7ecc40f2de326b388203dfb 07-Dec-2016 Amin Shaikh <ashaikh@google.com> Support multiple caches in NetworkScoreService.

- Use RemoteCallbackList for managing multiple callbacks
- Add unregisterNetworkScoreCache to the service interface
- Added NetworkScoreServiceTest

Test: runtest frameworks-services

Bug: 32913019
Change-Id: I16ca1682acca9cbe403812e520394688a026414b
/frameworks/base/core/java/android/net/NetworkScoreManager.java
d1daf6d22aeb502c0f94261f3421999c2da6ee51 29-Nov-2016 Jeremy Joslin <jjoslin@google.com> API for requesting network recommendations.

Defining a new system API that will allow the system to request
network recommendations from a NetworkScoreService implementation.

Test: Coming in a future CL.
BUG: 32909424
Merged-In: I2d5c0a843b928b04e87c1862a78702a02fd54c31
Change-Id: Idd33095c6cd2f5b391796c900399f18a2c40fcc3
/frameworks/base/core/java/android/net/NetworkScoreManager.java
1397837af370206fea01247fae7cf77228b08037 29-Nov-2016 Jeremy Joslin <jjoslin@google.com> API for requesting network recommendations.

Defining a new system API that will allow the system to request
network recommendations from a NetworkScoreService implementation.

Test: Coming after the API is approved.
BUG: 32909424
Change-Id: I2d5c0a843b928b04e87c1862a78702a02fd54c31
/frameworks/base/core/java/android/net/NetworkScoreManager.java
fb0cd672645725b84dedbad8868dded57ac0ab6a 01-Dec-2016 Amin Shaikh <ashaikh@google.com> Merge "Refactor NetworkScoreAppManager for testing." am: 3af97482f1 am: a8fc97d2de am: d136025272
am: f9f477454e

Change-Id: Ied1038387d5be28a4d723b71dc633ed035125c1b
aa09aa02103954735b432fa3f7c41ee235bac9fd 22-Nov-2016 Amin Shaikh <ashaikh@google.com> Refactor NetworkScoreAppManager for testing.

Test: runtest frameworks-services && runtest frameworks-core
Change-Id: Ie2172009e9ba0438050488fe0aea6408f852c2c2
/frameworks/base/core/java/android/net/NetworkScoreManager.java
49ca529a850e60482ddcc8c0762105b4aa10f35f 10-May-2016 Jeff Sharkey <jsharkey@android.com> Avoid caching services with missing binders.

When fetching system services early during boot, if the underlying
binder interface hasn't been published yet, we end up caching a
manager class that is broken for the remainder of the process
lifetime, and innocent downstream callers end up using the broken
cached manager.

Fix this by using an explicit exception to quickly abort manager
creation when the underlying binder is missing. The exception is
only used to skip the remainder of the manager creation, and it
doesn't actually crash the process.

Bug: 28634953
Change-Id: I0cb62261e6d6833660704b93a11185aa11a2ac97
/frameworks/base/core/java/android/net/NetworkScoreManager.java
c53962d4ede82a03b62f0c8bb86bd0da090a15eb 02-Mar-2016 Jeff Sharkey <jsharkey@android.com> When system server goes down, crash apps more.

Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.

The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.

Bug: 27364859
Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b
/frameworks/base/core/java/android/net/NetworkScoreManager.java
da11f5cdf55ace0330008613fa7153993ddd943f 10-Feb-2016 Jeremy Joslin <jjoslin@google.com> Send explicit broadcasts when the scorer changes.

When the scorer is changed send a targeted broadcast to the previous
scorer (if any) and then a targeted broadcast to the new scorer.

BUG:26815773
Change-Id: If28414f4373a531b10f581ecd096cbc27a7318a4
/frameworks/base/core/java/android/net/NetworkScoreManager.java
e4de5a0d3b6e0c897c1cea0912b58e11db962365 23-Sep-2015 Xiaohui Chen <xiaohuic@google.com> Cleanup OWNER references.

Bug: 19913735
Change-Id: I2150c6baaab80fe11312e4401394a2a8da52e595
/frameworks/base/core/java/android/net/NetworkScoreManager.java
e56f2bb5ecae624e1b6573515f855a26f756aed5 05-Nov-2014 Jeff Davidson <jpd@google.com> Allow apps with SCORE_NETWORKS to set the active scorer.

This allows for a more streamlined UX in the current world, where
scorer apps are trusted (by virtue of being in /system/priv-app).
Trusted apps can continue to use the system dialog for consent, but
they may also set the scorer directly, under the assumption that they
are using their own consent UX to explain the feature to the user.

Bug: 16577529
Change-Id: I2a6edb7f1f688aaacf9b0152fa1da1a88636c3dc
/frameworks/base/core/java/android/net/NetworkScoreManager.java
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/NetworkScoreManager.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/NetworkScoreManager.java
acb5b7f0842c02267fa6c88255e5f2ccdb307c9c 30-Jul-2014 Jeff Davidson <jpd@google.com> Merge "Don't request network scores before boot completes." into lmp-dev
505c4a3093e57b91a0333ff09072395f534a06d9 30-Jul-2014 Jeff Davidson <jpd@google.com> Don't request network scores before boot completes.

Bug: 16655123
Change-Id: If6696635c59f6494e6232c3a75d283a2cbce2798
/frameworks/base/core/java/android/net/NetworkScoreManager.java
26fd143326a11c9dd7942e31acca6df56288d194 29-Jul-2014 Jeff Davidson <jpd@google.com> Add NetworkScoreManager.disableScoring().

Allows the active scorer app to disable itself.

Change-Id: I7bcdc3aafb95af4ea0b110b01b08ab4daf7a137f
/frameworks/base/core/java/android/net/NetworkScoreManager.java
7be8e9725f4a60f0d1a6cb175a05a320968d7439 17-Jul-2014 Jeff Davidson <jpd@google.com> 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
/frameworks/base/core/java/android/net/NetworkScoreManager.java
b096bdceaf2a4becffd2d930a870ccb57bfbe99c 01-Jul-2014 Jeff Davidson <jpd@google.com> Add a SCORER_CHANGED broadcast.

Sent whenever the active network scorer is changed.

Bug: 16007033
Change-Id: Ib71e89e2cc98fa424db7e489445ec03edefb6880
/frameworks/base/core/java/android/net/NetworkScoreManager.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/NetworkScoreManager.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/NetworkScoreManager.java
14f1ec05b2add5ee051c0d2e7c7c3b36a6e77b92 29-Apr-2014 Jeff Davidson <jpd@google.com> API for network cache subsystems.

A network subsystem (e.g. Wi-Fi) will be responsible for implementing
INetworkScoreCache. NetworkScoreService will load caches for each
configured network subsystem. When it receives a call to update
scores, it will separate the networks by type and call updateScores on
the appropriate INetworkScoreCache.

Each subsystem will also be responsible for requesting scores for new
networks by calling NetworkScoreManager#requestScores.

Bug: 14408144
Bug: 14137255
Change-Id: I76e5e5205bc359c39d6b9c1782126fb7f465cd96
/frameworks/base/core/java/android/net/NetworkScoreManager.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/NetworkScoreManager.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/NetworkScoreManager.java
b51e0a6c4b249e0d6f404fafef007645221be0d3 09-Apr-2014 Jeff Davidson <jpd@google.com> Stub APIs for network scoring.

NetworkScoreManager defines all interactions between the framework and
the scorer app. An ACTION_SCORE_NETWORKS broadcast is sent to the
default scorer with any unscored networks, which responds by calling
updateScores() with scores for those networks. An app may also check
whether they are currently the default scorer with
getDefaultScorerPackage() and request to become the default via the
ACTION_CHANGE_DEFAULT broadcast.

Bug: 13786258
Change-Id: Id3dc0f7c1109f0e3afd73356e2475b7f34167419
/frameworks/base/core/java/android/net/NetworkScoreManager.java