Commit Graph

7407 Commits

Author SHA1 Message Date
Peeyush Agarwal
651ea36f5a Merge "Extend MenuItem to allow modifier keys for shortcut" 2017-02-09 11:17:25 +00:00
TreeHugger Robot
6c0e600257 Merge "Fix ImeSubtypeListItem ordering" 2017-02-09 08:25:36 +00:00
Yohei Yukawa
a0e468ac33 Merge "Avoid sync IPCs from TSMS to SpellCheckerService" 2017-02-09 05:11:04 +00:00
Tadashi G. Takaoka
61dd99b674 Fix ImeSubtypeListItem ordering
The previous CL (I47f902cc8f) fixed ImeSubtypeListItem.compareTo() is
compliant to Comparable#compareTo(T) (Bug 34255739) and introduced the
following order of comparing ImeSubtypeListItem fields.

  1. ImeSubtypeListItem#mImeName
  2. ImeSubtypeListItem#mSubtypeName
  3. ImeSubtypeListItem#mIsSystemLocale
  4. ImeSubtypeListItem#mIsSystemLanguage

But it didn't keep the previous ordering (Bug 34821121).  This CL
fixes the order of comparing ImeSubtypeListItem fields as compatible
as ones before I47f902cc8f.

  1. ImeSubtypeListItem#mImeName
  2. ImeSubtypeListItem#mIsSystemLocale
  3. ImeSubtypeListItem#mIsSystemLanguage
  4. ImeSubtypeListItem#mSubtypeName

Bug: 34255739
Fixes: 34821121
Test: Install FramewroksCoreTests.apk and run
      InputMethodSubtypeSwitchingControllerTest and verify all tests passed.
Change-Id: I813403fd29c5c52a3ca375174ec4b95e4b5433f2
2017-02-09 12:30:03 +09:00
TreeHugger Robot
4127c138e1 Merge "FloatingToolbar: Support for menu groups." 2017-02-08 20:19:52 +00:00
Yohei Yukawa
7fa65eef20 Avoid sync IPCs from TSMS to SpellCheckerService
Currently, TextServicesManagerServices uses an AIDL interface called
ISpellCheckerService when binding to a spell-checking service.
However, this interface uses synchronous (blocking) binder calls
rather than asynchronous (oneway) calls.  As a result, there are
situations where the system process has made a blocking binder call
into untrusted application code from its main looper thread.

As general policy, the system process must never allow its looper
threads to block on application code.

This CL addresses the above issue by converting ISpellCheckerService
into oneway interface, which instead takes a result receiver
ISpellCheckerServiceCallback so that spell-checking services can
return results asynchronously.

Note that the above protocol issue was also the root cause of
Bug 5471520.  Hence we can also logically revert the previous CL [1]
for Bug 5471520.

 [1]: Iedf2c2cdd8d4834545d06d72ade3ce211b104b1d
      4e713f1441

Test: Ran `adb shell dumpsys textservices` to check the
      "Spell Checker Bind Groups:" section in the following three
      steps.
      1. Before apps start requesting spell checker sessions.
      2. While apps are owning active spell checker sessions.
      3. After all the apps that owned spell checker sessions are
         gone.
      Made sure that spell checker service is not running when
      there is not spell checker bind group.
Bug: 7254002
Change-Id: I92e7aa40dc9ea14f67d355f0bfa15325b775d27b
2017-02-08 11:54:05 -08:00
Abodunrinwa Toki
5fedfb8d46 FloatingToolbar: Support for menu groups.
1. Menu groups are now separated by dividers
2. Update to menu item spacing as specified in new UX mocks
3. TextView-Editor now passes the "assist" menu as a group
4. "Share" menu reordered after "Cut/Copy/Paste" as per UX mocks update.

Test: Manual tests.
Bug: 34777048
Bug: 34777833
Change-Id: I3d435d8a38e5b146a54706f12dbf3ff629c504bf
2017-02-08 16:55:26 +00:00
Rubin Xu
b94a914c9e Merge "Small tweaks in LockSettingsService" 2017-02-08 16:04:27 +00:00
Paul Duffin
ca4964ccbe Replace com.android.internal.util.Predicate with java.util.function.Predicate
Bug: 35089332
Bug: 30188076
Test: make checkbuild
Change-Id: I0a5b4bf520fc39b59d8d790b01e9cff0d54e6d21
2017-02-08 11:55:39 +00:00
Paul Duffin
80f42edfc7 Merge "Fix problem with JavaDoc" am: 8f33fcdc4b am: 4929aafc1d am: 290274df0d
am: d0a937e84b

