Commit Graph

10118 Commits

Author SHA1 Message Date
John Reck
32f140aa67 Rename & package shuffle
Rename DisplayListCanvas -> RecordingCanvas
Move RecordingCanvas to android.graphics
Move RenderNode to android.graphics

Bug: 112709971
Test: make & boot
Change-Id: Iddeb6a89f8923ea81a1f37bbee4e9b1db8ede238
2018-10-04 16:18:12 -07:00
Chenjie Yu
e388e27e19 Merge "pull PowerProfile into statsd" 2018-10-03 23:28:10 +00:00
Chenjie Yu
ab53020345 pull PowerProfile into statsd
pull constants from PowerProfile into statsd for power model
calculations. The data is mostly from power_profile.xml

power_profile {
  power_profile_proto {
    cpu_suspend: 5.734
    cpu_idle: 1.389
    cpu_active: 18.76
    wifi_controller_idle: 2.0
    wifi_controller_rx: 107.0
    wifi_controller_tx: 371.0
    wifi_controller_operating_voltage: 3700.0
    bluetooth_controller_idle: 0.01
    bluetooth_controller_rx: 8.0
    bluetooth_controller_tx: 7.0
    bluetooth_controller_operating_voltage: 3300.0
    modem_controller_idle: 105.0
    modem_controller_rx: 175.0
    modem_controller_tx: 176.0
    modem_controller_tx: 216.0
    modem_controller_tx: 300.0
    modem_controller_tx: 427.0
    modem_controller_tx: 604.0
    modem_controller_operating_voltage: 3700.0
    gps_signal_quality_based: 49.0
    gps_signal_quality_based: 11.0
    gps_operating_voltage: 3700.0
    screen_on: 178.708
    screen_full: 240.79
    audio: 75.6
    video: 50.93
    flashlight: 298.498
    camera: 1152.292
    battery_capacity: 3450.0
    cpu_cluster {
      cores: 2
      speed: 307200
      speed: 384000
      speed: 460800
      speed: 537600
      speed: 614400
      speed: 691200
      speed: 768000
      speed: 844800
      speed: 902600
      speed: 979200
      speed: 1056000
      speed: 1132800
      speed: 1209600
      speed: 1286400
      speed: 1363200
      speed: 1440000
      speed: 1516800
      speed: 1593600
      core_power: 11.272
      core_power: 14.842
      core_power: 18.497
      core_power: 22.518
      core_power: 25.967
      core_power: 31.694
      core_power: 37.673
      core_power: 42.859
      core_power: 46.872
      core_power: 57.92
      core_power: 67.561
      core_power: 76.303
      core_power: 87.613
      core_power: 97.045
      core_power: 109.544
      core_power: 122.054
      core_power: 136.345
      core_power: 154.435
    }
    cpu_cluster {
      id: 1
      cores: 2
      speed: 307200
      speed: 384000
      speed: 460800
      speed: 537600
      speed: 614400
      speed: 691200
      speed: 748800
      speed: 825600
      speed: 902400
      speed: 979200
      speed: 1056000
      speed: 1132800
      speed: 1209600
      speed: 1286400
      speed: 1363200
      speed: 1440000
      speed: 1516800
      speed: 1593600
      speed: 1670400
      speed: 1747200
      speed: 1824000
      speed: 1900800
      speed: 1977600
      speed: 2054400
      speed: 2150400
      core_power: 7.055
      core_power: 11.483
      core_power: 14.979
      core_power: 19.642
      core_power: 23.167
      core_power: 27.479
      core_power: 31.632
      core_power: 39.192
      core_power: 47.817
      core_power: 55.659
      core_power: 64.908
      core_power: 73.824
      core_power: 85.299
      core_power: 96.036
      core_power: 109.233
      core_power: 118.56
      core_power: 132.959
      core_power: 143.692
      core_power: 161.378
      core_power: 180.616
      core_power: 193.897
      core_power: 214.361
      core_power: 238.338
      core_power: 265.759
      core_power: 297.918
    }
  }
}

