1259 Commits

Author SHA1 Message Date
Wale Ogunwale
23c25e7a3c Merge "WindowList be gone!" 2016-11-22 14:56:49 +00:00
Fyodor Kupolov
d4f9d37424 Merge "Presubmit test for PackageManager" 2016-11-21 23:58:01 +00:00
Wale Ogunwale
4551c8bbee WindowList be gone!
The use of DisplayContent.mWindow list to track all windows is
no longer needed as we can now get windows through the window
container hierarchy with methods like forAllWindows. The window
list was also a very complicated logic to understand and maintain,
so it won't be missed :)

Bug: 30060889
Test: Existing tests pass
Change-Id: I590cb33aa0f42bcd4a26ddce102f05e657f54144
2016-11-21 08:17:57 -08:00
Fyodor Kupolov
7cebbc8b22 Presubmit test for PackageManager
Added PackageManagerPresubmitTests. testPrivAppPermissions method
tests that core apps like systemui are getting all requested
signature|privileged permissions.

Test: PackageManagerPresubmitTests passes
Bug: 32935038
Bug: 31008485
Change-Id: I31c5c1a2613b8c1ddf927d2708d0361407342b87
2016-11-18 14:29:29 -08:00
Julia Reynolds
f22d457eeb Merge "Prioritize channel sound & vibration settings." 2016-11-18 22:12:28 +00:00
Julia Reynolds
0c299d4d63 Prioritize channel sound & vibration settings.
Unless the app is not targeting O and the user hasn't set
a preference in Settings.

Also apps no longer need the vibration permission to vibrate with
a notification.

Test: runtest systemui-notification
Change-Id: Ia84b1c97d13cb479db07035ca622b1fe52261329
2016-11-18 09:29:26 -05:00
TreeHugger Robot
29993074b0 Merge "Keep track of admin actions for DO disclosures" 2016-11-17 21:40:46 +00:00
Bartosz Fabianowski
b21b241f0f Keep track of admin actions for DO disclosures
This CL adds bookkeeping to DPMS which will allow us to tell the user
in the Settings UI whether/when the admin requested a bug report or
retrieved logs from the device.

Bug: 32692748
Test: Full DevicePolicyManagerTest unit test coverage; end-to-end tests
        will follow as Settings CTS verifier tests

Change-Id: I89728fce4b7e0ff061b354c73caf3742e95a3a3e
2016-11-17 20:52:03 +01:00
Nicolas Prévot
554140fc89 Merge "Check user restriction DISALLOW_REMOVE_USER in isProvisioningAllowed." 2016-11-17 11:35:42 +00:00
Wale Ogunwale
782b247fdb Merge "Fixed issue with IME displaying on-top of nav bar." 2016-11-16 21:58:07 +00:00
Wale Ogunwale
93726a41a0 Merge "Don't include sysUI insets on secondary displays" 2016-11-16 21:56:55 +00:00
Wale Ogunwale
44fbdf5b1e Fixed issue with IME displaying on-top of nav bar.
Caused by some recent refactoring. We now make sure the IME
has the higher animation layer in its base layer of the window
it is targeting.
Also, consolidated some of our test functions.

Bug: 32916670
Test: bit FrameworksServicesTests:com.android.server.wm.WindowLayersControllerTests
Change-Id: I0b1abd6fead981cfc810488cc785261abba5341d
2016-11-16 20:38:50 +00:00
Nicolas Prevot
56400a445f Check user restriction DISALLOW_REMOVE_USER in isProvisioningAllowed.
If DISALLOW_REMOVE_USER is set and there is already a managed profile:
isProvisioningAllowed() should return false

BUG:32629873
Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest -w
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I093bed0a4a54f83decf11716ebfd50dd4f17c089
2016-11-16 12:12:41 +00:00
Andrii Kulian
db8e106fa3 Don't include sysUI insets on secondary displays
Currently there is a single instance of WindowManagerPolicy
used in Window Manager and it is configured according to
primary display settings. Because of that it reports display
size with navigation bar insets even for secondary displays.

This CL adds displayId param, so it can adjust reported metrics
correctly when requested.

Bug: 32910901
Test: android.display.cts.DisplayTest
Change-Id: I14967fc13907c4fde17aed6a769d03cbde3ec1be
2016-11-16 05:04:03 +00:00
Jorim Jaggi
3c9006d842 Merge "Fix that window was not hidden after policy hiding animation" 2016-11-16 00:40:53 +00:00
Jorim Jaggi
af221d16de Fix that window was not hidden after policy hiding animation
When we removed WindowState.isOnScreenIgnoringKeyguard we forgot
to change WindowState.isOnScreen to also check policy visibility.

Test: runtest frameworks-services -c com.android.server.wm.WindowStateTests
Test: Open camera app, make sure status bar is hidden