Change-Id: Ic0e67021a5423b48bcf7d6ec8b903321d855e3aa
2017-02-08 11:43:36 +00:00
Paul Duffin
d0a937e84b Merge "Fix problem with JavaDoc" am: 8f33fcdc4b am: 4929aafc1d
am: 290274df0d

Change-Id: I4e9ef88d6aa6c69a35b6b995ebf0b90214aef79d
2017-02-08 11:39:15 +00:00
Paul Duffin
290274df0d Merge "Fix problem with JavaDoc" am: 8f33fcdc4b
am: 4929aafc1d

Change-Id: I08c9f20c34a2952105854d107b442884dba220b1
2017-02-08 11:35:19 +00:00
Paul Duffin
b5c09b5487 Fix problem with JavaDoc
Test: make checkbuild
Change-Id: Ia321e0a57ff63aa62adee16d611c063a22807176
2017-02-08 09:16:18 +00:00
Yohei Yukawa
3bcef52d7c Merge "Propagate StartInputReason to attachNewInputLocked" 2017-02-08 07:29:30 +00:00
Ian Pedowitz
4561f90194 Merge "Logging and partial fix for BatteryStats lock contention" 2017-02-08 02:02:17 +00:00
Hakan Seyalioglu
afa21fac6a Merge "Use default icons while disambig sheet is loading" 2017-02-08 00:44:45 +00:00
Amith Yamasani
d2450862f4 Logging and partial fix for BatteryStats lock contention
Don't try to grab the write lock while holding BatteryStats lock.

Add some debugging to see if cpu stats gathering is causing a
delay in some cases.

Bug: 34961340
Test: Manual
Change-Id: I8c7d1abb239abd81a07171cd65be1fbfdbca5fdb
2017-02-07 16:00:32 -08:00
Winson Chung
cd161864a3 Merge changes I3ef361bd,I89a5184c
* changes:
  Refactor PiP logic in preparation for expanded state.
  Modifying RemoteAction callback to PendingIntent.
2017-02-07 21:18:15 +00:00
Hakan Seyalioglu
23f3465f62 Use default icons while disambig sheet is loading
bug: 34254941
Test: manual testing and check coretests pass
Change-Id: I8cae7ee98628ef3d69fddd6374bcbf91d8a1873c
2017-02-07 11:49:37 -08:00
Makoto Onuki
f34f9736a9 Merge "Fix PSS/USS Average in procstats" 2017-02-07 17:11:45 +00:00
Peeyush Agarwal
e631e32a1a Extend MenuItem to allow modifier keys for shortcut
Before this, CTRL was the default modifier for MenuItem shortcuts.
Now, It's possible to specify the modifier in XML or via MenuItem
methods.
The modifier list includes META, CTRL, ALT, SHIFT, SYM and FUNCTION.

WIP on support library implementation

Bug: 32165848
Test: Run the tests using following commands:
> cts-tradefed run cts-dev -m CtsViewTestCases -t
>   android.view.cts.MenuTest#testPerformShortcut
> cts-tradefed run cts-dev -m CtsViewTestCases -t
>   android.view.cts.MenuInflaterTest#testInflateShortcutModifiersFromXml

Change-Id: I7db4607d4657451934761914efe4c250de109653
2017-02-07 17:01:26 +00:00
Winson Chung
2a82fe587b Refactor PiP logic in preparation for expanded state.
- #1: Move logic for handling IME size changes into SysUI, and only rely
      on PinnedStackController to provide bounds when first entering
      PiP and on rotation
- #2: Doing #1 allows us to move PipMotionHelper to SysUI completely, which
      lets us aggregate the animation calls out of PipTouchHandler
- #3: Add proper callbacks to the listeners when the movement bounds
      changed from config change, ime change, or aspect ratio change. This
      allows SysUI to calculate the associated movement bounds for the
      expanded state, and we can then remove the corresponding WM call.
      It also means that SysUI is the only thing that needs to know about
      the expanded state.
- #4: Fix issue where TV was getting the default bounds, not taking the
      aspect ratio when the PiP was entered into account.  Doing #3
      allows us to report the right bounds.