Bug: 113353350
Test: manual test on statsd
Change-Id: I1edd4db255c0440ddbff1d40e1515caaccbc73f8
2018-10-03 10:39:49 -07:00
Marcin Oczeretko
5a082f6da1 Make BinderCallsStats ignore invalid sampling interval
System Server crashes with ArithmeticException if sampling
interval is set to 0.

Test: Manual
Change-Id: Ia8f5437f5c1cdc68bed607147049abd70ed7af33
2018-10-02 16:17:43 +01:00
Tej Singh
e7726dc4af Add DiskIo to Statsd
Adds diskio information to statsd. The puller queries the
proc/uid_io/stats file to get cumulative counts since boot.

Bug: b/116331466

Test: unit test
Test: manually verified that the puller and "cat /proc/uid_io/stats"
returned almost identical output when executed at the same time

Change-Id: Iac446f8dd879ab6bf859eed6e779cc16fdee6c5b
2018-10-01 23:36:04 -07:00
Lucas Dupin
493cb6d5cb Merge "Renaming gesture" 2018-09-28 22:00:56 +00:00
Sudheer Shanka
3bc4ab482b Merge "Bind mount pkg specific dirs in the zygote child namespaces." 2018-09-28 20:34:02 +00:00
Lucas Dupin
13b0cb9890 Renaming gesture
Bug: 111414690
Test: make
Change-Id: I9d2a6507a942c56fe5b626d8dce46321ff70014b
2018-09-28 09:27:46 -07:00
Michael Dooley
7e833acdaf Merge "Revert "Revert "Revert "Adding getModelState API to sound trigger"""" 2018-09-28 07:38:34 +00:00
Michael Dooley
be93d52505 Revert "Revert "Revert "Adding getModelState API to sound trigger"""
This reverts commit 7999836ee3.

Reason for revert: broke build

Change-Id: Id02636908aed26ee0ed38042da1ace0125a6d417
2018-09-28 07:30:28 +00:00
Michael Dooley
ea3e73a879 Merge "Revert "Revert "Adding getModelState API to sound trigger""" 2018-09-28 06:24:43 +00:00
Stefano Tommasini
bf8b6c02f3 Merge "Move transport out of system server." 2018-09-28 03:04:05 +00:00
Sudheer Shanka
3f0645ba83 Bind mount pkg specific dirs in the zygote child namespaces.
- Also update vold to create sandboxes for secondary storage devices.
- Since bind mounts are created in the process specific namespaces, we
  don't need /mnt/storage anymore which we were using it to prevent
  some bind mounts from propagating onto /mnt/runtime/write.
- Create bind mounts for {media,obb} dirs similar to data dir in
  per process namespace.
- Also fix a bug where we are not passing correct packages to vold when
  a new user starts.

Bug: 111890351
Test: manual
Change-Id: I1abbafabc58993860305e5a928c980420f89f289
2018-09-27 14:43:45 -07:00
Olivier Gaillard
c2d02b522c Use the background thread instead ActivityManager to update CPU stats.
Updating the CPU stats can be quite slow and blocks the ActivityManager
handler thread.

Bug: 115506775
Change-Id: I9f67acfe2724c11d117703b2c4ccdbcc1f61c5ab
Test: manual - dumpsys batterystats | grep CPU
2018-09-27 13:42:48 +00:00
TreeHugger Robot
cc4cb59223 Merge "add api to get sections of procstats" 2018-09-26 15:07:51 +00:00
Chenjie Yu
4e028d067e add api to get sections of procstats
Add api to collect committed procstats data.
Use highwatermark from the user to filter which files to include. This
way multiple users in the system can use this api.

Also allow ProcessStats.java to dump optional ProcessStatsSectionProto
so that other users can use it.

Test: will add cts test
Change-Id: If37c0fd25814460a1c8d5996d24d138295ff6421
2018-09-25 16:41:26 -07:00
TreeHugger Robot
d6fb462d1e Merge "Remove a special optimization for a quite rare scenario" 2018-09-25 20:09:05 +00:00
Yohei Yukawa
d4d895e2f8 Remove a special optimization for a quite rare scenario
This CL effectively reverts the following 3 CLs.

 * Reduce window resizing during IME transition
   I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
   792faa2c16

 * Clear the inset of previous IME when necessary
   Ib04967f39b2529251e4835c42e9f99dba2cf43f2
   2977eb7b6c

 * Make IMS#clearInsetOfPreviousIme() reliable
   Ib567daa009c1139858dccadcfc6a04465ebecf36
   833bdcedce

