Commit Graph

9556 Commits

Author SHA1 Message Date
Dianne Hackborn
cdb31d2ecd Merge "Implement system API for monitoring uid importance changes." 2016-11-07 18:23:43 +00:00
Etan Cohen
3a1dd86ce4 Merge "[NAN-AWARE] Rename NAN to Aware" 2016-11-05 16:19:43 +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
Etan Cohen
0413327d74 [NAN-AWARE] Rename NAN to Aware
~Rename only (and any reformatting needed to pass lint) - no
functional changes!

Remove android.net.wifi.nan.STATE_CHANGED from manifest:
redundant/remnant of an older configuration.

(cherry-pick of commit a61b9fb569)
(cherry-pick of commit b061f21e7e59a99834e163e2baa1c82229e419a6)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Change-Id: Ie4ff675fa61041e8fcf6a9bf9900ea835d0a7614
2016-11-04 15:42:08 -07:00
TreeHugger Robot
3e8431f1f2 Merge "Move IActivityManager to aidl." 2016-11-04 22:24:12 +00:00
Stephen Chen
5963fd864b Merge "Implement metered tracking for NetworkStats summary queries." 2016-11-04 21:29:33 +00:00
Sudheer Shanka
fc46e9b643 Move IActivityManager to aidl.
Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
2016-11-04 10:43:25 -07: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
Andrii Kulian
839def9b54 Add shell command to move activity stacks between displays
Also rename "stack movetask" command to be consistent with other
shell commands.

Test: New CTS tests coming soon.
Change-Id: I3d7e04e0ae8ea76c27c3e4c1e286d5cd4539870c
2016-11-03 17:26:35 -07:00
TreeHugger Robot
02e17d27b1 Merge "[DPM] Management and retrieval of network logs" 2016-11-02 23:28:10 +00:00
Sudheer Shanka
aa2a530e64 Merge "Fix IApplicationThread transaction codes." 2016-11-02 22:00:30 +00: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
Sudheer Shanka
a14e4db959 Fix IApplicationThread transaction codes.
(IBinder.FIRST_CALL_TRANSACTION=1) is added to the specified
transaction codes during binder generation. Correct transaction
Ids in IApplicationThread taking this into account.

Bug: 30977067
Test: Verified that the transactions in generated binder have
      correct Ids.
Change-Id: Id1f6ce59814ed559cafda01be0d55c78d52e50e2
2016-11-02 10:38:37 -07:00
TreeHugger Robot
3694d8789f Merge "[DPM] DO can start network logging and listen for events" 2016-11-02 10:35:28 +00: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
Michal Karpinski
dd9bb4fdd9 [DPM] DO can start network logging and listen for events
This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).

Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
2016-11-02 08:52:53 +00:00
Jorim Jaggi
5974b4df49 Merge changes from topic 'keyguard_refactor'
* changes:
  The big keyguard transition refactor (6/n)
  The big keyguard transition refactor (5/n)
  The big keyguard transition refactor (4/n)
  The big keyguard transition refactor (3/n)
  The big keyguard transition refactor (2/n)
  The big keyguard transition refactor (1/n)
2016-11-02 02:14:15 +00:00
Julia Reynolds
73481c8837 Merge "Some channel model updates" 2016-11-02 01:20:20 +00:00
Jorim Jaggi
fe762344f4 The big keyguard transition refactor (1/n)
The heart of this change are two things:
1) Instead of using the force hide mechanism to hide windows behind
Keyguard, we actually make the activities invisible in activity manager.
2) When Keyguard is going away, we change the visibilities in activity
manager and run an app transition.

At the very core we move the responsibility of hiding activities to
ActivityStack, which checks whether Keyguard is showing, and then
hides all non-show-when-locked activities. For that, we need to check
whether any window of an activity has SHOW_WHEN_LOCKED set. We
introduce a callback from WM -> AM in case these Keyguard flags have
changed.

Furthermore, we decide whether to occlude Keyguard in KeyguardController,
which just checks whether the top activity has SHOW_WHEN_LOCKED set. When
this state changes, we prepare an occlude/unocclude app transition, and
in PWM we just inform the Keyguard about the animation so SysUI can play
along this animations in a mostly synchronized manner.

Since we now use an app transition when unlocking the phone, we get
lockscreen launch animations for free - window manager automatically
waits until the activity is drawn, or directly executes the transition
if there is nothing to animate. Thus, we can remove all the infrastructure
around "waitingForActivityDrawn".

The logic to show/hide non-app windows is moved to policy, and we add the
ability to run animations on non-app windows when executing an app
transition.

Test:
1) runtest frameworks-services -c com.android.server.wm.AppTransitionTests
2) Manually test unlocking Keyguard:
2a) Without security
2b) With security
2c) With security but trusted
2d) Portrait while activity behind is in landscape
3) Test launching things from Keyguard
3a) Without security
3b) With security
3c) Launch camera without security
3d) Launch camera with security
3e) Launch camera with securtiy and trusted
3f) Launch voice affordance
4) Set no notifications on lockscreen, drag down, make sure you get
the correct animation
5) Test clicking "emergency" on bouncer
5b) Test "Emergency info" on emergency dialer
5c) Test clicking edit button on emergency info, should show pattern on
Keyguard

Bug: 32057734
Change-Id: Icada03cca74d6a612c1f988845f4d4f601087558
2016-11-01 13:53:32 -07:00
Julia Reynolds
85769915e7 Some channel model updates
- Apps cannot update their channel settings after creation.
- Importance is required when creating a channel.
- Some method name changes.
- Ranker can't modify fields a user has changed.
- High and Max importance mean the same thing.
- The default channel adopts app wide settings on creation.
- The default channel is limited to importance low once target api is post n mr1
  unless the user changed it.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/notification

Change-Id: I73c449a6abe6d709046de79c5c54339cb2edf0b8
2016-11-01 19:31:34 +00:00
Charles He
88d601bbaf Merge "Update API whitelist supported by parent profile" 2016-11-01 17:58:08 +00:00
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
Charles He
8c76056c19 Update API whitelist supported by parent profile
1) Add #getPasswordMaximumLength() to the whitelist supported by the
parent profile
2) Throw SecurityException when #isAdminActive() is called on parent
profile

Change-Id: Idcc3ef48ce83963fcaa0259ec5f5781d95c83afa
Fixes: 32063080
Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
2016-10-25 16:36:53 +01: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