48474 Commits

Author SHA1 Message Date
TreeHugger Robot
8dba8afc65 Merge "Suppress RescueParty when active USB connection." 2017-02-20 20:08:32 +00:00
TreeHugger Robot
586b6b2c3d Merge "Guard against possible AMS/PMS deadlock." 2017-02-20 19:57:21 +00:00
TreeHugger Robot
bde1c4a885 Merge "Revert "Modifying dpm.setSecureSetting call for install_non_market_apps"" 2017-02-20 18:50:54 +00:00
Jeff Sharkey
6e544617c6 Guard against possible AMS/PMS deadlock.
PMS can't call into AMS while holding its local lock.

Test: builds, boots
Bug: 35410906
Change-Id: Ib80bbee5c0c3e5fb39ffef324e8176027da83f2f
2017-02-20 11:02:29 -07:00
Jeff Sharkey
d9574c7bbf Suppress RescueParty when active USB connection.
When there is a very early system server runtime restart, we may not
yet have a published BatteryManagerInternal, so we need to go directly
to the "batteryproperties" native service to detect the USB state.

Test: builds, rescue is suppressed when USB is connected
Bug: 34872406
Change-Id: I949984cb95495c77de85ac322075177cff07b8b6
2017-02-20 10:45:27 -07:00
TreeHugger Robot
135e5aac1b Merge "Really fix regressions in IMMS#setImeWindowStatus" 2017-02-20 17:43:48 +00:00
Victor Chang
5663e05109 Revert "Modifying dpm.setSecureSetting call for install_non_market_apps"
This reverts commit 2e7d6d64b9b16ea27634bc0e8843717a465142b4.

Bug: 35590590
Fix: 35590106
Test: runtest managed-provisioning
Test: manual verified that work profile can be inflated
Change-Id: Ie780b94053e65bca2f96b32055937c0c9e8beae8
2017-02-20 17:00:58 +00:00
Rubin Xu
82c2d94e89 Merge "Normalize empty credential into null" 2017-02-20 11:03:26 +00:00
TreeHugger Robot
7bde762f3b Merge "Add support for remote views backed auto-fill UI" 2017-02-20 10:59:43 +00:00
Svet Ganov
00c771dc7d Add support for remote views backed auto-fill UI
Test: CTS and manual

Change-Id: Ia09f0208d78439491052e4886a0e71c387b73370
2017-02-20 00:37:33 -08:00
TreeHugger Robot
71fe435056 Merge "MediaSessionService: Notify volume key long-presses when the screen is off" 2017-02-20 04:06:04 +00:00
Jaewan Kim
d61a87baf0 MediaSessionService: Notify volume key long-presses when the screen is off
When the screen is off, MediaSessionService doesn't get the volume key
long-press events from the PhoneWindowManager because PhoneWindowManager
intercepts them and only sends initial down and up events.
This is intended because users cannot see the safety warning dialog
which warns users about too loud volume.

This CL assumes that volume key is long-pressed if the key up doesn't
happen after the initial down within the long-press timeout, and notify
them with IOnVolumeKeyLongPressListener.

Bug: 35328001
Test: Manual test
Change-Id: I3b5aec4c2dd66a181bf41786f1417cc65874356c
2017-02-20 10:57:37 +09:00
Phil Weaver
e3bf23bed9 Merge "Verify fingerprint exists before using it" 2017-02-19 04:48:19 +00:00
Colin Cross
278028e97a Merge "Revert "Remove outdated emulator check which causes BT to not start"" 2017-02-19 03:27:35 +00:00
TreeHugger Robot
827225b46d Merge "AudioService: prevent NPE on an invalid PIID" 2017-02-18 23:53:12 +00:00
TreeHugger Robot
5653fd68f9 Merge "Fix a race in persisting instant cookie" 2017-02-18 23:47:10 +00:00
Colin Cross
039deed1fd Revert "Remove outdated emulator check which causes BT to not start"
This reverts commit d98a4e502165d76d05e095608da3c795bd56eafd.