The main idea behind the first CL is that the target application can
skil avoid layout resizing if the following two conditions are met.

 A. WindowManagerService (WMS) can remember the last IME's inset until
    the next IME's window is fully shown.
 B. Both the last IME and the new IME have the same inset.

Basically the first CL implements the above A part with an assumption
that some IMEs would do the B part.  However, in reality it is quite
unlikely that two random IMEs have the same inset size.  At the same
time, maintaining this kind of special optimization is getting harder
and harder as more and more use cases and form factors need to be
supported.

Let's remove this optimization given that no one is benefited by it.

Fix: 116492038
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: do not see any noticeable visual difference
Change-Id: I8ffbf9bf7c3a8be54df0ca8eac1a1f041ef7d3c9
2018-09-24 16:01:20 -07:00
Lucas Dupin
1596b659f4 Fix ambient color resolution
resolveColor() now considers that black backgrounds should have
monochromatic icons. Ambient style is an exception because we
do want colors in there.

Change-Id: Ia21202bb354babb77013feda67c313323ec1e070
Fixes: 115887386
Test: visual
2018-09-24 14:40:23 -07:00
Michael Dooley
7999836ee3 Revert "Revert "Adding getModelState API to sound trigger""
This reverts commit 81f71f1c27.

Reason for revert: undoing rollback

Change-Id: Ifddfd0c730f03e93788d662a392d538564ce210b
2018-09-21 12:13:01 +00:00
Kevin Chyn
6cf54e8190 3/n: Add FaceDialogView and "confirmation" plumbing
This change adds plumbing from <Biometric>Service to SystemUI for requiring
user confirmation (or not). This change also fixes some layout bugs
that were hard to notice.

Bug: 111461540
Fixes: 113130114
Fixes: 116135579

Test: With confirmation, crypto operation does not work until token
      is added to Keystore
Test: Without confirmation, crypto operation works when biometric is
      authenticated
Test: BiometricPromptDemo works, UI elements are all correct
Test: Talkback messages are correct

Change-Id: I2c05577699a29c09777cae4db6c7334c1e6bc179
2018-09-20 17:53:10 -07:00
Marcin Oczeretko
e0ef793d0a Merge changes If217a9a8,I35af3a9c
* changes:
  LooperStats - don't create entries for unsampled sessions
  Add work source uid collection to LooperStats
2018-09-20 19:43:07 +00:00
Marcin Oczeretko
a674bc9eaf LooperStats - don't create entries for unsampled sessions
This should reduce the size of the data, because we will
not track the very rare calls unless we are collecting
a detailed sample.

Test: Manual and UTs
Change-Id: If217a9a848935878a6efcdfac9df723c6ce54361
2018-09-20 10:52:18 +01:00
Marcin Oczeretko
ec7587283f Add work source uid collection to LooperStats
Add ThreadLocalWorkSourceUid and Message.workSourceUid
which will store the UID which caused, directly or
indirectly, the Message to be enqueued.

This was needed because using Binder.getCallingUid() does
not give us enough data since quite a few Binder services
call Binder.clearCallingIdentity() when processing the
call.

Test: UT and manual
Change-Id: I35af3a9ca5193477070990b41ff5d9c52f420069
2018-09-20 10:52:08 +01:00
Yohei Yukawa
a71bb25cff Let IMMS be responsible for IInputMethodClient lifecycle
This is the last step to remove the dependency on IInputMethodClient
from WindowManagerService.

With my previous CL [1], now WindowManagerService (WMS) depends on
IInputMethodClient just because it implements lifecycle management of
IInputMethodClient on behalf of InputMethodManagerService (IMMS).

This CL mechanically moves that responsibility from WMS to IMMS for
better separation of concerns.  It is a bit ironic that this CL is
partly undoing my previous CLs [2][3] that removed
IInputMethodManager.addClient() though.

