Commit Graph

435 Commits

Author SHA1 Message Date
Neil Fuller
d6a2135262 Remove FloatMath methods from the API
Also removing FloatMathTest. The tests are being
moved into a legacy CTS suite.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I397fd6bcc4d988db6301245f9d47460bd6c28821
2015-05-07 13:16:18 +00:00
Jeff Brown
e7e9ccea32 Add float support to binary event log.
Bug: 20664753
Change-Id: I90456400b878f943e39cbddec45649662176e2aa
2015-04-28 17:53:32 -07:00
ztenghui
9af77a4ce2 Add group scaling factor into stroke width.
Originally, stroke width is independent of group scaling.
But that is a bug and causing animation trouble.

b/19501782

Change-Id: I33d5e44f2f8b2a82fee1a5a326223a39aaffa86c
2015-04-02 16:09:03 -07:00
Jeff Sharkey
4887789e44 Progress towards dynamic storage support.
Storage devices are no longer hard-coded, and instead bubble up from
whatever Disk and VolumeBase that vold uncovered, turning into
sibling Java objects in MountService.  We now treat vold events as
the source-of-truth for state, and synchronize our state by asking
vold to "reset" whenever we reconnect.

We've now moved to a model where all storage devices are mounted in
the root mount namespace (user boundaries protected with GIDs), so
we no longer need app-to-vold path translation.  This also means that
zygote only needs to bind mount the user-specific /mnt/user/n/ path
onto /storage/self/ to make legacy paths like /sdcard work.  This
grealy simplifies a lot of system code.

Many parts of the platform depend on a primary storage device always
being present, so we hack together a stub StorageVolume when vold
doesn't have a volume ready yet.

StorageVolume isn't really a volume anymore; it's the user-specific
view onto a volume, so MountService now filters and builds them
based on the calling user.  StorageVolume is now immutable, making
it easier to reason about.

Environment now builds all of its paths dynamically based on active
volumes.  Adds utility methods to turn int types and flags into
user-readable strings for debugging purposes.

Remove UMS sharing support for now, since no current devices support
it; MTP is the recommended solution going forward because it offers
better multi-user support.

Simplify unmount logic, since vold will now gladly trigger EJECTING
broadcast and kill stubborn processes.

Bug: 19993667
Change-Id: I9842280e61974c91bae15d764e386969aedcd338
2015-03-30 19:46:23 -07:00
Zoltan Szatmary-Ban
9c5dfa5c79 Data Usage public API
Added new API consisting of android.app.usage.NetworkUsageManager and
android.app.usage.NetworkUsageStats. Through them data usage on a
network interface can be programmatically queried. Both summary and
details are available.

Bug: 19208876
Change-Id: I0e0c4b37ae23ad1e589d4b0c955b93f28ba4333e
2015-03-25 15:53:38 +00:00
Andreas Gampe
0fdfe72088 am c8484abb: am 0ae488e1: Merge "Frameworks/base: Use || instead of |"
* commit 'c8484abbbde02171023f159491ca342186ae095c':
  Frameworks/base: Use || instead of |
2015-03-17 20:47:41 +00:00
Andreas Gampe
e1b9262084 Frameworks/base: Use || instead of |
Nothing wrong with | in this case, but || is canonical.

Bug: 19797138
Change-Id: I5f145736a5470f7cde06efce9a217d86eda2135f
2015-03-17 20:27:42 +00:00
Dianne Hackborn
b9a5e4ad30 Add new debug feature to automatically create heap dumps.
Not yet working, unless you turn off SELinux enforcing.
We need to update SElinux to allow the system process
to give apps access to /data/system/heapdump/javaheap.bin.

Currently watching can only be enabled through the shell,
such as:

adb shell am set-watch-heap com.android.systemui 1024

The last number is the process pss size in bytes, so this is
asking us to warn if it goes about 1K which will be all the
time.

Change-Id: I2089e5db2927afca0bf01a363c6247ee5dcb26e8
2015-03-06 16:42:03 -08:00
Andreas Gampe
d833ba8d4e am ecb48c16: am 9c0ba24f: am 6695b992: Merge "Frameworks/base: Add removeAll for ArraySet"
* commit 'ecb48c16b7839bdcda84ac0ba7c61248b814eb71':
  Frameworks/base: Add removeAll for ArraySet