- #5: Remove dead code related to edge snapping/minimizing now that they
      are on by default and associated tuner setting, and controller
      callbacks

Test: android.server.cts.ActivityManagerPinnedStackTests (all existing tests pass)

Change-Id: I3ef361bdf8d44094b4c0a11c70ba4db7d697fdec
Signed-off-by: Winson Chung <winsonc@google.com>
2017-02-07 08:26:36 -08:00
Yohei Yukawa
87ca8406d4 Propagate StartInputReason to attachNewInputLocked
As a preaparation to work on Bug 35079353, this CL makes it clear that
IMS#startInput()/IMS#restartInput() can be also be triggered by
IMMS#onSessionCreated().

By doing this, we can now assume that each
IMS#startInput()/IMS#restartInput() event has always one corresponding
StartInputReason. In a subsequent CL, we will pass this to the IME
process (and to the app process) for further traceability.

Test: no behavior change.
Bug: 35079353
Change-Id: I604e35b023d27b77126cd70fe068dc6b5edc2611
2017-02-07 00:13:14 -08:00
Makoto Onuki
34a6e84456 Fix PSS/USS Average in procstats
It was broken in I4bf6ac8d, meaning it was broken for the whole NYC.

Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l DEBUG -m CtsDumpsysHostTestCases -t android.dumpsys.cts.ProcessStatsDumpsysTest
Bug 34228624

Change-Id: I0f6c984e6902e688f00442cbc8b999b397a25aaf
2017-02-06 17:32:29 -08:00
Ying Wai (Daniel) Fan
df6a737108 Prevent division-by-zero error when calculating battery capacity. am: 415f8b32e8
am: 63f3dbae3c

Change-Id: I1c97aa2e4c0bbc84c547e4ce3ff98b77c5bba3f4
2017-02-06 23:02:08 +00:00
Ying Wai (Daniel) Fan
63f3dbae3c Prevent division-by-zero error when calculating battery capacity.
am: 415f8b32e8

Change-Id: I1337db6391a9511df52560e8edb8a09260e27c5f
2017-02-06 22:57:23 +00:00
Eugene Susla
444eb97c0c Merge "CompanionDeviceManager" 2017-02-06 22:19:54 +00:00
TreeHugger Robot
fbffd434df Merge "Adding text input mode to TimePicker." 2017-02-06 21:35:26 +00:00
TreeHugger Robot
cd1d343ffd Merge "StatusBar: Clean up buzzBeepBlinked and friends" 2017-02-06 21:17:03 +00:00
Eugene Susla
6ed45d8cd3 CompanionDeviceManager
This introduces an API for apps that support companion devices to provide a
more streamlined flow for pairing and setting up the device

Bug: 30932767
Test: Using a toy app, invoke the newly introduced API (CompanionDeviceManager),
 and go through the flow. Ensure filtering works, and device is returned to
 the calling app. Ensure the calling app can pair to the selected device.
Change-Id: I0aeb653afd65e4adead13ea9c7248ec20971b04a
2017-02-06 12:50:55 -08:00
Aurimas Liutikas
ab14d825c3 Adding text input mode to TimePicker.
Test: Tests will have a follow up CL.
Bug:30044800

Change-Id: I71a0fba97026da76251768016edf1b159617abb9
2017-02-06 11:29:38 -08:00
Ying Wai (Daniel) Fan
415f8b32e8 Prevent division-by-zero error when calculating battery capacity.
Bug: 34255953
Change-Id: Ie072cd5dc26faf17e8ab46ea0795750396f087c2
Fixes: 34255953
Test: formula change CL. No existing unit tests found.
2017-02-06 18:20:40 +00:00
Alan Viverette
177f37367e Revert "Implicitly cast views obtained via View.findView methods"
This reverts commit 06c2fffdaa.

Reason for revert: Java 8 doesn't support this magic.

Change-Id: Iaa41f4e4d0072b9a97cff9cd3788403d4ab79d13
2017-02-03 17:08:47 -05:00
Selim Cinek
4f3463290b Merge "Increased the collapsed size of messaging notifications" 2017-02-02 23:59:08 +00:00
Paul Lawrence
46e48b9aa4 resolve merge conflicts of fde0a41065 to master
Test: Make sure builds, boots
Change-Id: Idf86dc5d888c09e8a65ada51fc2f32aae6d5570d
2017-02-02 13:28:45 -08:00
Hakan Seyalioglu
531def93f0 DO NOT MERGE - Check exported status in chooser
am: e3286c3145