Change-Id: I780f50c8ed3e675f2fab623fdba4fcfc5b6f1d5b
Fixes: 32890266
2016-11-15 14:59:57 -08:00
Wale Ogunwale
7c73dd6a20 Merge "Removed WallpaperController dependency on WindowList." 2016-11-15 01:19:41 +00:00
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
Wale Ogunwale
f4ebe2e2cc Removed WallpaperController dependency on WindowList.
WallpaperController now accesses the container hierarchy directly
to determine the state of the wallpaper windows and targets.

Bug: 30060889
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test \
      android.server.cts.ActivityManagerTransitionSelectionTests

Change-Id: Ib70beaf340f257ad4e1093cc127f81e7adf41636
2016-11-14 11:03:52 -08:00
TreeHugger Robot
72c532acbb Merge "Traverse window hierarchy without window list" 2016-11-10 02:14:15 +00:00
Wale Ogunwale
b783fd8a08 Traverse window hierarchy without window list
Added support for to get all windows in the hierarchy without needing
to use WindowList concept which is a very complicated implementation
in the code base.
This implementation walks the hierarchy node by node returns windows
in order to the caller using a callback.

Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
Change-Id: I2719f7c96f26dad23f91c1c589be88712bd224b8
2016-11-09 15:54:00 -08:00
Julia Reynolds
423b9fc83d Move notification channel from record to sbn.
So notificationlisteners know about it.

Test: runtest systemui-notification
Change-Id: I28fc86730d3f7ad246a0164f44157594f57430c0
2016-11-09 09:51:08 -05:00
TreeHugger Robot
fd869cfe53 Merge "Add ability to modify credential via shell command" 2016-11-09 02:04:25 +00:00
Jorim Jaggi
2fef6f7b15 Add ability to modify credential via shell command
Test: adb shell locksettings set-pattern 1234
Test: adb shell locksettings set-pin --old 1234 1234
Test: adb shell locksettings set-password --old 1234 1234
Test: adb shell locksettings clear --old 1234
Test: runtest frameworks-services -c
com.android.server.LockSettingsShellCommandTest

Change-Id: I8f541effc7eab0d7453cd9a9b46c280a6425e258
2016-11-08 15:52:15 -08:00
Dianne Hackborn
80361c9ea7 Merge "Move code for handling uid obs "cutoff" to activity manager" 2016-11-08 23:03:21 +00:00
Dianne Hackborn
5614bf5a1a Move code for handling uid obs "cutoff" to activity manager
To do this, I had to fix the PROCESS_STATE_NONEXISTENT constant
to be the last value (instead of the special magical -1 value)
so it semantically matches the public importance constants.  I
think this is better anyway.

Also this fixes a big problem in the implementation, where we
weren't keeping track of the last proc state per uid...!  Duh.

Test: manually ran testUidImportanceListener
Change-Id: Ie3008f824446089840f896885e6033472abb065e
2016-11-08 11:38:04 -08:00
Makoto Onuki
248a0ef3aa Always scan all apps after each OTA for manifest shortcuts
(W/ reverting Ia05363b30a5eeb989dc4c44cf5dbd71cde96de96)

Test: FrameworksServicesTests

Bug 32590013

Change-Id: I8f45c330d0b102a6a112e774205e6611c1c61af3
2016-11-08 19:25:57 +00:00
Rob Carr
0eca566f96 Merge "Tests for computeFrameLw docked type scenarios." 2016-11-07 20:24:51 +00:00
Dianne Hackborn
058f1e4468 Implement system API for monitoring uid importance changes.
Changed the permission for registerUidObserver to be
PACKAGE_USAGE_STATS, which better matches the semantics of this
API and is accessible to system apps.

Test: Added testUidImportanceListener()

Change-Id: Ib47d02bd654fbe399a9c92550c89ecbd38f928dc
2016-11-04 17:05:27 -07:00
Stephen Chen
5963fd864b Merge "Implement metered tracking for NetworkStats summary queries." 2016-11-04 21:29:33 +00:00
Stephen Chen
2514787897 Implement metered tracking for NetworkStats summary queries.
Dependent on ag/1550196 where API is defined.

Bug: 31015360
Bug: 26545374
Test: runtest --path
frameworks/base/core/tests/coretests/src/android/net/NetworkStatsTest.java,
other test classes.

Change-Id: I968b9e3352d7880e3fc438f12de628a2da057e0a
2016-11-04 09:55:21 -07:00
Julia Reynolds
b3a04f0816 Never use getApplicationInfo.
Always use getApplicationInfoAsUser.

Test: runtest, and install a work profile app and post a notification.

Bug: 32615127
Change-Id: I92cdf42d791d27eaff64b945be96b216e5866f6d
2016-11-04 10:13:38 -04:00
Phil Weaver
a46f009bbf Merge "Add tests for MagnificationController." 2016-11-03 23:11:55 +00:00
Robert Carr
15dd7efeb7 Tests for computeFrameLw docked type scenarios.
Add some computeFrameLw unit tests for non fullscreen
windows. A test a day keeps the chase-list away.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Change-Id: Ifd7c07f5d174b35aa73b78ddc3432520fb096bf9
2016-11-03 14:26:58 -07:00
Etan Cohen
8402d511c9 Merge "Update service test runner to allow test args" am: 56b92e8191 am: dde9ea21e4 am: 10840d1897
am: be8e13de60

