Commit Graph

9542 Commits

Author SHA1 Message Date
Vladislav Kaznacheev
5c78c2a10a Merge "Display shortcut inline with item title in cascading menu" into pi-dev am: ae957a780e
am: a26f82e9af

Change-Id: I3b6b532736a12b10ec0646608832216266c8c378
2018-03-09 15:03:02 +00:00
Vladislav Kaznacheev
a26f82e9af Merge "Display shortcut inline with item title in cascading menu" into pi-dev
am: ae957a780e

Change-Id: I484cb6f01191ac5ce044fd94f7e32970aec2dfb1
2018-03-09 14:29:00 +00:00
Erik Kline
0aeae36fc5 Merge "Add BaseNetdEventCallback class that provides no-op implementations for INetdEventCallback." am: 59787b4247 am: 30563dee52
am: 4ea65c2f00

Change-Id: Ib0c4b69a24144d27f672ec716fb9a8f06987ce7d
2018-03-09 10:14:21 +00:00
Erik Kline
4ea65c2f00 Merge "Add BaseNetdEventCallback class that provides no-op implementations for INetdEventCallback." am: 59787b4247
am: 30563dee52

Change-Id: I1ed5ede74ca14718e6d4f8a9a8d57de6026c9e93
2018-03-09 07:24:30 +00:00
Erik Kline
30563dee52 Merge "Add BaseNetdEventCallback class that provides no-op implementations for INetdEventCallback."
am: 59787b4247

Change-Id: I63d8b36ec1594134bce8c60eb653e9b53a1b1963
2018-03-09 07:01:21 +00:00
Erik Kline
59787b4247 Merge "Add BaseNetdEventCallback class that provides no-op implementations for INetdEventCallback." 2018-03-09 04:49:51 +00:00
Vladislav Kaznacheev
bf7cc38d1f Display shortcut inline with item title in cascading menu
Bug: 74208750
Test: run android.widget.cts.PopupMenuTest on a large screen device
  such as hikey960.

Change-Id: I1c4bca3cfecb012432e6cb89cb4cc0177ccc04f9
2018-03-08 23:08:41 +00:00
Mike Ma
726f11d2ec Merge "Remove PowerProfile.POWER_NONE" into pi-dev am: 25ebcdb28c
am: b2c0449796

Change-Id: I77dde61610b17d6c264833f6ef7deca63ad33211
2018-03-08 21:45:15 +00:00
dalyk
985d89a6e0 Add BaseNetdEventCallback class that provides no-op implementations for INetdEventCallback.
Test: None
Bug: 71828272
Change-Id: I75e0620f82195f18befe9dc079492a8c69bb764b
2018-03-08 16:35:57 -05:00
TreeHugger Robot
25ebcdb28c Merge "Remove PowerProfile.POWER_NONE" into pi-dev 2018-03-08 20:14:30 +00:00
Mike Ma
8db14d7d9a Remove PowerProfile.POWER_NONE
Change-Id: I49b3f3989a675bcb1ef83f5b86a55f3f5a0d3b2f
Fixes: 74389802
Test: com.android.internal.os.PowerProfileTest
2018-03-08 10:14:46 -08:00
Chenjie Yu
c8a6305ddf Merge "Refactor cpu stats pullers" into pi-dev 2018-03-08 00:24:00 +00:00
Kevin Chyn
3c3f48880e Merge "Don't store lockout deadline in lockSettings" into pi-dev am: 7f8967e3ce
am: f71e2f4ec9

Change-Id: Ie3728420dd97bb99a835a577a64bb48f8e0cde49
2018-03-08 00:15:37 +00:00
Chenjie Yu
ec67661bdf Refactor cpu stats pullers
use same cpu stats readers with BatteryStats so that
1) both throttle to avoid too frequent pulls
2) cached value is served within throttle interval to avoid double
pulling by both statsd and BatteryStats

To run unit tests:
bit
FrameworksCoreTests:com.android.internal.os.KernelUidCpuFreqTimeReaderTest
bit
FrameworksCoreTests:com.android.internal.os.KernelUidCpuClusterTimeReaderTest
bit
FrameworksCoreTests:com.android.internal.os.KernelUidCpuActiveTimeReaderTest