This CL aims to preserve the current observable behavior (e.g. when
InputMethodManager instance is being created) as much as possible.
Most likely there would be no observable behavior difference when seen
from other components.

 [1]: I444077b1e4af4033f67ab72c181fac85b601e08a
      41f89c3bcc
 [2]: I453200fd5847e9a78876affb6a1caec221525e1d
      e24ed79edb
 [3]: Id91dd600120e4981aa1d9005ce644728968430c9
      fffc0e53c6

Fix: 115993358
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I7726c70613ea72d6e78fa5754e9fc840f0a40f11
2018-09-19 19:21:24 -07:00
Yuzhou Jia
35339498ef Merge "Make Changes to VoiceInteraction API for supporting System checking an assistant voice action availability on AAE." 2018-09-20 01:02:44 +00:00
TreeHugger Robot
b6ffc07e06 Merge "Remove the dependency on IInputMethodClient from IME focus check" 2018-09-20 00:19:35 +00:00
Yohei Yukawa
41f89c3bcc Remove the dependency on IInputMethodClient from IME focus check
This is a preparation to remove the dependency on IInputMethodClient
from WindowManagerService.

What inputMethodClientHasFocus(IInputMethodClient) is currently doing
is basically equivalent to comparing PID (and UID), because
InputMethodManager is a per-process instance and comparing two
IInputMethodClient Binder proxies is no more or less than comparing
PID (and UID pair).  We can just change its method signature to
achieve the same behavior by taking a PID/UID pair instead of taking
IInputMethodClient.

Note that we can later add display ID to this method to support
multi-display scenario.

This CL also renames inputMethodClientHasFocus() to
isInputMethodClientFocus() for better consistency with other methods.

There should be no observable behavior difference in this CL anyway.

Bug: 115993358
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I444077b1e4af4033f67ab72c181fac85b601e08a
2018-09-19 14:30:04 -07:00
jiayuzhou
21a353b701 Make Changes to VoiceInteraction API for supporting System checking
an assistant voice action availability on AAE.

Test: build and test on AAE.
Bug: 110587280

Change-Id: If37036e0dbe021fee9c95caf7e450330ca24ae32
2018-09-19 10:21:59 -07:00
TreeHugger Robot
bd5fed399f Merge "Let InputMethodPrivilegedOperationsRegistry deal with its singleton-ness" 2018-09-19 16:48:54 +00:00
Tony Huang
b3e5edd5ea Merge "Fix ExternalStorageProvider always throw exception when rename" 2018-09-19 02:56:00 +00:00
Yohei Yukawa
d746a7e893 Let InputMethodPrivilegedOperationsRegistry deal with its singleton-ness
This is a preparation to allow InputMethodManager to have per-display
instances rather than the current per-process singleton instance.

When I introduced InputMethodPrivilegedOperationsRegistry [1], there
was an assumption that InputMethodManager was a per-process global
singleton object.

Now that we are going to break up that global per-process instance
into multiple per-display instances, having multiple
InputMethodPrivilegedOperationsRegistry instances probably does not
make much sense, because it would likely to increases the risk of
compability issues in existing IMEs.  Although IME developers soon
really need to use the right Context to obtain the right instance of
InputMethodManager anyway, unnecessarily introducing compatibility
pitfalls that can be avoided in the Framework side is not my
intention.

With this CL, following 9 methods can continue to work no matter
whether InputMethodManager is a per-process singleton or not.
This is fine because those APIs had been mistakenly exposed in
InputMethodManager and already deprecated in favor of newly added ones
in InputMethodService.

 * InputMethodManager.hideSoftInputFromInputMethod
 * InputMethodManager.hideStatusIcon
 * InputMethodManager.setInputMethod
 * InputMethodManager.setInputMethodAndSubtype
 * InputMethodManager.shouldOfferSwitchingToNextInputMethod
 * InputMethodManager.showSoftInputFromInputMethod
 * InputMethodManager.showStatusIcon
 * InputMethodManager.switchToLastInputMethod
 * InputMethodManager.switchToNextInputMethod

 [1]: If762714b2003fa6477e1318110f63e13968c1d7e
      eec552e9e9

