Our code was sometimes using 'uint32_t' and mostly using 'int'
to represent these custom handles. It was also passing this
value, as a byte stream, to the Java layer.
In the Java layer, this is an 'int', and thus we change all
of our usages to be 'jint' here. However, we still pass it
as a byte stream, since we're too late in the release cycle
to change the API. But now this is at least a consistent
size for the code.
This code still suffers from hub handles being inconsistent
with their types, but we leave that for another bug (b/30958512).
Bug: 30806218
Change-Id: I8d9ae8b9519f399d6723cf96293d84a2f5bd9cce
When we unloaded a nanoapp, we weren't updating the cache of
nanoapp information at the ContextHubServer java layer. Also,
we were leaking the handle.
We fix both of these by invoking the shared delete_app_instance()
function which properly handles all of this.
Furthermore, we allow delete_app_instance() to accept a nullptr
for the JNIEnv, and fix invalidateNanoApps() so that it won't
crash if it's unable to connect to the JVM.
Note that our Java communication in general here should be
cleaned up, but we're too late in the release cycle for
that, and leave that for b/30961119.
Bug: 30951974, 30968860
Change-Id: Ibb07666a8d54618bddaa3eaf36f9578926eb2b0f
Setting DeviceLockedForUser on the handler thread will lead to a race
condition where an immedidate read might see a stale value.
Bug: 30728557
Change-Id: Id9d510d7ad4dbcde6344a044e45f4b2feac19257
This fixes a bug where it was possible to authenticate the wrong user.
We now bind the userId when we start authentication and confirm it when
authentication completes.
Fixes bug 30744668
Change-Id: I346d92c301414ed81e11fa9c171584c7ae4341c2
This CL adds a mechanism for an OEM to grant default permissions
using the build system. This allows permissions for which they
got default grant exceptions to be added without modifying the
platform code. The format is a simple XML listing the packages
and the permissions to be granted for a package. The XML file
is placed in etc/default-permissions.
bug:29546655
bug:30929033
Change-Id: Ib6d671dac9201812bd2c47010c2c4b1330ef6b6e
...on removing the third pary search app
We weren't taking into account old style assistants when determining
whether something interesting had been removed.
Change-Id: I6b7b09cdf0781622924e10556d678565570dbd05
This CL adds a mechanism for an OEM to grant default permissions
using the build system. This allows permissions for which they
got default grant exceptions to be added without modifying the
platform code. The format is a simple XML listing the packages
and the permissions to be granted for a package. The XML file
is placed in etc/default-permissions.
bug:29546655
bug:30929033
Change-Id: Ifb0516d7e2d0b399532024438bc0f86068a2e4e2
We cannot hold mPackages when calling into generatePackageDexopts().
This method takes Package Manager's mInstallLock. By holding mPackages,
we have lock inversion and hilarity ensues.
Change-Id: Ia11a158677051e3511702f38cde6780e75b256fb
Fixes: 30927731
Pdfium is not thread safe and uses global variables, hence no
parallel call pdfium is safe
Fixes: 28705066
Change-Id: I04309ee691bd9cea37587e0af5be2c07ce8c9f2c
(cherry picked from commit 0768a7dc45)
More specifically, they get a PackageManager binder -- necessary for
Android process startup and configuration -- but none of the other
usual preloaded service binders.
Bug 30202228
Change-Id: I3810649f504cd631665ece338a83d2e54d41ad05
Bug 30786309
If the Activity used in makeSceneTransitionAnimation isn't
the same one used in the startActivity call, a NullPointerException
could be thrown.
Change-Id: Id21c54fcf99b353feab62f7fc160997ed06e7d23
(cherry picked from commit 3289bfa289)
NetworkPolicyManagerService (NPMS) used to depend on screen on/off
changes to determine if a foreground activity should have network
restrictions, but such check is now redundant since ActivityManager
already changes the proper UID state (like going from TOP to
TOP_SLEEPING) when the screen status is changed.
Removing such code decreases the NPMS lock contention when the screen is
turned on in about 3-5ms.
Change-Id: I2853443efedbf14961ae9a5b2e72689d4d1a646c
BUG: 30785671
(cherry picked from commit 88f40ad9a7)