make -j56 statsd_test && adb sync data && adb shell
/data/nativetest64/statsd_test/statsd_test

Test: cts test, unit test
Bug: 73745189
Bug: 73780619
Bug: 73360959

Merged-In: I10a9bc91ca67fa812f4cd71c4fbd73c1a5ba580e

Change-Id: I10a9bc91ca67fa812f4cd71c4fbd73c1a5ba580e
2018-03-07 21:43:00 +00:00
Kevin Chyn
a3e5582fac Don't store lockout deadline in lockSettings
The deadline is enforced in gatekeeper, which persists after reboot.
Users should not see the lockout timer after rebooting the device if it
was previously in lockout, until an unlock attempt occurs.

Fixes: 66443036

Test: 1) fail pattern five times
2) reboot device
3) go to bouncer, lockout timer should not show
4) upon entering pattern, timeout should show (if done fast enough)

Change-Id: Ie07945b40c2f482fd1df7102ba96283ae9d98d75
2018-03-07 17:18:12 +00:00
Tarandeep Singh
01041c97ff Merge "IME API: rename IMS methods." into pi-dev am: 2b00eaed27
am: 327c666924

Change-Id: I49cfc349a87cd6b9d116b67102178d0bf6219f3d
2018-03-07 03:38:54 +00:00
Mike Digman
d6d81047cb Merge "Reset user rotate pref on navbar create" into pi-dev am: 4ef95e2531
am: 289bf049c3

Change-Id: I1e250f7ef34205d419edb2330488d27535d08b7c
2018-03-07 01:41:55 +00:00
TreeHugger Robot
2b00eaed27 Merge "IME API: rename IMS methods." into pi-dev 2018-03-07 00:19:55 +00:00
Mike Digman
4ef95e2531 Merge "Reset user rotate pref on navbar create" into pi-dev 2018-03-06 23:04:54 +00:00
Siddharth Ray
a09adc6db1 Merge "Obtain cellular related battery statistics"
am: 4b0172bcb6

Change-Id: I364d329e92a6bd92ce601d34c94a92c91f09eb38
2018-03-06 20:08:15 +00:00
Mike Digman
ab65025833 Reset user rotate pref on navbar create
System appears in portrait after restart, however rotation
watcher callbacks don't fire leaving user rotate pref stale
from last boot. Reset in onCreate and replace override logic
with policy's natural rotation.

Test: manual
Change-Id: Ia1f1e5f637708e5c678edbb5cbf9f4125e451103
2018-03-06 11:40:03 -08:00
Mike Ma
6f1746aa43 Merge "Power profile audio & video support" into pi-dev am: 1ab03020db
am: eece6eb9df

Change-Id: I53ea0a6f2453f56f18848638d07ef5194973824c
2018-03-06 10:24:41 +00:00
TreeHugger Robot
00cbd158f8 Merge "Refactor cpu stats pullers" 2018-03-06 03:26:26 +00:00
Tarandeep Singh
164cfba536 IME API: rename IMS methods.
Incorporating API Review feedback:
* Use IMS.switchInputMethod(id) instead of IMS.setInputMethod()
* Use IMS.switchInputMethod(id, subtypeId) instead of
  IMS.setInputMethodAndSubtype()
* Renamed switchToLastInputMethod() to switchToPreviousInputMethod()

Bug: 73954137
Test: atest InputMethodServiceTest
Test: atest CtsInputMethodServiceHostTestCases
Change-Id: I6efd5ca473e33e6faeadb7eea7772b9d2b8ca12b
2018-03-06 02:23:15 +00:00
Mike Ma
07305c0b46 Power profile audio & video support
Add power consumed by audio and video hardware to power profile.
Attribute these power to specific app.
Bug: 70531798
Test: PowerProfileTest
Test: BatteryStatsHelperTest
Test: PowerCalculatorTest
Change-Id: I4811efa14ce97983258cd59bfd328181fe95baf4
2018-03-05 18:06:29 -08:00
Chenjie Yu
f248047d74 Refactor cpu stats pullers
use same cpu stats readers with BatteryStats so that
1) both throttle to avoid too frequent pulls
2) cached value is served within throttle interval to avoid double
pulling by both statsd and BatteryStats