Change-Id: Ibd1596584928f2aa2c799501536abc9b384d1cda
2017-02-18 13:35:45 -08:00
Svet Ganov
312c6cc6a6 Fix a race in persisting instant cookie
Test: CTS passes and manual too

Change-Id: I8beb7edb84e5f7e2a181a9c237d6f0f761805d70
2017-02-17 23:41:15 -08:00
TreeHugger Robot
b1c820edab Merge "resolve merge conflicts of a110feee4cac to master" 2017-02-18 06:19:31 +00:00
TreeHugger Robot
8ab1a6abc2 Merge "Fix a race when persisting cookie data" 2017-02-18 04:23:47 +00:00
Yohei Yukawa
bbb10e8ec0 Really fix regressions in IMMS#setImeWindowStatus
My previous CL [1] that aimed to fix Bug 35395372 was imperfect.
It just converted InvalidParameterException into NullPointerException
due to a silly mistake in a new error check.

 [1]: Ib9448c551d9a30776a999c27a5ff20f1a095633a
      ee2a7ed3d971f83134a2b28258dd2e56f9634f94

Test: Made sure Bug 35395372 and Bug 35479942 are no longer
      reproducible, that is,
      1. Flash a new image and complete the setup wizard on a
         direct-boot unaware device.
      2. Set a device password and require it upon each device boot.
      3. adb reboot
      4. Observe the default IME does not crash because of
         NullPointerException/InvalidParameterException thrown by IMMS.
Test: Made sure IMM#showSoftInputFromInputMethod(IBinder, int) does
      not throw an NullPointerException even in an extreme case.
      1. Rebuild LatinIME with the following code in LatinIME.java
       @Override
       public AbstractInputMethodImpl onCreateInputMethodInterface() {
           return new InputMethodService.InputMethodImpl() {
               @Override
               public void attachToken(IBinder token) {
                   super.attachToken(token);

                   final InputMethodManager imm =
                       getSystemService(InputMethodManager.class);
                   final IBinder imeToken =
                       getWindow().getWindow().getAttributes().token;
                   imm.showSoftInputFromInputMethod(imeToken, 0);
               }
           };
       }
      2. adb install -r LatinIME.apk
      3. adb shell ime enable com.android.inputmethod.latin/.LatinIME
      4. adb shell ime set com.android.inputmethod.latin/.LatinIME
      5. Tap any text field.
      4. Observe LatinIME does not crash because of
         NullPointerException/InvalidParameterException thrown by IMMS.
Bug: 34628091
Bug: 35079353
Fixes: 35395372
Fixes: 35479942
Change-Id: Id8e34ecb28480755e8141b6e46820b37fe3dc92b
2017-02-17 20:13:52 -08:00
Pulkit Bhuwalka
705cbc684a resolve merge conflicts of a110feee4cac to master
Test: Resolved merge conflict. Built locally.

Change-Id: If8e439d513ac2242b82f67a4c68bc3adfabe2b9c
2017-02-17 20:13:31 -08:00
TreeHugger Robot
e453d8e762 Merge "Removing unnecessary call to ArraySet#toArray" 2017-02-18 02:48:42 +00:00
TreeHugger Robot
cf7ce6cbda Merge "Fixes issues where the PiP menu activity is out of sync." 2017-02-18 02:25:39 +00:00
Jean-Michel Trivi
bd39cfaf97 AudioService: prevent NPE on an invalid PIID
When looking for the AudioPlaybackConfiguration to act on a player,
  check that the PIID is valid.
(Note that this is also handled in checkConfigurationCaller())

Test: see bug
Bug 35484407

Change-Id: Ic46ad10f9730593f6600175ab3ca8f496cc6d972
2017-02-17 17:38:04 -08:00
Svet Ganov
ee2028c31f Fix a race when persisting cookie data
bug:34983226

Test: CTS passes

