| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| |
| | |
am: 92889d10fe am: afeee6a12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1786608
Change-Id: I23ff5312e8e3f42415b744fbd9184d5e42646a3c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GZIPInputStream has a bug (b/195554062) where it uses unbuffered IO
when reading the gzip header. This triggers the UnbufferedIoViolation
strict mode violation for apps that target API level 28+.
Independently of fixing GZIPInputStream, DropBoxManager can use
BufferedInputStream to take a proactive step against this and future
bugs.
Bug: 195554712
Test: Successfully read gzip dropbox entries from API level 28+ app.
Change-Id: Id539efcb366b3e3d53513a098975b25866ed16ff
|
| | |
| |
| |
| |
| |
| | |
Test: make doc-comment-check-docs
Bug: 194230402
Change-Id: I38da2bbfbe7ed0a660274ec4d07e2b176a2a7542
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The existing DropBoxManager APIs require that data be entirely
pre-cooked before it can be added. This adds significant overhead
to Log.wtf() style messages which collect logcat data, since we
need to copy that log data through a pipe to an in-memory buffer.
To avoid that overhead, this change introduces an EntrySource
interface which can either be pre-cooked data or dynamically
generated data written directly to an open FD on disk. Future
changes will adjust the Log.wtf() logic to use this new interface
to have logcat write directly into an FD.
In addition, this interface paves the way for leveraging a newer
F2FS feature which transparently compresses and decompresses data in
the kernel, instead of forcing us to use DEFLATE in userspace.
This change drops periodic quota checking while recording new
entries, and instead adjusts to pre-flight the quota checks before
writing starts. It also drops the expensive fsync(), since these
logs are collected on a best-effort basis.
Bug: 176843501
Test: atest CtsDropBoxManagerTestCases
Test: atest FrameworksServicesTests:com.android.server.DropBoxTest
Change-Id: Ic78e99a32cfaf4edac066a73a6864c9c9e9fdeef
|
| |\|
| |
| |
| |
| |
| |
| |
| | |
am: e2d9b14b60 am: 6f22d2c310 am: 9bade16516 am: acbb11f541 am: 69194793fd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382541
Change-Id: I0be07dc3bf70507f82a4005ccd7fe2d687d58d81
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
See https://source.android.com/setup/contribute/respectful-code for reference
BUG=162536543
Change-Id: Iea1f8c3d2a253cad5a6a429389bbe3fc5fd4bc6b
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
Merged-In: I534e3fd1305e2f4af076986770033478448a665c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
- Use PermissionChecker instead of manully implement permission check
- Need to keep old @UnsupportedUsage method
Fixes: 161443379
Test: atest CtsAppOpsTestCases:android.app.appops.cts.AppOpsLoggingTest#getNextDropBoxEntry
Change-Id: I5c3290c23312e8009a9345e8a58a6f734885f928
|
| |/
|
|
|
|
|
|
| |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
DropBox entry spamming can negatively impact system and apps listening
to the ACTION_DROPBOX_ENTRY_ADDED broadcast.
Global settings with the DropBox tag prefix can now mark low priority
tags. Low priority tagged entries will have their
ACTION_DROPBOX_ENTRY_ADDED broadcast delayed and the broad cast will be
dropped in spammy situations.
Bug: 119132031
Test: atest CtsDropBoxManagerTestCases
Change-Id: I56554a15e0afb6e1686a33c59b3d6a8d426c2fc6
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
Bug: 119132031
Test: builds
Change-Id: Ia6e67e9221f1cf99c6b7a49856b7e1e7d68272a9
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For packages:
android.os
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I4ece0a3f37f88fc2508cb965092aed7cabc61819
|
| |
|
|
|
|
|
|
|
| |
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
|
| |
|
|
|
|
|
|
|
|
|
|
| |
APIs that return package usage data (such as DropBoxManager) must
ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.
Bug: 78355661
Test: Search output directory for binaries that have READ_LOGS but not
USAGE_STATS and find none.
Change-Id: I85e3bad680bb510439d73c7db5cc50cdcb7bbb42
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.
Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.
This is purely a docs change; no logic changes are being made.
Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
|
| |
|
|
|
|
|
|
|
| |
Add missing API annotations for permissions and SdkConstants, and
invoke doclava with new "-android" flag.
Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I970bb2655eb568fd25004636f134c794663a6c33
|
| |
|
|
|
|
|
|
|
| |
Once they target N, they'll start getting exceptions, which is
intended to make sure they pay attention to data that would have
otherwise been dropped on the floor.
Bug: 27571535
Change-Id: I49163679c629cd0788327d2c3a654e757ecdcb99
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to first patch, but now using new "rethrowFromSystemServer()"
method which internally translates DeadObjectException into
DeadSystemException. New logic over in Log.printlns() now
suppresses the DeadSystemException stack traces, since they're
misleading and just added pressure to the precious log buffer space.
Add some extra RuntimeInit checks to suppress logging-about-logging
when the system server is dead.
Bug: 27364859
Change-Id: I05316b3e8e42416b30a56a76c09cd3113a018123
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When the socketpair communication channel was added to
ParcelFileDescriptor, the CREATOR method for DropBoxManager.Entry was
not updated to read the extra fd from the Parcel. This was causing reads
to end too early.
Also removed comments referring to the now-deleted native methods in
the native Parcel implementation.
Change-Id: I49a9691da6ea927382ceb2fcbfdc7985a601111b
|
| |
|
|
| |
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
|
| |\
| |
| |
| | |
Change-Id: I07b974f96ca598677e58623050e4668822e68f23
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To monitor the dropbox an application have to either poll the dropbox
and keep track of all entries or observ the /data/system/dropbox
directory. The later requires that the application runs as system-user.
This commit adds that a broadcast intent is sent when something is written
to the dropbox and an application can just listen on this intent and
then reads the entry with help of the DropboxManager class.
The application have to hold the permission android.permission.READ_LOGS
to get the intent.
Change-Id: I1f77f206a243df69f4ed5306078c47f7bf6181ec
|
| |\|
| |
| |
| |
| | |
* commit '383e95e245ceb87a2a6ad6422404ce641f0e08eb':
DropBox: Read until the end of stream has been reached
|
| | |
| |
| |
| |
| |
| |
| | |
Read the requested length or until the end of the input stream
has actually been reached.
Change-Id: I01bc0b81eca0225209bdd288dde6a778a19d1e2c
|
| | |
| |
| |
| | |
Change-Id: I61716c06b92fa1b9b5b271b5805550bdb2d51b46
|
| | |
| |
| |
| | |
Change-Id: I9b14f6905533e0af66bd64fc76352ed8fc365058
|
| | |
| |
| |
| | |
Change-Id: I32d055b39ca89ec9f6a7bf189263844424533b60
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
events." into froyo
Merge commit 'e8605af513e846f6cd223c9e92461189727d8c9b' into gingerbread
* commit 'e8605af513e846f6cd223c9e92461189727d8c9b':
Avoid leaking file descriptors when returning drop box events.
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can't use Parcel.writeValue() to write the ParcelFileDescriptor, otherwise
it leaks when returning the value to the caller (the flag gets lost). Change
the way DropBoxManager.Entry gets serialized so that it uses a bit of its own
flags value to track whether the data is a byte[] or a ParcelFileDescriptor.
Modify the dropbox unit test to add extensive checking of Entry serialization
and deserialization under various circumstances, and to include a regression
test to ensure that FD leaking doesn't happen.
Bug: 2847738
Change-Id: I4ccd17dd03ffab234340cd359e6f3510fdf81193
|
| |/
|
|
| |
Change-Id: I55d8da82acea7f1cf0a69912fe5d4d46d704b570
|
| |
|
|
|
|
| |
take a File instead of a ParcelFileDescriptor (gets opened internally) --
that way the caller doesn't have to worry about closing their PFD and so on.
(Pretty much 100% of the time the caller will be uploading a file, anyway.)
|
| | |
|
|
|
Un-hide the DropBoxManager interface, and update the public API accordingly.
|