History log of /frameworks/base/telephony/java/android/telephony/SubscriptionPlan.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b7479988d248add39ba6ce1fe71dea6f810fd54f 29-Jul-2017 Jeff Sharkey <jsharkey@android.com> 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: 63997177, 63928277, 64156138, 63903381
Change-Id: If503378ef406dcaec438c9b41e837e0a821a3ef4
/frameworks/base/telephony/java/android/telephony/SubscriptionPlan.java
17bebd2fd7d3af0bc648172da6ae36f8b55ad7af 20-Jul-2017 Jeff Sharkey <jsharkey@android.com> Expose SubscriptionPlan API.

Clean up SubscriptionPlan, add docs, and expose as public API.

Deprecate older constants in CarrierConfigManager, and point users
towards new API. (The goal of CarrierConfigManager is to express
key/value pairs that are identical for all users on a particular
carrier, not to configure details that vary between users.)

Since a CarrierService may itself not have access to the plan
details, allow them to "delegate" the capability to configure plans
to another package name.

Factor out new RecurrenceRule class which is used by both
NetworkPolicy and SubscriptionPlan internally. Polish it to support
arbitrary periods, and continue to test it through NPMST.

Bug: 63391323
Test: bit FrameworksCoreTests:android.util.RecurrenceRuleTest
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I93fae4a43e58e9e4c32f8bf345a257dcd607f088
/frameworks/base/telephony/java/android/telephony/SubscriptionPlan.java
53313d7e8153982f842910118371e1dc061248cd 14-Jul-2017 Jeff Sharkey <jsharkey@android.com> Iterate NetworkPolicy towards SubscriptionPlan.

Add new SubscriptionPlan API to describe the various types of carrier
data plans. Internally the OS will only use the first plan for
driving policy, but it will blindly plumb through the details for
Settings to display any secondary plans.

As part of getting Settings ready to roll towards SubscriptionPlan,
reduce references to NetworkPolicy internal fields. All usage cycle
details are now obtained from an Iterator which converts to
SubscriptionPlan under the hood.

Replace all data usage cycle calculation with new SubscriptionPlan
implementation, and retrofit large suite of existing tests to
exercise and verify the new logic.

Offer a debugging property that can be used to return "fake" plan
examples for testing.

Bug: 63391323
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I889c653980eeb7887abdfa4f5b6986f35855ee6d
/frameworks/base/telephony/java/android/telephony/SubscriptionPlan.java