OSDN Git Service

Enforce the calling permissions within NetworkRecommendationProvider.
authorJeremy Joslin <jjoslin@google.com>
Wed, 22 Feb 2017 00:20:35 +0000 (16:20 -0800)
committerJeremy Joslin <jjoslin@google.com>
Thu, 23 Feb 2017 01:22:56 +0000 (17:22 -0800)
commit8160544d585467654803ab76ec64d14b5b7ac33e
treea8ffbdcc577ca05f7fda416ed54be493140a86e0
parenteb30161ab3d93dcb2ff21745306cd6076e19faab
Enforce the calling permissions within NetworkRecommendationProvider.

Had to add a new ctor to get a Context instance and deprecate the
single arg ctor. Since this was being done I also took the opportunity
to replace the Handler param with an Executor which is more
appropriate in this case.

I'll remove the deprecated ctor once I've updated all of its
call points.

Test: adb shell am instrument -e class android.net.NetworkRecommendationProviderTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 34518584
Change-Id: Ic2441655d69838ae9caa7d598e876dec36e15363
api/system-current.txt
core/java/android/net/NetworkRecommendationProvider.java
core/tests/coretests/src/android/net/NetworkRecommendationProviderTest.java