2015-03-05 17:41:14 +00:00
Andreas Gampe
9c0ba24f3b am 6695b992: Merge "Frameworks/base: Add removeAll for ArraySet"
* commit '6695b9920d15f8d9a17d6b0c66b863d1c2e38584':
  Frameworks/base: Add removeAll for ArraySet
2015-03-05 17:15:58 +00:00
Andreas Gampe
f9345e93db Frameworks/base: Add removeAll for ArraySet
Add a simple ArraySet.removeAll(ArraySet) method. This avoids two
allocations, a MapCollections helper and an Iterator object, over
the removeAll(Collection) code.

KeySetManagerService heavily calls removeAll during boot (about 9K
times in AOSP). This reduces GC stress and optimizes the removal
(about half the time the removed collection has only one element).
The removal method in KeySetManagerService is also done under a lock,
so that it gates parallelization efforts in PackageManagerService.

Bug: 19498314
Change-Id: Ib0e483adfd09831cd66ab19a820ebf6544a2b66f
2015-03-04 17:14:10 -08:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
Tor Norbye
7b9c912f53 Add @ResourceInt annotations on APIs
Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
2015-02-18 07:49:03 -08:00
Neil Fuller
c1a5e82c25 Merge "Remove usages of FloatMath" automerge: a8e8cdb
automerge: 27316a9

* commit '27316a93e5979859ae98f506eca365784353007a':
  Remove usages of FloatMath
2015-02-12 10:00:41 +00:00
Neil Fuller
e573aa9371 Remove usages of FloatMath
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: Iec8fb663ed54eb967050f6ff25a36ba534204c4d
2015-02-12 09:20:31 +00:00
Adam Powell
f4071c709d am 97e0ba69: am b73e029f: am 0ec652cf: Merge "Add DENSITY_280" into lmp-mr1-dev
automerge: bee1def

* commit 'bee1def31bb7a3a22e7c83904a3d8c418eeb5e48':
  Add DENSITY_280
2015-02-12 07:49:31 +00:00
Adam Powell
bee1def31b am 97e0ba69: am b73e029f: am 0ec652cf: Merge "Add DENSITY_280" into lmp-mr1-dev
* commit '97e0ba691222d037c1820ca8338ad13d07221daf':
  Add DENSITY_280
2015-02-12 02:34:42 +00:00
Adam Powell
0ec652cf72 Merge "Add DENSITY_280" into lmp-mr1-dev 2015-02-12 02:08:04 +00:00
Svetoslav
683914bfb1 Rewrite of the settings provider.
This change modifies how global, secure, and system settings are
managed. In particular, we are moving away from the database to
an in-memory model where the settings are persisted asynchronously
to XML.

This simplifies evolution and improves performance, for example,
changing a setting is down from around 400 ms to 10 ms as we do not
hit the disk. The trade off is that we may lose data if the system
dies before persisting the change.

In practice this is not a problem because 1) this is very rare;
2) apps changing a setting use the setting itself to know if it
changed, so next time the app runs (after a reboot that lost data)
the app will be oblivious that data was lost.

When persisting the settings we delay the write a bit to batch
multiple changes. If a change occurs we reschedule the write
but when a maximal delay occurs after the first non-persisted
change we write to disk no matter what. This prevents a malicious
app poking the settings all the time to prevent them being persisted.

The settings are persisted in separate XML files for each type of
setting per user. Specifically, they are in the user's system
directory and the files are named: settings_type_of_settings.xml.

Data migration is performed after the data base is upgraded to its
last version after which the global, system, and secure tables are
dropped.

The global, secure, and system settings now have the same version
and are upgraded as a whole per user to allow migration of settings
between these them. The upgrade steps should be added to the
SettingsProvider.UpgradeController and not in the DatabaseHelper.

Setting states are mapped to an integer key derived from the user
id and the setting type. Therefore, all setting states are in
a lookup table which makes all opertions very fast.

