Allows an OEM to specify that a preinstalled carrier app, even if
TelephonyManager says it should have carrier privileges, does not
get granted the default permissions and does not get enabled when
a compatible SIM is inserted.
Bug: 138150105
Test: verified locally
Change-Id: I0afec28f1f18227947c1fe9e6bb5fd0dad3b5dac
Merged-In: I0afec28f1f18227947c1fe9e6bb5fd0dad3b5dac
Fixes: 136257475
Test: switch sms holder in settings, and ensure ceceived broadcasts for both
becoming and leaving the sms app status
Change-Id: I10dda3fd8ebd38ab12bdb8192ed4f3863f4238b8
Added override rules support for always allowing mms and
internet data during voice call.
Test: Manual + unit tests
Bug: 132113695
Change-Id: I2266d7f428901ccbba6bf538a7c7696e6566b96c
-Add a function in TelephonyPermissions to check
READ_PHONE_STATE or return NETWORK_TYPE_UNKNOWN (soft denial).
-Honor the subId in TM or use the default DATA sub when
returning the network type.
Bug: 132466954
Test: cts - atest TelephonyManagerPermissionTest
Change-Id: I4e1767c9dc10acbadec286512752d4bb52059b74
Message format info is required in order to divide a message text into
correctly sized parts on a device that supports for both 3GPP and 3GPP2
formats in multi-sim. And fixed to get default SMS subId from SmsManager
in SmsMessage class instead.
Test: Manual
Bug: 132259056
Merged-in: Id2512eb62504b7e789f58b7d9697009d565c4a18
Change-Id: Id2512eb62504b7e789f58b7d9697009d565c4a18
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
(cherry picked from commit 8debeeb126)
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
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 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
Add API in SubscriptionManager setAlwaysAllowMmsData
and isMmsDataAllowed.
Bug: 128616035
Test: unittest
Change-Id: Ie56c2d0619a68b188c35e8e24db6c2012d22538b
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
This is used in SubscriptionManager to figure out which phone account
is being updated when the default voice sub changes. It seemed like
a good spot to put it since we should really have an api for this in
the future.
Test: Manual, manual, manual
Bug: 128916238
Change-Id: If5137c0e7f01a14810e0ee94e5d857d69f368a87
notifyCarrierNetworkChange should only be allowed
for carrier service which has the carrier priviledge.
to find carrierService is notifying which subId,
check which subId the caller has carrier privileges
under at the time of the call and use that to restrict.
Bug: 128989180
Test: Build
Change-Id: I061dd5773f8db87c702c5e60413b198330bee854