Commit Graph

9534 Commits

Author SHA1 Message Date
Winson Chung
655332c641 Creating PinnedStackController.
- Creating a PinnedStackController to keep track of the state of the PIP
  to prevent changes in the system (ie. IME showing) and user interaction
  from clobbering each other.
- Refactoring calls in AM into WM/controller

Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: Ie59dfd45d5c54764ba69a589b3b8148845e92cc3
Signed-off-by: Winson Chung <winsonc@google.com>
2016-10-31 13:21:55 -07:00
Makoto Onuki
4b3c306268 Merge "Add @NonNull / @Nullable to DPM return types" 2016-10-31 20:15:10 +00:00
Yorke Lee
fed503cb46 Merge "Add new methods to ITaskStackListener" 2016-10-31 19:05:03 +00:00
Makoto Onuki
408e8e4491 Add @NonNull / @Nullable to DPM return types
Fix: 31331663
Fix: 32466757

Test: Signature change only; checkbuild.
Change-Id: I361cdd43b9fccf309ff3efefa3783d5399e65748
2016-10-31 11:29:28 -07:00
Stephen Chen
26b0c6ae69 Merge "Define API for metering network stats buckets." 2016-10-31 17:22:12 +00:00
Adam Powell
38c67ff93b Add FragmentLifecycleCallbacks
Add a new callback object that can be attached to a FragmentManager to
observe all fragment lifecycle events within that
FragmentManager. Useful for dependency injection and other
shenanigans.

FragmentLifecycleCallbacks can be registered as recursive, in which
case they will be activated for any lifecycle events that happen in
descendant FragmentManagers as well.

Test: cts-tradefed run singleCommand cts --skip-preconditions --skip-device-info --module CtsFragmentTestCases
Change-Id: I816b1fbef6c29616ccc3fd729ee847c5f1a6f72f
2016-10-28 14:59:54 -07:00
Yorke Lee
bd54c2aab6 Add new methods to ITaskStackListener
Refactor task change notification logic into a separate class
TaskChangeNotificationController.

Add ActivityManagerService.unregisterTaskStackChangedListener

Add a no-op implementation that clients can subclass to avoid
having to reimplement all new methods when they are added.

Add new methods:
onTaskAdded
onTaskRemoved
onTaskMovedToFront
onTaskDescriptionChanged
onActivityRequestedOrientationChanged
onTaskFinishing

Design doc:
https://docs.google.com/document/d/1IgWZ44rKe9k1CzkjP2Mohv12OgRD1FxH8oLAyzhvCY4/edit#heading=h.yhzl6os0dbo5

Cherry-picked from I8302d6d3baf1ac1ca928765fe203091b9fab4070

Bug: 32277482
Test: Verify that callbacks are called in dummy implementations

Change-Id: I2ac2b870147ef049f3ee05fc5916c99332334526
2016-10-28 14:58:19 -07:00
George Mount
851179dbec Perform onDestroy when FragmentController is torn down.
Bug 32457575

Test: I9e33801c34bcb31e3d6ca0df3962cfe1a3203044
Change-Id: Id220dbfb3e42d2c91b99926c1e9b0c556c9b453a
2016-10-27 14:24:58 -07:00
TreeHugger Robot
09c7a38755 Merge "Fix hide fragment transition" 2016-10-27 17:55:03 +00:00
George Mount
4fe4711760 Fix hide fragment transition
Bug 30699392

During optimized hide operations with fragment transitions, the
hidden fragment View should not be GONE, but instead be visible
and the exiting views should be made INVISIBLE. After the
transition completes, the fragment's view should be GONE.

Test: I189fb22883637888516fb04940dbb288cb9a49d2
Change-Id: I3a80fdaa198ed04916df02b1d2ca069e6992f88f
2016-10-27 09:08:55 -07:00
Andrii Kulian
debcf7603f Merge "Refactor stack removal methods" 2016-10-27 07:52:07 +00:00
Andrii Kulian
6d6fb401c7 Refactor stack removal methods
Refactor some parts of stack removal to make methods implementations
correspond to their names.

Change-Id: Ie686c463d67232d9d5fd96468fe3911003d22471
Test: Manual and existing tests still pass.
2016-10-26 16:22:31 -07:00
TreeHugger Robot
199e3683d1 Merge changes I2d9f1a2d,I01fd8ba6
* changes:
  Ensure PIP retains bounds on device rotation.
  Fix wrong bounds being used in landscape.
2016-10-26 21:48:09 +00:00
TreeHugger Robot
a917d708e9 Merge "Fix bug in which some Views were not executing enter transition." 2016-10-26 20:07:47 +00:00
Winson Chung
303c6b78b6 Fix wrong bounds being used in landscape.
- Ensure we use the right display size when calculating PIP bounds.
- Also update interface to take the display id.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackDefaultBounds
Test: #testPinnedStackMovementBounds

Change-Id: I01fd8ba6dee212c29a9a092673ee8f7843e41af6
2016-10-26 12:49:40 -07:00
Stephen Chen
9ac251d116 Define API for metering network stats buckets.
This is a continuation of b/26545374, since now we can also set the
metered bit with NetworkScorer. The tracking of metered state changes
will be implemented in a seperate CL.