The code is a complete rewrite aiming for improved clarity and
increased maintainability as opposed to using minor optimizations.
Now setting and getting the changed setting takes around 10 ms. We
can optimize later if needed.

Now the code path through the call API and the one through the
content provider APIs end up being the same which fixes bugs where
some enterprise cases were not implemented in the content provider
code path.

Note that we are keeping the call code path as it is a bit faster
than the provider APIs with about 2 ms for setting and getting
a setting. The front-end settings APIs use the call method.

Further, we are restricting apps writing to the system settings.
If the app is targeting API higher than Lollipop MR1 we do not
let them have their settings in the system ones. Otherwise, we
warn that this will become an error. System apps like GMS core
can change anything like the system or shell or root.

Since old apps can add their settings, this can increase the
system memory footprint with no limit. Therefore, we limit the
amount of settings data an app can write to the system settings
before starting to reject new data.

Another problem with the system settings was that an app with a
permission to write there can put invalid values for the settings.
We now have validators for these settings that ensure only valid
values are accepted.

Since apps can put their settings in the system table, when the
app is uninstalled this data is stale in the sytem table without
ever being used. Now we keep the package that last changed the
setting and when the package is removed all settings it touched
that are not in the ones defined in the APIs are dropped.

Keeping in memory settings means that we cannot handle arbitrary
SQL operations, rather the supported operations are on a single
setting by name and all settings (querying). This should not be
a problem in practice but we have to verify it. For that reason,
we log unsupported SQL operations to the event log to do some
crunching and see what if any cases we should additionally support.

There are also tests for the settings provider in this change.

Change-Id: I941dc6e567588d9812905b147dbe1a3191c8dd68
2015-02-11 17:58:22 -08:00
Adam Powell
f6d4045d6c Add DENSITY_280
Bug 19350604

Change-Id: I94f5162c31f9c8853908d7c4699974c236cc7fe7
2015-02-11 13:34:43 -08:00
Adam Lesinski
9a647096ac am 88c5abb3: am 967439b4: Merge "Make ArrayMap.EMPTY immutable" into lmp-mr1-dev automerge: abc88d0
* commit '88c5abb33f0e306a8add10fcef90733aa205799e':
  Make ArrayMap.EMPTY immutable
2015-02-05 23:16:31 +00:00
Adam Lesinski
88c5abb33f am 967439b4: Merge "Make ArrayMap.EMPTY immutable" into lmp-mr1-dev
automerge: abc88d0

* commit 'abc88d0743924441bf7fcd3085e3305b076f5af5':
  Make ArrayMap.EMPTY immutable
2015-02-05 23:05:40 +00:00
Adam Lesinski
b6bdb0f02d Make ArrayMap.EMPTY immutable
This is a regression from KitKat.

Bug:19271657
Change-Id: I11b8e4dd50f6a8d2b15fef66b44aa2d72b1f0349
2015-02-05 11:11:03 -08:00
Lorenzo Colitti
cd4c8525fa am 3d992507: am 09dff843: Merge "Only try to fetch time from NTP if there is a network connection." into lmp-mr1-dev
automerge: 583dec8

* commit '583dec84d95b69216b4f91dd31397dc5f32f4e95':
  Only try to fetch time from NTP if there is a network connection.
2015-01-26 22:24:23 +00:00
Lorenzo Colitti
583dec84d9 am 3d992507: am 09dff843: Merge "Only try to fetch time from NTP if there is a network connection." into lmp-mr1-dev
* commit '3d992507a09b4d32c1e961a99d77027db050f01b':
  Only try to fetch time from NTP if there is a network connection.
2015-01-26 22:22:27 +00:00
Lorenzo Colitti
df59053588 Only try to fetch time from NTP if there is a network connection.
Bug: 19046107
Change-Id: Iff647ee33fe0eb9b530d7baad636d32b386e4fa7
2015-01-26 15:24:07 +09:00
Chet Haase
d430753cba Add resource attributes for Keyframes and PropertyValuesHolders
Issue #17939329 Expose multi-property and multi-keyframe capabilities in animation resources

