summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorJeff Davidson <jpd@google.com>2014-04-16 17:29:40 -0700
committerJeff Davidson <jpd@google.com>2014-04-21 16:04:05 -0700
commit6a4b220f1263d95fdefe6361c2bc87bbb04bbed0 (patch)
tree082ceb00c7d9255d3a6a129b3e66e16fee40ac3f /core/tests
parent4660c9e064ebaec9ebb260c2853a8dab868ccdc2 (diff)
downloadframeworks_base-6a4b220f1263d95fdefe6361c2bc87bbb04bbed0.zip
frameworks_base-6a4b220f1263d95fdefe6361c2bc87bbb04bbed0.tar.gz
frameworks_base-6a4b220f1263d95fdefe6361c2bc87bbb04bbed0.tar.bz2
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
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java (renamed from core/tests/coretests/src/android/net/NetworkScorerApplicationTest.java)4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/tests/coretests/src/android/net/NetworkScorerApplicationTest.java b/core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java
index 6d5ede8..cac6b93 100644
--- a/core/tests/coretests/src/android/net/NetworkScorerApplicationTest.java
+++ b/core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java
@@ -33,7 +33,7 @@ import org.mockito.MockitoAnnotations;
import java.util.Iterator;
-public class NetworkScorerApplicationTest extends InstrumentationTestCase {
+public class NetworkScorerAppManagerTest extends InstrumentationTestCase {
@Mock private Context mMockContext;
@Mock private PackageManager mMockPm;
@@ -64,7 +64,7 @@ public class NetworkScorerApplicationTest extends InstrumentationTestCase {
setScorers(package1, package2, package3);
Iterator<String> result =
- NetworkScorerApplication.getAllValidScorers(mMockContext).iterator();
+ NetworkScorerAppManager.getAllValidScorers(mMockContext).iterator();
assertTrue(result.hasNext());
assertEquals("package1", result.next());