Change-Id: I457154fecdc15c057e276358e443d3c941128ab2
2017-02-17 17:33:52 -08:00
Svetoslav Ganov
ed71756327 Merge "Use accessibility action for touch exploration" 2017-02-18 01:23:03 +00:00
TreeHugger Robot
d89cf81f80 Merge "Change MaskableIconDrawable to AdaptiveIconDrawable" 2017-02-18 01:04:59 +00:00
TreeHugger Robot
8922f5dbcd Merge "Audio focus enforcement: use VolumeShaper for ducking" 2017-02-18 00:47:33 +00:00
TreeHugger Robot
6955665c73 Merge "Add escrow token APIs to TrustAgentService Security review: b/31273740 Design doc: go/auto_login Test: manual Change-Id: Ib11d4146135a58f1dc451ae8e081977a8f8e6ace" 2017-02-18 00:44:57 +00:00
Winson Chung
61ecc1bb39 Fixes issues where the PiP menu activity is out of sync.
- When the menu activity is hidden or destroyed by the system, we should
  reset the state so that we can restore the input consumer and show again
  property next time the PiP is interacted with.
- Also ensuring that non-focused pinned stack windows are not added to the
  input window list

Bug: 35462085
Bug: 34281221
Test: Relaunch a PiP activity that is single top.
Test: Launch a new task/activity from a PiP activity after
      the menu is visible.

Change-Id: I43829cce50669de704caf5a720c2adf7daf92398
2017-02-17 16:41:13 -08:00
TreeHugger Robot
18c527b96d Merge "Fix instant app resolution" 2017-02-18 00:24:56 +00:00
TreeHugger Robot
e868c1419f Merge "Send TIME_SET to manifest receivers, too" 2017-02-18 00:20:52 +00:00
TreeHugger Robot
4b441535c3 Merge changes Ie28325b6,I4e406a94
* changes:
  Display on-going notification for apps using alert windows.
  Set importance for processes displaying app-overlays based on visibility
2017-02-18 00:11:41 +00:00
Suprabh Shukla
3dea1c7972 Removing unnecessary call to ArraySet#toArray
Iterating over ArraySet using iterators is still more efficient than
first calling ArraySet#toArray and then iterating over the array.

Test: Minor optimization. make and existing tests should suffice.

Change-Id: Ifc282bfca98cf89b047dddddd78a6de020f27381
2017-02-17 16:11:01 -08:00
Pulkit Bhuwalka
806ac5e1dd Merge "Remove outdated emulator check which causes BT to not start"
am: ad7fb62d4f

Change-Id: Ia6f9417e6b21ec7911036b8875b9603f8b36152e
2017-02-17 23:28:09 +00:00
Phil Weaver
0adfbd33c8 Use accessibility action for touch exploration
Explore-By-Touch has been dispatching touch events to the screen
rather than using the accessibility API. This was intended as a
workaround for apps that did not properly handle accessibility,
but the workaround itself has been causing bugs in corner cases
where properly accessible Views are partially covered by windows.

This CL first tries to dispatch a click action, and falls back on
the touch dispatch only if the click action fails.

Bug: 35200501
Bug: 26216304
Bug: 20665958
Bug: 34949365
Bug: 34844480
Bug: 29535082

Test: Poking around with first party apps and TalkBack works fine.
This behavior isn't covered by automated testing.

Change-Id: I9cc18399d8f40f7381dfcbef91b5991b711bb7f1
2017-02-17 15:07:33 -08:00
TreeHugger Robot
dd903d4f0e Merge "Modifying dpm.setSecureSetting call for install_non_market_apps" 2017-02-17 23:05:48 +00:00
TreeHugger Robot
d133b00efb Merge "Put package verifier on the power whitelist when invoked" 2017-02-17 22:44:01 +00:00
Christopher Tate
2b6e459e33 Send TIME_SET to manifest receivers, too
Also expand the slew window for minimizing the effects of time-set
flapping from 500ms to 1000ms.

Bug 35319393

