Deprecated existing API which only supported passing buffer
and length in favor of a new one that also supports passing
the start.
Being able to pass a start index is very important because
the kernel imposes size limits on how much data can be transferred
at a time so we often need to transmit large buffers in chunks.
Change-Id: I3484b5e68f1ece61d4645ea04be8ee6a3b79169d
Modify the package parsing code to understand optional permissions
(android:required="false"). This is essentially a rollback of
e824120016248bcfe3962883fe9f3b0481dd1c3d with some minor changes.
Expose the requestPermission API to third party apps. This allows
an app to request an Intent which, when passed to
startActivityForResult, will prompt the user to approve permissions
for an app.
In the event we decide to not launch with this feature, this change
can be rolled back.
Change-Id: Ie3626deae9b16e510323f94a2c80377f7c84b26f
Add the buildPermissionRequestIntent API to PackageManager. This allows
an app to request an Intent which, when passed to
startActivityForResult, will prompt the user to approve permissions
for an app.
Currently, the API is @hide. It will be unhidden in a future change.
Change-Id: I4ec677002afa799a6eb5c2657c28452c91012436
Allows the external BT stack the means to communicate with
ConnectivityService during reverse tethering.
bug:8445208
Change-Id: Ice7dfb0b50c9481d359aed14a51372878185171c
Created constants for these in UserManager and current.txt. Also created
an accessor for individual user restrictions that takes the restriction key
(removing individual methods for particular restrictions).
Change-Id: Ibb5517cbcdffadd3925f52cbe67d7d525813faa9
- follow up to the fix for bug #8480245 ViewGroup layout margins can be wrong in RTL mode
- deal with "RTL compatibility mode": if left/right margins are not defined and if we
haev some start/end ones then use the start/end ones.
Change-Id: I98fe3276de2bd14f60a1c423a47569a68046f7be
Disabled some error logs that occur when an input channel is
closed remotely by its peer. These can happen during normal
course of operations because the act of removing windows or
finishing IME sessions is asynchronous so both peers may react
to the change independently at different times.
The coordination with the input dispatcher is designed to
avoid logging these errors. However it's not possible to achieve
the same coordination with the IME so we might as well silence
the errors since they don't tell us anything useful.
If something truly bad happens then one of two things will occur:
1. The system will realize that the process crashed because
of a DeadObjectException or other error, so it will take
measures to clean up.
2. If the error was spurious and non-fatal (how?) then at worst
an ANR may occur because the consumer stopped reading from
the input channel. However this has never been observed
and I doubt it's even possible.
Change-Id: I11a05d6d75e63e91be003971a544069b3a0d77f4
Currently, isHostRoute returns true iff the gateway address is
the unspecified address (0.0.0.0 or ::). Thus, it will return
true for any route that has no gateway (e.g., a route pointing at
a point-to-point interface), even if the route is not a host
route.
Fix this by checking the prefix length instead. This should be
safe because:
1. mDestination cannot be null, since it's created using new.
2. Host routes created using makeHostRoute (which is what
ConnectivityService calls) always have the correct prefix
lengths (/32 or /128) set.
Bug: 8276725
Change-Id: I14285398823fa6c312349128c7cc216cad4a84c9
Current timings on a mako listed below, which show minimal overhead
compared to writing directly. The increased code readability and
automatic indenting is worth the overhead.
Also worth noting is that writing concatenated strings is
substantially faster than printing components separately.
benchmark us linear runtime
ComplexDirect 10712.7 =========================
ComplexIndenting 12623.7 ==============================
PairIndenting 45.8 =
PairRaw 82.1 =
SimpleDirect 282.2 =
SimpleIndenting 294.4 =
Change-Id: I7c38690c14b017fa46248ebb0be69f6beff03371
Modify isDisplayablePermission to display a permission if the
app update will grant a new optional permission to the app.
Change-Id: Ic647826b0c48f9f7ec8e4f69b90197211f83278d
Fix a bug in unstable ContentProvider.
IllegalStateException: ref counts can't go to zero here: stable=0 unstable=0
IllegalStateException: unstable count < 0: -1
There is a race between main thread and background database thread. Main thread
is responsible for handling the REMOVE_PROVIDER message. Database thread starts
insert or query request again and again. acquireProvider in db thread will often
snatch provider from the jaws of death, sometime it fails to remove REMOVE_PROVIDER
which is already fired out from MessageQueue. But completeRemoveProvider in main
thread gets suspended when trying to execute the critical section. If db thread
released the provider before main thread resumes the execution, then two
REMOVE_PROVIDER messages will be executed.
Change-Id: I8588aa1d1a8bc444dcd2adf6f8bc3f055cebbdc4
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
Hidden for now. Also, modified callback that is called
from NfcService to pass all data in a single object
(BeamShareData). This avoids having to do multiple IPCs
at touch time.
Bug: 5134061
Change-Id: I235f608cef9935041b33b4b7a6980f109c15576c