OSDN Git Service

Migrate plans to @SystemApi, evolve permissions.
authorJeff Sharkey <jsharkey@android.com>
Fri, 28 Jul 2017 22:55:41 +0000 (16:55 -0600)
committerJeff Sharkey <jsharkey@android.com>
Fri, 28 Jul 2017 22:59:14 +0000 (16:59 -0600)
commitb7479988d248add39ba6ce1fe71dea6f810fd54f
tree6054d197ae9c020b8c33b477e2fb4d55fafc901f
parent683416acf25809b7523afd3bdfeb7d735efd2454
Migrate plans to @SystemApi, evolve permissions.

We're not yet ready to commit to SubscriptionPlan as public API, so
relax to be @SystemApi instead.  Add a new MANAGE_SUBSCRIPTION_PLANS
permission that we require apps to hold, unless they've been
delegated access via a trusted CarrierService.

Since several apps have the ability to provide plans for a single
subId, we now remember the "owner" who set the current plan
information, and we refuse to leak plan information beyond the app
that originally set it.

Relax permissions check to not require READ_PHONE_STATE, since we're
only returning data that an app provided to us earlier.  Also fix
NPE when SubscriptionInfo is missing.

Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 63997177639282776415613863903381
Change-Id: If503378ef406dcaec438c9b41e837e0a821a3ef4
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/os/UserHandle.java
core/res/AndroidManifest.xml
services/core/java/com/android/server/net/NetworkPolicyManagerService.java
telephony/java/android/telephony/CarrierConfigManager.java
telephony/java/android/telephony/SubscriptionManager.java
telephony/java/android/telephony/SubscriptionPlan.java