Bug: 31015360
Bug: 26545374
Test: N/A
Change-Id: I0eccd10c0316357abb03af4d9cf0c4191a66abfb
2016-10-25 18:16:15 -07:00
Leonard Mosescu
f3409ceee5 Adding "attach-agent" to ActivityManagerShellCommand
This new command is used to attach runtime agents to a running application:

attach-agent <PROCESS> <FILE>
   Attach an agent to the specified <PROCESS>,
   which may be either a process name or a PID.

Test: m test-art-host, manual testing:
    . invalid syntax, missing arguments
    . invalid syntax, extra arguments
    . invalid numeric PID
    . invalid process name
    . valid process, not debuggable
    . valid process, missing agent
    . valid process, valid agent

Bug: 31682382

Change-Id: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
2016-10-25 22:42:39 +00:00
Dianne Hackborn
fe51103711 Merge "Tweak ActivityManager.getPackageImportance()" 2016-10-25 22:41:00 +00:00
TreeHugger Robot
f2ec2c1e42 Merge "Apply display override config for secondary displays" 2016-10-25 22:00:57 +00:00
TreeHugger Robot
942fde1415 Merge "Add the ability to postpone transitions." 2016-10-25 21:12:12 +00:00
Andrii Kulian
5406e7ade8 Apply display override config for secondary displays
Now display-specific settings, such as dimensions and orientation,
are stored in display override config. For default display it is
mirroring the global config. Each time when global config is updated,
override of the default display should be updated too and vice versa.

Test: Existing and manual tests still pass.
Change-Id: Ic6c2190092d328820f314a05bed43c875db18170
2016-10-25 13:22:10 -07:00
TreeHugger Robot
d80812b882 Merge "Optimize Fragment operations so that minimal work is done." 2016-10-25 19:33:27 +00:00
Andrew Scull
22851dbcb2 Merge "Refactor password metric computation." 2016-10-25 09:04:58 +00:00
Dianne Hackborn
9df8f51044 Tweak ActivityManager.getPackageImportance()
- Now requires PACKAGE_USAGE_STATS permission.
- Simpler implementation.

Test: none

Change-Id: Id42ee31d0af8d896cbc94c81666bc734198c1273
2016-10-24 17:59:27 -07:00
Winson Chung
b72fd03d5a Merge "Changing initial PIP bounds specifications." 2016-10-20 22:34:31 +00:00
Andrew Scull
5f9e6f37b2 Refactor password metric computation.
This unifies previously duplicated code.

Bug: 30558331
Test: runtest -x frameworks/base/core/tests/coretests/src/android/app/admin/PasswordMetricsTest.java
Change-Id: I37678b83a03d4f05b9894d4b00e9a741d1a8df27
2016-10-20 19:04:41 +01:00
Sudheer Shanka
c2c956b3c4 Merge "Move ApplicationThread to aidl." 2016-10-20 17:55:06 +00:00
Winson
06868c37df Changing initial PIP bounds specifications.
- Change from a absolute bounds to a size, gravity and inset to
  allow easier tweaking of initial pinned stack bounds.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackDefaultBounds
Test: #testPinnedStackMovementBounds

Change-Id: I82a102bbd2d83259c6c84915071d1a16728e3aa7
2016-10-20 09:57:27 -07:00
Julia Reynolds
e2b77a55b3 Merge "Move autogrouping into framework." 2016-10-20 15:23:27 +00:00
Julia Reynolds
8f488d3f2f Move autogrouping into framework.
Test: runtest systemui, and post and dismiss notifications, checking that they
are grouped (or not) appropriately.

Change-Id: I8f3ec497cebcb14a7853fac98b844a3fd4503141
2016-10-19 22:30:58 +00:00
Sudheer Shanka
cc6418feb7 Move ApplicationThread to aidl.
Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: Iecb382e8720dfb1b6b707272497e3793e6995edb
2016-10-19 11:29:47 -07:00
Adam Lesinski
18ac1a74ae Fix regression with defaultDisplay adjustments am: f02523bf4b am: be75a58447
am: cc903f425a

Change-Id: Id954c20f9d014cf26a4177f350f8941e6324adf3
2016-10-18 23:16:13 +00:00
Adam Lesinski
cc903f425a Fix regression with defaultDisplay adjustments am: f02523bf4b
am: be75a58447

Change-Id: I748eaefa1a99b9af5101177090cf906267620f0b
2016-10-18 23:03:51 +00:00
Adam Lesinski
f02523bf4b Fix regression with defaultDisplay adjustments
ag/1542219 introduced a regression where if the display was the default
display, the configuration would still be adjusted as if it were
a non-default display. This fixes that logic to only adjust the
configuration if the display is non-default.

Bug:32133693
Test: cts-tradefed run cts --module CtsServicesHostTestCases --test android.server.cts.ActivityManagerAppConfigurationTests#testConfigurationUpdatesWhenRotatingToSideFromDocked
Change-Id: Ib2fda8c1651609efa9d20b3e2dace8a122864916
2016-10-18 20:13:57 +00:00
Adam Lesinski
5dc0782254 Update DisplayMetrics even on default display am: 4309721843 am: dab7950d80
am: d7ec1ea697

