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
20 lines
678 B
Plaintext
Executable File
20 lines
678 B
Plaintext
Executable File
/*
|
|
* Copyright (C) 2017 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package android.telephony;
|
|
|
|
parcelable SubscriptionPlan;
|