Change-Id: I55a6e9ed942a4542dcdf497e297654b666d88fb0
2017-02-02 20:16:23 +00:00
TreeHugger Robot
e8ae5566fb Merge "Batterystats commands to simulate screen on/off" 2017-02-02 20:05:45 +00:00
Rubin Xu
a55b168b5d Small tweaks in LockSettingsService
Paves way for synthetic password flow: Two notable changes:
1. when unify/un-unify work challenges, provide the old work profile password.
2. when clearing lock, supply old credentials.

Test: Unit test to be added in a follow up CL.
Bug: 33126414
Change-Id: I2a9553c5e7cc701338436e99e5a1289cebd1eda9
2017-02-02 18:44:46 +00:00
Paul Lawrence
fde0a41065 Install seccomp into zygote not init am: ef85477470 am: 521d25294b
am: e6e8c7a1dd

Change-Id: I97d2843a2c2940b558f216cf550891a80963be54
2017-02-02 18:37:22 +00:00
Paul Lawrence
e6e8c7a1dd Install seccomp into zygote not init am: ef85477470
am: 521d25294b

Change-Id: I7c2c84a5bd67490070777d11d7f930c5dba90cbe
2017-02-02 18:30:49 +00:00
Hakan Seyalioglu
e3286c3145 DO NOT MERGE - Check exported status in chooser
Relevant change in master is ag/1844170

bug: 34147053
Change-Id: Ic9d9d65c66325904c95ab3966bdcc16e7668278b
2017-02-02 10:28:33 -08:00
Paul Lawrence
ef85477470 Install seccomp into zygote not init
Bug: 34710876
Test: Boots, correct size filter installed, blocks unallowed calls

Change-Id: I3e66e8724ace37f7d30451b98a5e574766252ea0
2017-02-02 17:45:11 +00:00
Chris Wren
27a52fa86b port status bar logs to Tron V2
Bug: 33303260
Test: runtest --path frameworks/base/core/tests/coretests/src/com/android/internal/logging/legacy/ && runtest --path frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone
Change-Id: I7746b846247e930617f0b440217635e71ed58bb5
2017-02-02 07:47:16 -05:00
Amith Yamasani
674c9bb2ff Batterystats commands to simulate screen on/off
Needed for batterystats cts tests to measure partial wakelock
duration reporting.

Bug: 34233085
Test: adb shell dumpsys batterystats enable pretend-screen-off
Change-Id: Ia7c76d6a0636d206e04f01be58d1e6dc3332c50d
2017-02-01 15:39:57 -08:00
Adrian Roos
643e51e3a1 StatusBar: Clean up buzzBeepBlinked and friends
Test: mmm frameworks/base/packages/SystemUI
Change-Id: Idcd1fe02e825c18782880d8d12345776a3928ddf
2017-02-01 21:06:01 +00:00
Ying Wai (Daniel) Fan
442ab76d22 Prevent division-by-zero error when calculating battery capacity.
Bug: 34255953
Change-Id: Ie072cd5dc26faf17e8ab46ea0795750396f087c2
Fixes: 34255953
Test: formula change CL. No existing unit tests found.
2017-01-31 22:00:10 -08:00
TreeHugger Robot
7b552516ae Merge "Implicitly cast views obtained via View.findView methods" 2017-01-31 22:04:25 +00:00
Ying Wai (Daniel) Fan
c95ecb5ed8 Correct the formula of battery capacity estimation. am: c800ddc824
am: ac655b5a7c

Change-Id: Ifa298b57e62e4238740b177a7e4a346671d56987
2017-01-31 20:57:29 +00:00
Ying Wai (Daniel) Fan
d4d476943f Correct the formula of battery capacity estimation.
am: c800ddc824

Change-Id: Idf0396fdac7e0cedbac39da98b2fe97e26dce64e
2017-01-31 20:53:27 +00:00
Ying Wai (Daniel) Fan
ac655b5a7c Correct the formula of battery capacity estimation.
am: c800ddc824

Change-Id: Ia0a16cd15fc71f6ff2af89d7ecbb7a319b5ece92
2017-01-31 20:53:26 +00:00