Change-Id: I14822ced47665fa6cde4996f74d3078da2ada38a
2015-01-15 07:21:54 -08:00
Jeff Sharkey
6fe380724b am bcba2182: Merge "check ntpserver as empty string instead of null" automerge: dbcb4a1 automerge: 387da77
* commit 'bcba21827c836e8941719b432fbf11d1bb8e8639':
  check ntpserver as empty string instead of null
2015-01-08 01:11:05 +00:00
Jeff Sharkey
bcba21827c Merge "check ntpserver as empty string instead of null" automerge: dbcb4a1
automerge: 387da77

* commit '387da7769757ab6368acb2a0000cd8a85d3e55d8':
  check ntpserver as empty string instead of null
2015-01-08 01:03:49 +00:00
Young-Ho Cha
0eda7dfcac check ntpserver as empty string instead of null
mServer cannot set null, because string from resource always returns
non-null charsequence

Change-Id: I8d6a6fdbc34267ee361e7bd20719887268161870
Signed-off-by: Young-Ho Cha <ganadist@gmail.com>
2015-01-08 09:34:01 +09:00
Alan Viverette
c5b95c20b6 Fix date picker color handling, expose StateSet utils in more places
Enabled use of color selectors for the day number text, which lets us
use the "activated" text color and push the selection background
opacity up to 100%. Also ensures the selector circle stays within the
bounds of the selected day.

BUG: 18864682
Change-Id: Ia36ea748f83e13683a1de8ac1a259d353578d61a
2015-01-07 13:57:12 -08:00
Dianne Hackborn
9b07ba1990 am 0cfdd810: am e52a2ea0: am 0029f0ac: Merge "Fix issue #17323751: Additional items in aggregated battery stats" into lmp-mr1-dev
* commit '0cfdd810ded6f8486a6b0a61044594f58ab5c052':
  Fix issue #17323751: Additional items in aggregated battery stats
2014-12-09 00:59:01 +00:00
Dianne Hackborn
0cfdd810de am e52a2ea0: am 0029f0ac: Merge "Fix issue #17323751: Additional items in aggregated battery stats" into lmp-mr1-dev
* commit 'e52a2ea03bd7b8ed2f3680c5198e00fb7ad5c34c':
  Fix issue #17323751: Additional items in aggregated battery stats
2014-12-08 19:33:49 +00:00
Dianne Hackborn
1e01d16982 Fix issue #17323751: Additional items in aggregated battery stats
- Now aggregate number of times each process has crashed and ANRed.
- Now aggregate total number of connectivity changes.
- Now record connectivity changes in the history.

Crash and ANR counts are new entries at the end of "pr" in checkin.

Connectivity change counts is a new entry at the end of "m" in checkin.

Connectivity changes in the history checkin are Ecn and include the
type of connection and its state.

Change-Id: I0c01186446034cf6c3fb97d45f5e3b5c69a0438a
2014-12-05 13:54:24 -08:00
ztenghui
2f96e233de am bac3f5a6: am 9f671553: am 475569e9: Merge "Fix the starting pen\'s position when a path close." into lmp-mr1-dev
* commit 'bac3f5a6f055876d8892ff27fb8db7355a188a68':
  Fix the starting pen's position when a path close.
2014-11-14 19:17:00 +00:00
ztenghui
bac3f5a6f0 am 9f671553: am 475569e9: Merge "Fix the starting pen\'s position when a path close." into lmp-mr1-dev
* commit '9f67155332e49686ef622b096b715ee62845d401':
  Fix the starting pen's position when a path close.
2014-11-14 00:03:16 +00:00
ztenghui
5e7a29f677 Fix the starting pen's position when a path close.
We have to cache the starting point for the latest "move", then apply it after
we close the path.

b/18214929

Change-Id: I8e8e5c810d720a1c194b8f59d74867a0efbb7662
2014-11-13 12:55:16 -08:00
Christopher Lane
1bb81dd46e am c56a9d10: am be36ebc2: Merge "Add convenience method for getting the complex unit type" into lmp-mr1-dev automerge: 38d6cf9
* commit 'c56a9d10f7b5ffa9a6023f3dff043cbea8b3cb96':
  Add convenience method for getting the complex unit type