Bug: 115893206
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I4a61470f06ffac5f7a512536f8431489db0108f4
2018-09-18 18:55:02 -07:00
TreeHugger Robot
3427156b2c Merge "More robust read mechanism in KernelCpuProcReader" 2018-09-18 23:54:14 +00:00
Mike Ma
9dcf7e342f More robust read mechanism in KernelCpuProcReader
KernelCpuProcReader used FileChannel to dump bytes into a large enough
ByteBuffer. However, FileChannel#read stops as soon as there is nothing
left to read. Since the kernel may not deliver all parts of a proc file
simultaneously, previous read mechanism would possibly read only a
portion of the proc file. The impact is that KernelUidCpuFreqTimeReader
gets an incomplete UID list.
New mechanism uses a loop to turn non-blocking FileChannel#read into a
blocking operation. It does not return until hitting EOF. The reason
not to use Files#readAllBytes is that we want to reuse the byte[].

Bug: 111805985
Test: atest KernelCpuProcReaderTest
Test: compared KernelCpuProcReader#readBytes against Files#readAllBytes
      locally
Change-Id: If0d2b6742489632e22c8fec34c627851cda875f2
2018-09-18 22:14:26 +00:00
Bookatz
c77b02028e Merge "Unifying source of statsd BleScan calls and cleaning it up." am: 056a095dd3 am: 7ed0147613
am: 18852e3636

Change-Id: Ifcc5f22a921f6f4d50eb47a329aa2e3db61410ef
2018-09-17 14:59:41 -07:00
Bookatz
18852e3636 Merge "Unifying source of statsd BleScan calls and cleaning it up." am: 056a095dd3
am: 7ed0147613

Change-Id: Ied0f4683311276d2c643e882f57f8a21943aebe3
2018-09-17 11:45:14 -07:00
Bookatz
7ed0147613 Merge "Unifying source of statsd BleScan calls and cleaning it up."
am: 056a095dd3

Change-Id: I5ddc0d20c96439328c37d0a49f7fa6c4c90d6e14
2018-09-17 11:28:30 -07:00
Marcin Oczeretko
3e6494eb3e Prepare LooperStats to be collected as a Westworld gauge matric
- call LooperStats.reset() from StatsCompanionService
- add screen_interactive to the LooperStats atom
- temporarily set uid = 1000 to avoid statsd warnings that the uid is invalid

Bug: 113651685
Test: Manual and UTs
Change-Id: Iacf45fcb746c6bb9837456a2a0c74f5a073ff822
2018-09-17 17:25:55 +01:00
Rhed Jao
b11b75ac50 Merge "Spoken feedback when a11y shortcut dialog is shown" 2018-09-17 08:37:11 +00:00
TreeHugger Robot
6c054d118a Merge "Fix velocity reporting for negative values > -1" 2018-09-15 21:00:22 +00:00
TreeHugger Robot
134ffb0c25 Merge "Move 3 IMMS utility classes to services.jar" 2018-09-15 17:20:28 +00:00
TreeHugger Robot
a02f4332b3 Merge "Extract constructLocaleFromString()" 2018-09-15 16:58:05 +00:00
TreeHugger Robot
ef25beb18a Merge "Extract getSuitableLocalesForSpellChecker()" 2018-09-15 16:40:23 +00:00
TreeHugger Robot
abcfcbbbfe Merge "Move LazyIntToIntMap to services.jar" 2018-09-15 01:07:59 +00:00
Michael Dooley
c106550132 Merge "Revert "Adding getModelState API to sound trigger"" 2018-09-14 16:21:17 +00:00
Michael Dooley
81f71f1c27 Revert "Adding getModelState API to sound trigger"
This reverts commit 4f809fe73e.

Reason for revert: fix build breakage

Change-Id: I75a54189f96fc21f6cb12dd8a05e513b1bda027c
2018-09-14 16:09:18 +00:00
Mathew Inwood
db0657a4f4 Merge "Move some members to the "Q blacklist"." 2018-09-14 13:54:28 +00:00
Michael Dooley
a707ba1cb0 Merge "Adding getModelState API to sound trigger" 2018-09-14 12:32:09 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
Bookatz
ae6738ed2a Unifying source of statsd BleScan calls and cleaning it up.
Bug: 80308558
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Change-Id: I0b4a0b56631b4354b73f0fafea2c0dc7dff248d1
2018-09-13 18:48:10 +00:00