To run unit tests:
bit FrameworksCoreTests:com.android.internal.os.KernelUidCpuFreqTimeReaderTest
bit FrameworksCoreTests:com.android.internal.os.KernelUidCpuClusterTimeReaderTest
bit FrameworksCoreTests:com.android.internal.os.KernelUidCpuActiveTimeReaderTest

make -j56 statsd_test && adb sync data && adb shell /data/nativetest64/statsd_test/statsd_test

Test: cts test, unit test
Fix: 73745189
Fix: 73780619
Fix: 73360959

Change-Id: I10a9bc91ca67fa812f4cd71c4fbd73c1a5ba580e
2018-03-05 15:47:39 -08:00
TreeHugger Robot
827eafb04e Merge "Display shortcut modifiers in menu" 2018-03-05 18:05:19 +00:00
TreeHugger Robot
f8f0c8df78 Merge "Revert "Introduce InputConnection#reportLanguageHint()"" 2018-03-03 23:36:37 +00:00
Phil Weaver
3fd86ed8d1 Merge "Change a11y shortcut default lockscreen behavior" 2018-03-03 03:35:34 +00:00
Chenjie Yu
ae1797d13d Merge "Avoid double logging for app overlay" 2018-03-03 03:26:23 +00:00
Yohei Yukawa
4397591f3d Revert "Introduce InputConnection#reportLanguageHint()"
This reverts commit e77386e8fb [1].

Reason for revert:
The protocol is not yet ready to be exposed and we are still unsure
what is the best approach.

 [1]: Ie86edafd1ed68b58f702116f561fc448fdbb57a8

Bug: 7031513
Bug: 72522601
Fix: 74087970
Test: atest CtsInputMethodTestCases
Change-Id: Ia61dc9b3d5b116199382994430fb16ee804942b3
2018-03-02 17:35:18 -08:00
TreeHugger Robot
b0ebe11b74 Merge "Report total latency instead of average for jobs last run" 2018-03-03 00:14:22 +00:00
Phil Weaver
c5865d6f1b Change a11y shortcut default lockscreen behavior
If the user hasn't chosen a preference, the shortcut
will not work on the lockscreen until the user agrees
to use the shortcut. After the user so agrees, the
shortcut will also work on the shortcut.

Bug: 70944865
Test: Adding a test for the new behavior
Change-Id: I41e1238fad43a4432cd341c6808e26ad6e155506
2018-03-02 16:00:43 -08:00
TreeHugger Robot
d59073ab2a Merge "Add hooks for custom global actions handling without a status bar." 2018-03-02 21:32:34 +00:00
TreeHugger Robot
df7105a993 Merge "Re-enable cross-profile use of spell checker APIs" 2018-03-02 21:20:47 +00:00
Siddharth Ray
073f5de149 Obtain cellular related battery statistics
API to obtain cellular battery stats for power
drain diagnostics.

Test: Manual

BUG:67647477
Merged-In: Iffdb1471cd55847b6454313c94497ab2cd6533cc
Change-Id: Iffdb1471cd55847b6454313c94497ab2cd6533cc
2018-03-02 20:06:18 +00:00
TreeHugger Robot
1bd402b86d Merge "Power profile improvement: support ambient display" 2018-03-02 19:15:34 +00:00
TreeHugger Robot
d289623ed0 Merge "More granular logging when proc file not exist" 2018-03-02 18:00:22 +00:00
Vladislav Kaznacheev
f1aab4de20 Merge "Add ViewConfiguration.shouldShowMenuShortcutsWhenKeyboardPresent" 2018-03-02 17:34:04 +00:00
Bo Zhu
0f0d1ab1d3 Merge "Check the public-key signature of the whole certificate file before accepting the certificates" 2018-03-02 08:52:36 +00:00
Mike Ma
eb0d8a7b91 Power profile improvement: support ambient display
Add ambient display power to power usage calculation.
Corresponding field in power_profile is "ambient.on"

Bug: 70531652
Test: PowerProfileTest
Test: BatteryStatsHelperTest
Change-Id: I4dfad12875af42de9d517c917b6c1e99323c9fbf
2018-03-01 18:40:16 -08:00
Chenjie Yu
08d6d728c7 Avoid double logging for app overlay
Right now if an app is TYPE_APPLICATION_OVERLAY, it gets logged twice

