1. checkCarrierPrivilegesForPackages by subId
2. getPackagesWithCarrierPrivileges by subId
3. new hidden API getPackagesWithCarrierPrivilegesForAllPhones which
returns packages for all subs.
Bug: 132078279
Test: Manual
Change-Id: Ic666218f0c290d1b428530982b689af110f74c69
SmsManager used to display a "select default SMS
subscription" dialog every time SmsManager was used
and no default SMS subscription was set. This change
fixes the following issues:
1_ getSubscriptionId no longer pops up a disambig
dialog.
2) The disambig dialog no longer sets the
default, rather it waits for the response from the
user and performs the operation when it receives
a response.
2a) Dialogs can no longer be created from background
services, so we now have a restriction that if
the disambig dialog is shown via a background service,
we will use phone 0 as default (backwards compat for
apps targeting <Q) or fail (on apps targeting Q+).
3) If there is only one active subscription, use that
to perform the operation on MSIM devices instead of
asking and only displaying the one active subscription.
4) Certain non "user-facing" APIs that are used by
carrier apps no longer will pop up a UI.
Bug: 131713446
Bug: 130853716
Bug: 129141025
Test: run SmsManagerTestApp; atest TelephonyFrameworksTests
Change-Id: I6be1c6d7bf6b6ee614b6a7d0369147e3b1890588
When initializing the shift table in GsmAlphabet the correct
variable is now used. An error was logged already if the value
is wrong, so this does not have any logic correctness or
performance impact, just code correctness.
Test: very small refactoring. Tests still pass.
Change-Id: I5329cfa0be63b6a3ebd06414c6247d94ca93f40b
Signed-off-by: Thom Hurks <thomhurks@gmail.com>
1. Docuemnt the scope of each callback event either apply to specific
subscriptions or not.
2. TelephonyRegistry store separate state e.g, precisecallstate, callAttribute
for each slot to support msim.
3. Add missing subscription match check when notify callbacks.
Bug: 130423985
Bug: 132181378
Test: atest CtsTelephonyTestCases:PhoneStateListenerTest
Change-Id: I4b014e00528a1f05e0b5f237229c561f8260e2bd
This method will return info for inactive eUICCs, filtered by carrier
privilege. (Since we can't read carrier privilege on an inactive eUICC,
we always assume that the caller does not have carrier privilege).
Bug: 130826215
Test: manual
Change-Id: Id89fa48f119004b6c18bd21791396bc6c3df2c95
Merged-In: Id89fa48f119004b6c18bd21791396bc6c3df2c95
This reverts commit 6e96da2927.
Reason for revert: Play and MTP/PTP issues have been resolved,
restoring device identifier access restrictions for priv apps.
Bug: 117781266
Test: cts-tradefed run cts-dev -m CtsTelephony3TestCases
Change-Id: I7ab432cfa92b6da65137608fc9d435d8296ffb84
For testing purpose, we want system UI to show grouped CBRS carrier name
as in the upper left corner in system UI. But we want to make this a
conditoinal behavior.
Bug: 129865342
Test: manual
Change-Id: I38a49447ca07615b5e14a92412b68a2a44b2726c
This method will return info for inactive eUICCs, filtered by carrier
privilege. (Since we can't read carrier privilege on an inactive eUICC,
we always assume that the caller does not have carrier privilege).
Bug: 130826215
Test: manual
Change-Id: Id89fa48f119004b6c18bd21791396bc6c3df2c95
In addition, make isMmsDataEnabled more generic:
isDataEnabledForApn
Bug: 128616035
Test: manual
Change-Id: Icd520c3094dd761a13435fae79b7b6b3ba2ebda9
Merged-In: Icd520c3094dd761a13435fae79b7b6b3ba2ebda9
Add API in SubscriptionManager setAlwaysAllowMmsData
and isMmsDataAllowed.
Bug: 128616035
Test: unittest
Change-Id: Ie56c2d0619a68b188c35e8e24db6c2012d22538b
Merged-In: Ie56c2d0619a68b188c35e8e24db6c2012d22538b
Add API in SubscriptionManager setAlwaysAllowMmsData
and isMmsDataAllowed.
Bug: 128616035
Test: unittest
Change-Id: Ie56c2d0619a68b188c35e8e24db6c2012d22538b
The name source should be an integer instead of long
Test: Manual + unit tests
Bug: 130237749
Merged-In: Ic4447da24073d37401ae0f6e8f8b41bd60d7167d
Change-Id: Ic4447da24073d37401ae0f6e8f8b41bd60d7167d
(cherry picked from commit 5d8f6447a7)
make warns when a @deprecated javadoc tag is not matched by
a corresponding annotation. The other @deprecated fields in
this class have both.
Fixes: 71706673
Test: Treehugger
Change-Id: I3749a54acc9f63dabdacac77849add34d4085561
The app holding the SMS role and other carrier apps installed through
Play that cannot be granted carrier privileges can have a legitimate
need to access device identifiers but do not meet the new
requirements for access. This appop will provide a way to grant role
holders and apps delivered through Play a way to access these
identifiers.
Bug: 124236412
Test: cts-tradefed run cts-dev -m CtsAppSecurityHostTestCases -t \
android.appsecurity.cts.DeviceIdentifierTest#testDeviceIdentifierAccessWithAppOpGranted
Change-Id: Ieb182b254472b79cb791419222ee6ff9dedc6880
This change adds a mechanism for restricting permissions (only runtime
for now), so that an app cannot hold the permission if it is not white
listed. The whitelisting can happen at install or at any later point.
There are three whitelists: system: OS managed with default grants
and role holders being on it; upgrade: only OS puts on this list
apps when upgrading from a pre to post restriction permission database
version and OS and installer on record can remove; installer: only
the installer on record can add and remove (and the system of course).
Added a permission policy service that sits on top of permissions
and app ops and is responsible to sync between permissions and app
ops when there is an interdependecy in any direction.
Added versioning to the runtime permissions database to allow operations
that need to be done once on upgrade such as adding all permissions held
by apps pre upgrade to the upgrade whitelist if the new permisison version
inctroduces a new restricted permission. The upgrade logic is in the
permission controller and we will eventually put the default grants there.
NOTE: This change is reacting to a VP feedback for how we would handle
SMS/CallLog restriction as we pivoted from role based approach to roles
for things the user would understand plus whitelist for everything else.
This would also help us roll out softly the storage permisison as there
is too much churm coming from developer feedback.
Exempt-From-Owner-Approval: trivial change due to APi adjustment
Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest
Test: atest CtsPermissionTestCases
Test: atest CtsPermission2TestCases
Test: atest RoleManagerTestCases
bug:124769181
Change-Id: Ic48e3c728387ecf02f89d517ba1fe785ab9c75fd