Change-Id: I48302e70e01fb290634f66bd679268fea0ede22d
2016-11-03 20:45:31 +00:00
Etan Cohen
10840d1897 Merge "Update service test runner to allow test args" am: 56b92e8191
am: dde9ea21e4

Change-Id: I59d572e233720ecf0ddc6cbb5893323b563a3241
2016-11-03 20:32:54 +00:00
Etan Cohen
dde9ea21e4 Merge "Update service test runner to allow test args"
am: 56b92e8191

Change-Id: Ib5f44685228bab61d50dea4c5bd226c4b80c2dd1
2016-11-03 20:26:29 +00:00
Etan Cohen
56b92e8191 Merge "Update service test runner to allow test args" 2016-11-03 20:18:53 +00:00
Phil Weaver
89e3ffc66c Add tests for MagnificationController.
Also refactoring the class to make it easier to test and
chaning behavior where the current behavior seemed poorly
defined.

Refactoring:
- Combined all handlers into one.
- Simplified animation to use a ValueAnimator.
- Eliminated ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE
  setting. Move rest of settings reading into mockable class.
- Move callbacks from WindowManager into the main class.
- Pulled out my instrumented Handler from the
  MotionEventInjectorTest into its own class so I can reuse
  it.

Behavior changes:
- Always constraining out-of-bounds values rather than
  refusing to change them.
- Constraining offsets on bounds changes. We previously
  left them alone, even if they were out of bounds.
- Keeping track of the animation starting point. We were
  interpolating between the current magnification spec
  and the final one. This change means the magnification
  animates to a different profile.

Test: This CL adds tests. I've also run a11y CTS.

Bugs: 31855954, 30325691

Change-Id: Ie00e29ae88b75d9fe1016f9d107257c9cf6425bb
2016-11-03 13:00:47 -07:00
Torne (Richard Coles)
ab5d0ba22e resolve merge conflicts of 0d16fa4 to master
Change-Id: I3c01fe6f5439885d28c6d28415004b26845f06b0
2016-11-03 15:09:34 +00:00
Richard Coles
0092dbabe0 Merge "Fix WebViewUpdateServiceTest failures when using Thread without Looper." am: be19fe5e8a
am: 9c47f5c87a

Change-Id: Ia5d867468080e0e48a4e5b3c08b1ee627e16cebe
2016-11-03 14:48:05 +00:00
Richard Coles
9c47f5c87a Merge "Fix WebViewUpdateServiceTest failures when using Thread without Looper."
am: be19fe5e8a

Change-Id: I85e2e13f395dac085616838670c19ddbedc67e9d
2016-11-03 14:42:08 +00:00
Julia Reynolds
3f2e215cd6 Merge "Replace test TODOs with ACTION." 2016-11-03 13:42:29 +00:00
TreeHugger Robot
02e17d27b1 Merge "[DPM] Management and retrieval of network logs" 2016-11-02 23:28:10 +00:00
TreeHugger Robot
82df4ef603 Merge "Added support for window TYPE_PRESENTATION" 2016-11-02 21:50:40 +00:00
Julia Reynolds
1864ff5dae Replace test TODOs with ACTION.
Also call packagemanager less.

Test: runtest
Change-Id: Icff2a5b9e7fff49ef8cf7b643c198707a6089007
2016-11-02 15:58:11 -04:00
Wale Ogunwale
5b6714c2fa Added support for window TYPE_PRESENTATION
Switched presentation feature to use new window TYPE_PRESENTATION
and also add its own window token to the display the presentation
is running on. This is needed as window manager no longer allows
tokens to have windows on multiple displays.

Bug: 32566372
Test: Presentation mode works.
Change-Id: I9c2998311b65640743b8e23ec4f10bf1ffbfd785
2016-11-02 18:25:34 +00:00
Fyodor Kupolov
668868baf5 Merge "Do not exclude partial users that are not being removed" 2016-11-02 16:44:12 +00:00
Geoffrey Pitsch
b879cc614f Move notification tests into separate APK.
This will allow us to hook into a presubmit step without
bringing in the other tests.

Compile notification source directly into test APK, for
faster development.

Test: runtest --path
frameworks/base/services/tests/notification/
Change-Id: I04dbcec892cbd375ba1334f59e6b58bcafe80151
2016-11-02 09:17:27 -04:00
Michal Karpinski
f77ee4f1b7 [DPM] Management and retrieval of network logs
This CL follows up on ag/1530343 and adds:
1) Various network events.
2) Retrieval method in DPM and APIs in DeviceAdminReceiver.
3) Extension of NetworkLogger and it's NetworkLoggingHandler.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Bug: 29748723
Change-Id: I42a1a477e7c75c109a3982f809c22732b814e8b2
2016-11-02 09:00:21 +00:00