2014-10-31 22:13:29 +00:00
Christopher Lane
c56a9d10f7 am be36ebc2: Merge "Add convenience method for getting the complex unit type" into lmp-mr1-dev
automerge: 38d6cf9

* commit '38d6cf9cbee98b3fe66e6ccda223b3c4c01a0815':
  Add convenience method for getting the complex unit type
2014-10-31 22:07:30 +00:00
Christopher Lane
9f357ae9f0 Add convenience method for getting the complex unit type
Bug: 18193912
Change-Id: Ida29c12c6c3f07ac0657e70d2ab07f2fc4f2cb20
2014-10-31 14:52:06 -07:00
Alan Viverette
f2ae40739a am 9a77c8a2: am 3c5cc234: am 674a3a21: Merge "Distinguish unspecified and explicit null values in resources" into lmp-mr1-dev
* commit '9a77c8a279bfe3293295ed77c775ea29b88b2916':
  Distinguish unspecified and explicit null values in resources
2014-10-31 00:25:37 +00:00
Alan Viverette
9a77c8a279 am 3c5cc234: am 674a3a21: Merge "Distinguish unspecified and explicit null values in resources" into lmp-mr1-dev
* commit '3c5cc234eeef4a08ad7b00b4e869a1e47cf14ab3':
  Distinguish unspecified and explicit null values in resources
2014-10-31 00:15:01 +00:00
Alan Viverette
f296940502 Distinguish unspecified and explicit null values in resources
BUG: 17919345
Change-Id: Ic4f04f7dd0f986f58a749b5950d80c1cfdb074ea
2014-10-29 17:09:36 -07:00
Jeff Sharkey
23801ccafb am 1c665948: am e67b8d28: Merge "Reduce PackageManager RAM usage: ArrayMap/Set." into lmp-mr1-dev automerge: 301b563
* commit '1c6659486c7f9a868aaf1c87d08ffd9aa3f750d7':
  Reduce PackageManager RAM usage: ArrayMap/Set.
2014-10-28 07:16:25 +00:00
Jeff Sharkey
1c6659486c am e67b8d28: Merge "Reduce PackageManager RAM usage: ArrayMap/Set." into lmp-mr1-dev
automerge: 301b563

* commit '301b563107c7458a21e4460254e81694b45f0e35':
  Reduce PackageManager RAM usage: ArrayMap/Set.
2014-10-27 21:33:55 +00:00
Jeff Sharkey
e67b8d2829 Merge "Reduce PackageManager RAM usage: ArrayMap/Set." into lmp-mr1-dev 2014-10-27 19:57:00 +00:00
Alan Viverette
a7dc89bcfc am a8aa03ef: Merge "Add support for Explore by Touch to RadialTimePickerView" into lmp-mr1-dev automerge: 1ac5266 automerge: 4329ad3
* commit 'a8aa03efa7541b1e6144028271a4d1635aeebfac':
  Add support for Explore by Touch to RadialTimePickerView
2014-10-25 02:35:39 +00:00
Alan Viverette
a8aa03efa7 Merge "Add support for Explore by Touch to RadialTimePickerView" into lmp-mr1-dev automerge: 1ac5266
automerge: 4329ad3

* commit '4329ad3be8f42b62f54ab070fcd97d2a1bb2d7f3':
  Add support for Explore by Touch to RadialTimePickerView
2014-10-24 21:28:34 +00:00
Alan Viverette
1ac52667ee Merge "Add support for Explore by Touch to RadialTimePickerView" into lmp-mr1-dev 2014-10-24 20:36:33 +00:00
Jeff Sharkey
9f837a99d4 Reduce PackageManager RAM usage: ArrayMap/Set.
Transition PackageManager internals away from heavier HashMap/HashSet
to use drop-in ArrayMap/ArraySet replacements.  Saves ~38% RAM and
thousands of objects on a typical device.

Bug: 18115729
Change-Id: Ie107d2fee4b7baa4e3c3923231b4be877d1a5d2f
2014-10-24 12:26:45 -07:00