Fix: 73952594
Test: manual test and cts test
Change-Id: Ieca79545c76f0773cb939efd236705a067bb1e6d
2018-03-01 18:03:08 -08:00
Amith Yamasani
0ca706bb9e Report total latency instead of average for jobs last run
Instead of computing the average on the device, upload the
total sum of the latencies. Server can divide by the event count
if it wants to get the average.

Also change the latency buckets to 1 hr, 2 hrs, 4 hrs, 8 hrs and
greater than 8 hrs.

Bug: 70297451
Test: launch an app
      dumpsys batterystats --checkin | grep jbd,
      Observe the dumped values for the app

Change-Id: Iecda808594fc960fb16fa0407e5875bbc47db43a
2018-03-01 17:32:53 -08:00
Mike Ma
363ccf7282 More granular logging when proc file not exist
KernelCpuProcReader records a horrifying exception when the proc file
does not exist, creating confusion that this is the source of error.
Bug: 74074575
Test: KernelCpuProcReaderTest

Change-Id: Ib35e114cd78e1e9f424adf66da5eb85da9f6fe5f
2018-03-01 14:55:29 -08:00
Vladislav Kaznacheev
0cc2c6b190 Display shortcut modifiers in menu
Prepend relevant meta key names (such as Ctrl+) to the shortcut
displayed in a menu.

Do not prepend "Menu+" if the device does not have a hardware Menu key.

Bug: 31045453
Test: run ApiDemos (MenuInflateFromXml), select "Shortcuts", observe
  Ctrl+ prepended to shortcuts.

Change-Id: I1a38bd1baf069dd1adb24a26f89c6db6390b8b8d
2018-03-01 14:20:01 -08:00
Michael Kwan
2decbf7ae4 Add hooks for custom global actions handling without a status bar.
Bug: 31802693
Test: manual test
Change-Id: I24c312ccd06e3eee3563b2f9c16d620aa5b2421e
2018-03-01 13:13:20 -08:00
Yohei Yukawa
3f8c568883 Re-enable cross-profile use of spell checker APIs
Recently we successfully removed the restriction that up to one
SpellCheckerService can be active at the same time [1].  This still
makes much sense at high level, but at the ecosystem level there are
still some products / components that depend on the previous behavior
that child profile users can use parent profile's spell checker
service, which was originally introduced as a stopgap solution for
Android N MR1 [2].

Our decision for Android P for now is to revert back to the previous
behavior only when the calling process is running under work
profile.

At the implementation level, we can summarize the new behavior as
follows:
 * When TextServicesManager APIs are called from work-profile
   processes, those API calls will be evaluated with parent-profile's
   user ID to match the previous behavior [2].
   * If the currently selected spell checker is not a pre-installed
     one, then API calls from work profile will fail to match the
     previous behavior [2].
 * When TextServicesManager APIs are called from non work-profile
   processes, those API calls will continue being evaluated with
   calling user ID, as we planned for Android P [1].
 * TextServicesData will not be created for child profile users.

 [1]: I06c27ef834203a21cc445dc126602c799384527b
      06a2624049
 [2]: Iae9045ba5baccd04ed68906e7afb9160677ec4a5
      095fa37164

Bug: 63041121
Bug: 64718412
Bug: 70922751
Bug: 73609140
Fix: 73862883
Test: atest FrameworksCoreTests:com.android.internal.textservice.LazyIntToIntMapTest
Test: Manually tested with Test DPC as follows:
      * When AOSP Spell Checker is pre-installed and the current spell
        checker, both main profile and work profile can use AOSP spell
        checker.
      * When SampleSpellCheckerService is side-loaded and the current
        spell checker, only main profile can use
        SampleSpellCheckerService.
Change-Id: Ic046f832f203115106409a53418a5746eb6d4939
2018-03-01 13:10:23 -08:00
Adrian Roos
90c27c332a Merge "DisplayCutout: Add xml wrapper for layoutInDisplayCutoutMode" 2018-03-01 13:57:22 +00:00
TreeHugger Robot
06b1df657a Merge "Use start/finish app ops in window manager" 2018-03-01 01:11:25 +00:00
TreeHugger Robot
364eb30647 Merge "addModemTxPowerToHistory() made synchronized" 2018-03-01 01:06:38 +00:00