We want to be able to move arbitrary packages to external storage,
regardless what they specify in their manifest. This is a developer
option and should be used with care. Trouble may ensue if an
application is moved when it really doesn't want to be moved
Bug: 22282121
Change-Id: I7664816a7fd122e6cdf3070fe50ce5464f325380
Merge the CHANGE_NETWORK_STATE permission with WRITE_SETTINGS.
AndroidManifest.xml:
Raised the protection level of CHANGE_NETWORK_STATE permission from
normal to signature|appops and pre23|preinstall for compatibility
provider/Settings:
Wrote new helper methods to check if app is allowed to change network
state.
ConnectivityManager.java & ConnectivityService.java:
Replace enforcement checks for CHANGE_NETWORK_STATE with
checkAndNoteChangeNetworkStateOperations instead.
Change-Id: If8c2dd3c76a5324ca43f1d90fa17973216c2bcc5
When missed calls are restored by CalllogBackupAgent using the addCall
API of CallLog provider, we were setting the IS_READ flag to 0 which
resulted in user getting a missed call notifications for all missed
calls after restore.
Adding a new addCall API signature which can specify the value to be put in the
IS_READ field when a call is added to the calllog provider. This will be
used by the CallLogBackupAgent to mark all restored missed calls as
read.
BUG: 22908952
Change-Id: Iee3bea09fbdefef09c7eb6c6c61728cb4d94d9e7
changes)
AppOpsManager:
Changed the default operating mode for WRITE_SETTINGS to MODE_DEFAULT from
MODE_ALLOWED.
packages/SettingsProvider:
We no longer do static permission checks for WRITE_SETTINGS in early checks and
defer that to app op when MODE_DEFAULT is returned. For some operations,
checking against WRITE_SECURE_SETTINGS is sufficient.
ActivityManagerService & PowerManagerService:
Incorporated app op checks and handled the MODE_DEFAULT case.
provider/Settings:
Added helper function to do checks on whether app ops protected operations
can be performed by a caller. This includes checks for WRITE_SETTINGS and
SYSTEM_ALERT_WINDOW.
Also added a public API (with javadocs) for apps to query if they can modify
system settings.
Changed the javadocs description for ACTION_MANAGE_WRITE_SETTINGS and
ACTION_MANAGE_OVERLAY_PERMISSION.
Added public API (with javadocs) for apps to query whether they can draw overlays or not,
and also javadocs description on how to use that check.
Change-Id: I7b651fe8af836c2074defdbd6acfec3f32acdbe9
- Adding settings that are updated by Gservices.
- Changes to handle UPDATE_APN_DB intent.
- UPDATE_APN_DB intent triggers update of apns-conf.xml and carriers db.
Change-Id: I65a63f3015da1b827b974d17e48bee4c747544ff
Any place that we check permissions we also need to check any
app-ops associated with those permissions. In the case of providers
with both <provider> and <path-permission> permissions, track and
report the strongest app-ops denial.
Bug: 22718722
Change-Id: I45e62de39b04d16d071558ad980b701667cfcb9a
Alternatives were considered:
- COLUMN_CAPACITY dounds more like real english sentence, but it is
inconsistent with consistent with COLUMN_AVAILABLE_BYTES.
- COLUMN_USED_BYTES is consistent with COLUMN_AVAILABLE_BYTES but we rarely
care about used bytes, more about total capacity. Such information is also
rarely exposed by backends, and would have to be computed, so misleading.
BUG=None
Change-Id: Ic1ff3eb8fc9ec12cc79ee78c490f361f77cb4706
Currently moving files even within the same document provider causes
reading and writing all of the bytes, which is very inefficient for all
network based solutions, eg. Drive where moving even huge files can be
instant.
This CL adds an optional moveDocument method to the DocumentProvider as
well as DocumentContract so providers can implement an efficient way of
moving things. If not implemented, we would fallback to moving by
streaming.
BUG=None
Change-Id: I74d6754f96cbafa749a04ca9aebf2e0e2b64b515
Currently copying files even within the same document provider causes
reading and writing all of the bytes, which is very inefficient for all
network based solutions, eg. Drive where copying even huge files can be
instant.
This CL adds an optional copyDocument method to the DocumentProvider as
well as DocumentContract so providers can implement an efficient way of
copying things. If not implemented, we would fallback to copying by
streaming.
BUG=None
Change-Id: I8f2b2c0c834717f07d42f8247cd1fc025e82239a
Raised the protection level of WRITE_SETTINGS permission to appop and also
allowed backwards compatibility with pre23 flag. Also made sure that this
permission is not added as RuntimePermission in DefaultPermissionGrantPolicy as
that breaks a lot of gmscore stuff.
Introduced new action to manage write system settings as a new API and
renamed the string that describes the managing of overlay permission.
Change-Id: Ifd25a6ddc06de68ee37015cb9fb23452e4ef10f4