Change-Id: I6d6df1e086115ebe12c0bc4b9d761a11a0267012
2017-02-17 14:40:10 -08:00
Todd Kennedy
bbdd8e4a3b Fix instant app resolution
Resolving intents with a specified component goes down a different
path than regular resolution. For Instant Apps, that meant that
sometimes the Instant App was not able to resolve it's own
activities. Added some new CTS tests to verify that this works.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Ic8a8eaef7eb9e230fdc701c79c85227d0939d974
2017-02-17 14:29:34 -08:00
Wale Ogunwale
387e4c6133 Display on-going notification for apps using alert windows.
Allows the user to associate alert windows with specific apps
and revoke the permission if they want.

Test: manual
Bug: 33256752
Change-Id: Ie28325b6bb799b3df253770ebe655f97ebbadd90
2017-02-17 13:45:24 -08:00
Pulkit Bhuwalka
d98a4e5021 Remove outdated emulator check which causes BT to not start
ro.kernel.qemu based check to determine whether Bluetooth should be
started or not was an old hack used when "features" was not available to
determine hardware availability. This was later fixed with the
hasSystemFeature check. However, the old check was not removed.

The presence of the old check causes Bluetooth to not start on Android
Things devices which have ro.kernel.qemu set for graphics usage. It's
also preferable to depend on the system API rather than on build
configs. Related CLs modify the emulator builds to correct the config in
builds.

Bug: 35361545
Change-Id: I219ce5e14709c76dcba43af4693093e985269d43
Test: Verified by launching bluetooth on local devices after removing
the old check. Also verified by booting up the emulator and verifying
that Bluetooth Services do not start.
2017-02-17 13:44:33 -08:00
Wale Ogunwale
943002b473 Set importance for processes displaying app-overlays based on visibility
We were previously setting this based on when the window was added and
removed. This can lead to issues where an app isn't allowed to show
alert windows so window manager hides the window after the permission is
revoked, but the window still exist in the system so the process
importance will still be high. We now set the process importance based
on if it has visible window surfaces or not.

Bug: 33256752
Test: cts/.../run-test CtsAppTestCases android.app.cts.AlertWindowsTests
Change-Id: I4e406a94683ec0eecc0911d0195e641c693e1c4a
2017-02-17 13:44:18 -08:00
Suprabh Shukla
2e7d6d64b9 Modifying dpm.setSecureSetting call for install_non_market_apps
Starting from O, install_non_market_apps is deprecated and will not be
checked by the package installer. Device admin apps should be using the
user restriction instead.
Since on managed profiles, the default value blocked install from
unknown sources, the system will set the user restriction on behalf of
the profile owners (if the profile has one).
For non-managed profiles, the user had access to the settings to change
the value of install_non_market_apps. So going forward, any request to
change it's value by dpm#setSecureSetting in such users is going to be
ignored.

Test: Manually tested that:
1. For a profile with PO, when install_non_market_apps was set to 0,
user restriction is set on upgrade
2. For a profile with PO, when install_non_market_apps was set to 1,
user restriction is not set on upgrade
3. After upgrade, newly created managed profiles with PO have user
restriction set

Bug: 33947615
Change-Id: I063e9ee608b52086ffdf8ed2b24e2928574c58cd
2017-02-17 13:25:14 -08:00
TreeHugger Robot
19657b359a Merge "Revert "Revert "remove app-ephemeral""" 2017-02-17 20:46:12 +00:00
TreeHugger Robot
8c9a6b0089 Merge "Revert "Revert "Per user setting for instant app""" 2017-02-17 20:46:12 +00:00
TreeHugger Robot
0df4c60716 Merge "Fix trampoline activities when relaunching PiP" 2017-02-17 20:14:24 +00:00
Hyunyoung Song
be8835e86b Change MaskableIconDrawable to AdaptiveIconDrawable
Test: $ make -j31 dist

Bug: 35399620
Change-Id: I5e54f75b3df21ffe546e0e54dbd7ea29499d1789
2017-02-17 12:13:22 -08:00
TreeHugger Robot
2ec8d8403e Merge "Exit persistent VR mode on edge swipe." 2017-02-17 19:03:53 +00:00