Add HardwarePropertiesManagerService which call native methods to
get CPU, GPU, battery temperatures, CPU usage info, fan speeds.
Restrict hardware properties retrieval only for device and profile
owners.
Bug: 26945055
Change-Id: I4d6b30b78e575532d5e9cfa59ef6cd81355439d4
The new sdcardfs kernel driver needs to know this mapping for
deriving UID permissions, so push the data through /config when
supported by the kernel. This also has the nice benefit of letting
us push only the deltas of what actually changes, instead of
re-parsing the entire "packages.list" file.
The mappings for newly installed apps are pushed before the app is
allowed to run, removing some latent race conditions. Also cleans
up stale mappings when packages are uninstalled, and whenever the
system server reboots.
Bug: 19160983
Change-Id: Iace92efb69616c96b34c0d9d911e4b54e5fd8a67
This change makes StorageManager.getVolumesList(),
StorageManager.getPrimaryVolume(), and StorageVolume public and adds a
buildAccessIntent() in the latter to automatically generate the
ACTION_OPEN_EXTERNAL_DIRECTORY intent, but it doesn't change the
ACTION_OPEN_EXTERNAL_DIRECTORY implementation yet (i.e., it still takes an URI with the physical path of the directory, instead of a StorageVolume and
a directorny name).
BUG: 26742218
Change-Id: I36c59c42b6579e125ec7f03c3af141260875a491
For this, the DPM calls a new function
UserManagerInternal.createUserEvenWhenDisallowed() instead of
UserManager.createUser(). This calls
UserManagerService.createUserInternalUnchecked().
Also, only the system user is allowed to call this method, otherwise
a security exception is thrown.
Bug: 26952210
Bug: 26786199
Change-Id: I69c16354898d68592d13f5f53b840551f7ad4779
Clients of the NetworkStatsManager public APIs may get UIDs belonging
to other users, and UIDs which don't actually represent applications.
These APIs allow clients to understand whether a given ID belongs to
the same user as themselves, and whether an ID represents an
application or something else (e.g. a system UID).
Change-Id: Ia56d5891521ce98e5594c41da8f9d756819deb66
Add android.os.UpdateEngine and UpdateEngineCallback classes that
communicate with the update engine via binder APIs for A/B update.
Bug: 26695366
Change-Id: I2471858d28df5443bc0b56d9a20281ccebde4484
Add the means to protect FBE keys with a combination of an auth token
from Gatekeeper, and a hash of the password. Both of these must be
passed to unlock_user_key. Keys are created unprotected, and
change_user_key changes the way they are protected.
Bug: 22950892
Change-Id: Ie13bc6f82059ce941b0e664a5b60355e52b45f30
Wire up preparing of user-specific app storage to existing user
lifecycle hooks. This way we're sure the storage is ready to roll
just before we start reconciling app data directories.
This also has the nice property that we only prepare storage when
we know that keys are unlocked.
Bug: 25796509
Change-Id: Ic7df9ddbcfb1e20649d11b6cf68d424e3c365ee1
A variety of related fixes:
- don't force size enable when browsing from device mounted notifications.
- don't show settings menu item as action (put in overflow).
- add sd card icon (not quite yet used, need to suss that out).
Bug:26880985,26883578,26771127
Change-Id: I36f153c42217f8092f157ded2a756c02525593ab
We used to unconditionally remove the block map file on boot. Because
the package might be half-way uncrypt'd in a corrupt state. CL in [1]
changes uncrypt to ensure that block.map only gets created at the end of
a successful uncrypt. So we can change to keep the fully uncrypt'd
package and the block map. This is to reduce the work for GmsCore to
avoid re-downloading everything again.
[1]: commit 25dd0386fe69460cd1d39de116197dd2c7bf9ec2.
Bug: 26883096
Change-Id: I58ca22064141bf5d42fa48146a980712c8ce21d9
Self closing tags are not legal in HTML and javadoc was updated to better
enforce valid javadoc comments.
https://bugs.openjdk.java.net/browse/JDK-8020619
Change-Id: Ia7644b79be559a2e88fc9850eab570bd926f9a4b
Add DIRECTORY_HOME to android.os.Environment...use that for dir name,
so we don't use a localized name when creating directory.
Mark all of the DIRECTORY_* fields final.
Bug: 26814341
Change-Id: I5a11bcb180674c619de2f5ce9ed598521e60cc25
If the getDatabasePath() caller is using the default getDatabasesDir()
path, that method already handles possible path creation, so no
need for us to retry.
Also fix two small bugs that would have NPE'ed when listing files in
a directory that wasn't created.
Bug: 26895777
Change-Id: Iced16b05cfe95062717da8d0414c48daefcb5648
Specifying the new flag will enable several features in the runtime
required by the native debugger to debug Java and C++ code at the same
time.
The enabled features:
* Force JIT (never use the interpreter)
* Debug info generation
* Disbale some optimizations
Change-Id: Iaf5ab649715a0c274bd1b0fc64e483705da53cd0
Databases and SharedPreferences often involve multiple files under
the hood, so developers wanting to migrate them between different
storage contexts should ask us to make sure all relevant files are
migrated correctly.
This makes a best-effort attempt to recover from battery pulls
during migration, while still trying to alert developers to
conflicting files.
Bug: 26668510, 25860525
Change-Id: I9ffa3e8cb6191dfd4237b9466a081d6d77df3ba0
For several releases now we've told developers that sharing raw files
between apps is a recipe for trouble. There are at least three major
problems with sending raw files:
-- Apps sending generic intents can't know who is at the other end,
so they may not have access to shared storage locations. This is
more likely now that runtime permissions require apps to explicitly
ask users for permission.
-- Apps making files in their private storage world-readable has been
deprecated for several releases, and now in N it's fully blocked. If
we let these intents through, the receiving app would fail to open
the file, when the real blame rests on the sending app.
-- Devices with user profiles can't share raw files when using
cross-profile intent filters, since filesystem access is fully
locked down between users.
The time has finally come to communicate clearly that if you're
sharing content between apps, you need to use content:// Uris. We
added the simple FileProvider several years ago to give apps a clean
way to migrate with minimal work on their part.
Bug: 26860922, 9069185
Change-Id: I075f627f6a0d6c7fca2c090ca133b9aae9801c64
Telephony expsoses a getModemActivity() method, which BatteryStats
will poll when a change in network activity occurs (on the modem).
The time spent in various states (tx, idle, rx) are distributed amongst
the apps that did rx/tx traffic during that window.
Bug:23147562
Change-Id: I480a85df95786f87c382b96816fe2ed4bb2d5a42
Adds a new type of wakelock - SUSTAINED_PERFORMANCE_WAKELOCK. This
wakelock can only be acquired when the application is in the foreground.
And it is not effective when the application is no longer in the
foreground.
Acquiring this wakelock enables the Sustained performance mode which
guarantees a certain level of performance.
Bug: 22864186
Change-Id: Id0ececc756fe014779db6efde7aede23ea181dc5
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>