Change-Id: Iad9907c77fb1b7b81073150807d6f18a75a24d6e
2016-10-14 22:49:40 +00:00
Adam Lesinski
d7ec1ea697 Update DisplayMetrics even on default display am: 4309721843
am: dab7950d80

Change-Id: I8bb2c9c303380abd3e1a54af68b8a8f7da3225f7
2016-10-14 22:41:35 +00:00
Adam Lesinski
4309721843 Update DisplayMetrics even on default display
Fix a bug where the DisplayMetrics wouldn't be updated for a Resources
object on the default display. Since multi-window, we want to update
all Resources.

This didn't always manifest itself due to recreation of assets, which
would force an update of DisplayMetrics. Re-use of an AssetManager from
the cache would expose the bug.

Bug:32133693
Bug:31998629
Test: cts-tradefed run cts --module CtsServicesHostTestCases
Change-Id: Ic51ab82710517b87eb995ccf982085dba876ad58
2016-10-14 18:16:18 +00:00
Julia Reynolds
3752e50766 Merge "Add support for snoozing notifications" 2016-10-14 12:38:17 +00:00
Michal Karpinski
fd0d22750f Don't expose default strong auth timeout as constant am: 6dbf67fc48
am: bc755da55c

Change-Id: Idb118df5cf1a763645f4187bcddfa4bb9b8b42ee
2016-10-13 23:00:24 +00:00
Michal Karpinski
bc755da55c Don't expose default strong auth timeout as constant
am: 6dbf67fc48

Change-Id: Iacbe9a2de7024e29e9c2c98594ebca828b855a43
2016-10-13 22:52:38 +00:00
TreeHugger Robot
a6b3caf58e Merge "Don't expose default strong auth timeout as constant" into nyc-mr1-dev 2016-10-13 22:47:30 +00:00
Christopher Tate
7cfcf2d1b3 Only full-data back up regular files + directories am: da2018efeb am: 0d816b8f69
am: 86208efdc9

Change-Id: I3e39c52cf9895de9b893b7ec6c8d3287af7693b0
2016-10-13 21:23:58 +00:00
Christopher Tate
86208efdc9 Only full-data back up regular files + directories am: da2018efeb
am: 0d816b8f69

Change-Id: I3b28c373c58ebebf27b1297e770d2023767e6396
2016-10-13 21:17:09 +00:00
Julia Reynolds
72f1cbb3b9 Add support for snoozing notifications
To a notification listener, snoozing will appear as a cancel
(with reason snoozed) followed by a post (when the snooze period
ends).

Apps can repost a snoozed notification, but the updates will not be shown
to the user until the snooze period ends.

Snoozing is canceled if the posting app or a notification listener
cancels the notification.

Any notification listener can snooze a notification. Technically apps
can snooze their own notifications also, though that's not public.

In this iteration snoozed notifications will be lost on device reboot.

Test: included. Also, various post, snooze, update, cancel tests with
a listener.

Bug: 30997603
Change-Id: I568a6448196f0992a17d20a4dac296321ec5092b
2016-10-13 16:18:11 -04:00
Christopher Tate
da2018efeb Only full-data back up regular files + directories
Ignore every filesystem entity that is not a regular file or directory.
In particular, we now ignore not only symlinks but also sockets, pipes,
et cetera.

Bug 32143362

Change-Id: If51b54df1f7a643af145eb15bf12d389d19f8780
2016-10-13 12:19:45 -07:00
Adrian Roos
d92272138d Fix Notification.Action.Builder copy constructor am: 7af5362571 am: 342bc437bf
am: 7bc84b803d

Change-Id: Ice60b61b4868d775b04423e7166182db382d28b2
2016-10-12 23:33:11 +00:00
Adrian Roos
7bc84b803d Fix Notification.Action.Builder copy constructor am: 7af5362571
am: 342bc437bf

Change-Id: I0387ab66ec3d44e34a884fb2f92f32af35e2883c
2016-10-12 23:25:20 +00:00
Adrian Roos
7af5362571 Fix Notification.Action.Builder copy constructor
The copy constructor of Notification.Action.Builder did not copy
the mAllowGeneratedReplies field.

Change-Id: I40fbe8950ee2232e2589ab3930a32bfbebe9fc89
Fixes: 31766718
Test: runtest --path $T/cts/tests/app/src/android/app/cts/NotificationTest.java
2016-10-12 15:19:55 -07:00
Michal Karpinski
6dbf67fc48 Don't expose default strong auth timeout as constant
The admin can instead use the value of 0 to reset to default.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java

Bug: 31430135
Change-Id: I0d6b29ca4eca65d7ca72a8975a0c28c9050a946c
(cherry picked from commit 943aabd11c)
2016-10-12 09:34:12 +00:00
TreeHugger Robot
d227a66aad Merge "Don't expose default strong auth timeout as constant" 2016-10-11 18:34:08 +00:00