This reverts commit 7d6dbb2b0b.
This change causes a subtle deadlock. Will upload a correct patch in a bit.
Change-Id: I8cb14000943338fb8c2c9049c2d85a4ce8cf6fcd
This change adds new APIs for querying historical app ops
for a time period in the past. Since app ops are performed
quite often in some cases keeping track of every app op is
prohibitively inefficient. Therefore, we are exposing
aggregated counts for past ops.
Test: atest android.permission.cts.AppOpsTest
bug:111061782
Change-Id: I59bbf906d62cd6dcd751f2e8089242dcecd55a6c
* changes:
Update USB tests for ADB split
Move AdbDebuggingManager to AdbService
AdbService: move source of truth for enabled
Add empty AdbHandler
Add systemReady call for AdbService
Add function to query ADB state
Register USB as an ADB transport type
Add ADB transport skeleton
Add empty AdbManagerInternal for system server
Add empty AdbService to SystemServer
Move ADB debugging manager to core
Rename to AdbDebuggingManager
Move UsbDebuggingManager to new package
The appop defaults change is now handled in a better way with ag/5372491
This also reverts the special treatment of MODE_IGNORED in SmsAmmplication
to be compatible with the default value of OP_WRITE_SMS being reverted to
Fixes: 118452447
Test: atest android.telephony.cts.SmsManagerTest
Change-Id: I88b01136aaaf8a243d3a14a873e8a15c02a57673
Create skeleton service to migrate functions from UsbService in later
change.
Bug: 63820489
Test: make
Change-Id: I07672fe87cfae188fe77c173fc49119e182c6b05
This change adds addRoleHolderFromController() and
removeRoleHolderFromController() to RoleManager. These APIs are
guarded by permission and intended to be called only by the controller
service, which will only modify records inside RoleManager and won't
affect the holder packages.
Bug: 110557011
Test: build
Change-Id: I15c6cde0b8c1c8c519ea521bc7bb6f97c7144ec4
Bug: 117841084
Test: atest CtsAtraceHostTestCases:AtraceHostTest
Allow apps to opt-in to important profiling features (systrace, binder
tracing), without requiring debuggable=true. Debuggable has
significant performance overhead, and is undesirable for profiling.
Profileable is set to true when debuggable is true.
Change-Id: I16aaa7bc60dee4b1b262e169ac285759d57d8198
Introducing the concept of Usage Session Observers to UsageStats. A
session observer monitors usage within individual "continuous" sessions
(brief gaps of non usage may be allowed in a session and still be
considered continuous)
The new session observer in AppTimeLimitController are both similar and
different enough from the current app usage observer to warrant
refactoring TimeLimitGroup into an OOP friendly abstract base class.
Added some Observer App handling to avoid clash between registered
observers from multiple apps.
Reworded packages to observed and usage entities to accomodate future
changes, where usage may come from more than just app usage.
Reworded moveToForeground/Background to generic usage and allow multiple
usage entities to be active at the same time to accomodate future
changes, where more than just the foreground app can be considered used.
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
Bug: 111465038
Change-Id: I63aebf8b0aa5516111bd6d5e142525d0bee6ef58
Instead of using the default notification policy,
use the consolidated zen policy when do not disturb
is in priority only dnd mode
Bug: 111474881
Test: atest ZenModeHelperTest ZenPolicyTest ZenModeFilteringTest AudioManagerTest
Test: atest SystemUITests ZenModeExtractorTest
Change-Id: I88934103a56f06d4a4f620a8f557347331a79627
Process start time is recorded to detect whether two memory samples
come from the same process and how long the process was alive.
Bug: 118249210
Test: atest MemoryStatUtilTest and manually verified that data is in
statsd report
Change-Id: I7f49cd8bfc81c5e7e70e4f8b49729632eeec5798
If the CallLog/SMS permission restriction is not enabled we keep
the old default app op state for the relevant ops and if the
feature is enabled we switch to the new default value.
Test: Manual
Change-Id: Ic5f5b95f4152047455ecac06a596eee0f3bdc4ba
A role is a unique name within the system associated with certain
privileges. There can be multiple applications qualifying for a role,
but only a subset of them can become role holders. To qualify for a
role, an application must meet certain requirements, including
defining certain components in its manifest. Then the application will
need user consent to become the role holder.
Upon becoming a role holder, the application may be granted certain
privileges that are role specific. When an application loses its role,
these privileges will also be revoked.
Bug: 110557011
Test: build
Change-Id: Icd453a3b032857a8fd157048de8b9609f04e28b8
* changes:
Removed references to ATMS.getLockTaskController() from AMS (34/n)
Removed references to ATMS.mHomeProcess and mPreviousProcess from AMS (33/n)
As part of the storage changes in Q, we're removing the ability for
apps to directly access storage devices like /sdcard/. (Instead,
they'll need to go through ContentResolver.openFileDescriptor() to
gain access.) However, in several places we're returning raw
filesystem paths in the "_data" column. An initial attempt to simply
redact these with "/dev/null" shows that many popular apps are
depending on these paths, and become non-functional.
So we need to somehow return "_data" paths that apps can manually
open. We explored tricks like /proc/self/fd/ and FUSE, but neither
of those are feasible. Instead, we've created a cursor that returns
paths of this form:
/mnt/content/media/audio/12
And we then hook Libcore.os to intercept open() syscalls made by
Java code and redirect these to CR.openFileDescriptor() with Uris
like this:
content://media/audio/12
This appears to be enough to keep most popular apps working! Note
that it doesn't support apps that try opening the returned paths
from native code, which we'll hopefully be solving via direct
developer outreach.
Since this feature is a bit risky, it's guarded with a feature flag
that's disabled by default; a future CL will actually enable it,
offering a simple CL to revert in the case of trouble.
Bug: 111268862, 111960973
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ied15e62b46852aef73725f63d7648da390c4e03e
- Can be enabled/disabled at channel and channel group levels
- An activity to launch can be added to notification
Test: atest, cts
Bug: 111236845
Change-Id: I9a4832211676cca4649d1f28e6e3e3157954d268
- Create a check file for each database in order to detect
1) an unexpected DB file removal
2) DB wipe caused by a DB corruption.
- Either case, do a WTF to collect information on APR.
- Also print file timestamps in "dumpsys dbinfo". Example:
=====================
Database files in /data/system:
locksettings.db 20480b ctime=2018-10-23T22:48:35Z mtime=2018-10-23T22:48:35Z atime=2018-10-23T18:54:12Z
locksettings.db-wipecheck 0b ctime=2018-10-23T18:54:12Z mtime=2018-10-23T18:54:12Z atime=2018-10-23T18:54:12Z
notification_log.db 45056b ctime=2018-10-23T22:48:08Z mtime=2018-10-23T22:48:08Z atime=2018-10-23T18:54:13Z
:
=====================
Change-Id: I77fbeb0bb635c787aba797412f116475fecbe41c
Fixes: 117886381
Test: manual test
Test 1: corruption
1. Stop CP2 process (adb shell killall android.process.acore)
2. shell 'echo abc > /data/user/0/com.android.providers.contacts/databases/contacts2.db'
3. Launch the contacts app.
Test 2: Unexpected file removal
1. Stop CP2 process (adb shell killall android.process.acore)
2. shell 'rm -f /data/user/0/com.android.providers.contacts/databases/contacts2.db'
3. Launch the contacts app.
In both cases, logcat shows a client side stacktrace and also a WTF. (am_wtf)
This partially reverts the change that is suspected to be the cause of
b/117885969
This is to be reverted once the real cause is established.
Posting a temporary fix to unbreak the CTS test while figuring it out.
Fixes: 117885969
Test: atest CtsProviderTestCases:android.provider.cts.SmsBackupRestoreTest#testSmsBackupRestore
Change-Id: I7fd0b954d334501b050e9930643de4f6e41e229e
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)