Commit Graph

14887 Commits

Author SHA1 Message Date
Ytai Ben-tsvi
189d6050da Merge changes from topic "new-perm"
* changes:
  Demote AlwaysOnHotwordDetector to SystemApi
  Sessionize VoiceInteractionManagerService
  Sessionize the SoundTriggerService layer.
  Use standard API in SoundTriggerTestApp
  Fix bug in dumpsys
  Require identity information in SoundTrigger.java
  Associate an originator identity to sessions
  Extract permission checking as a separate aspect
  Correctly handle HAL death
2020-09-21 19:07:04 +00:00
Tiger Huang
a7c40017ff Merge "Remove the legacy insets mode" 2020-09-19 17:07:56 +00:00
TreeHugger Robot
c4c1de307e Merge "Refactor ListenerMultiplexer with new capabilities" 2020-09-18 21:06:02 +00:00
Maryam Karimzadehgan
7d395e2ee9 Use ML model for the Back Gesture in EdgeBackGestureHandler.
Change-Id: I2fd5255e903932c03a35ae463b0eff3840dc81bd
Test: manual model test and getting the results
b: 150170384
2020-09-18 18:31:23 +00:00
Soonil Nagarkar
87b8cc3866 Refactor ListenerMultiplexer with new capabilities
-Store tag string in multiplexer rather than duplicating in every
registration.
-Add support for failure callbacks at listener operation submission
time, in addition to within the listener operation itself.
-Extract request out of ListenerRegistration and into subclass, so that
the multiplexer does not need to have any knowledge of requests.
-New multiplexer specific execute and failure callbacks within
registrations objects, with strongly typed listener operation objects.
-Fixed resetService() to work properly even if the service is still
registered.
-Added registration info as an argument to registerWithService() so that
this doesn't need to be duplicated if a client wants access to this
information.
-Narrow exception handling so that only the proper exception
(RemoteException for binder calls for instance) results in registration
removal, and other unexpected checked exceptions should still crash the
process.
-Various other minor fixes.

Test: manual + presubmit
Change-Id: I6fdec313222ff1ef01a1aa4d27d8ee56b4be25d4
2020-09-18 10:08:11 -07:00
Tiger Huang
6ef3b6e137 Remove the legacy insets mode
This CL also refines the color view logic which checks the system bar
appearance instead of system UI flags.

Bug: 149813814
Test: atest InsetsAnimationControlImplTest InsetsControllerTest
            InsetsStateTest InsetsPolicyTest InsetsStateControllerTest
Change-Id: I26d93b3508c84e436133085bd316ade54d00d76a
2020-09-18 15:13:12 +08:00
Sanguk Jeon
761e81f6a8 Ensure that binding state is false when handling dead binder
When a binding is disconnected, it is expected that binderDied() is
called after onBindingDied(). But, there exists a corner case where
the order is reversed. In this case, binderDied() cancels the
scheduling of MSG_UNBIND message, which blocks the chance of changing
mBinding value as false. As a results, mBinding value remains as true
even though the binding is disconnected. This would make the service
as unresponsive when a client tries reconnecting to the service.

This change ensures that mBinding becomes false even though binderDied()
is called before onBindingDied().

Bug: b/162753393
Test: compile & verify basic functions working
Change-Id: I66c5b130674a4355123fbac27f574d0d081e7b63
2020-09-17 20:09:23 -07:00
Hall Liu
a471b1966e Merge "Update PhoneStateListener#onOutgoingEmergencySms" 2020-09-17 19:59:23 +00:00
TreeHugger Robot
34cb1e1519 Merge "Link wm shell command to enable protolog in shell" 2020-09-15 21:28:57 +00:00
Jeff Sharkey
4b5b0174d0 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570 am: 487d394296
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: Id01f468b43fd5b2aada78608010625b392c1b647
2020-09-15 21:01:48 +00:00
Winson Chung
d2b6017684 Link wm shell command to enable protolog in shell
- Pass through unhandled logging commands to SysUI to simplify
  enabling/disabling logging for the shell.

Bug: 168497382
Test: adb shell wm logging enable-text WM_SHELL_TASK_ORG
Test: adb shell wm logging enable-text WM_DEBUG_RECENTS_ANIMATIONS
Change-Id: I37942eaee82fdcf545212b18375f3d3e2638b8ee
2020-09-15 12:18:50 -07:00
Jeff Sharkey
487d394296 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I79488866c538bf9e76d0a6429e30262978f6fdab
2020-09-15 00:13:08 +00:00
Jeff Sharkey
da7478b570 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I9b79dbf3e9983523db11599d8ae289b05aabf80c
2020-09-14 23:42:34 +00:00
Jeff Sharkey
741c0a78cc Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I7da537200efe31e803234bd1a0236843064186c8
2020-09-14 23:10:42 +00:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Jeff Sharkey
6516a83886 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
2020-09-14 10:00:02 -06:00
Jeff Sharkey
705f6bec2d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e
2020-09-14 09:59:01 -06:00
Alex Johnston
0a378db111 Merge "Replace can managed scope enforce methods" 2020-09-13 18:47:46 +00:00
TreeHugger Robot
8d3243db15 Merge "Add stash support for PIP." 2020-09-12 01:15:12 +00:00
Treehugger Robot
5ca2e8a44e Merge "Quiet excessive logging of missing lambdas during preload" am: 70b20ee0b8 am: 1f2781c323 am: f72a5498af am: d39fbcc29e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424919

Change-Id: I4716c9349dd5db8cc4cb6d42e3f60e4897d5c88e
2020-09-11 21:46:22 +00:00
Treehugger Robot
d39fbcc29e Merge "Quiet excessive logging of missing lambdas during preload" am: 70b20ee0b8 am: 1f2781c323 am: f72a5498af
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424919

Change-Id: Icaa3321c187b2c4f64fc7d56d9917fdb5b4e216b
2020-09-11 21:16:58 +00:00
Ben Lin
104b2de2a5 Add stash support for PIP.
Bug: 165793553
Test: adb shell cmd device_config put systemui pip_stashing true
Test: Drag PIP Window to outside of display and see it stashed
Change-Id: I59e5475162cd3353e2bcbdf38bd5c5a22561a578
2020-09-11 13:50:12 -07:00
Treehugger Robot
f72a5498af Merge "Quiet excessive logging of missing lambdas during preload" am: 70b20ee0b8 am: 1f2781c323
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424919

Change-Id: I8f9b41ca6388fdeeda287e7919ef05e56f9da1a6
2020-09-11 20:39:22 +00:00
Hall Liu
4c1e8a2a9e Update PhoneStateListener#onOutgoingEmergencySms
Update the callback for emergency SMS to follow the same pattern as for
emergency calls for API consistency.

Fixes: 168269065
Test: atest CtsTelephonyTestCases:PhoneStateListenerTest
Change-Id: If27771aef1858ea92dd620b56368d1a6a4f61ab3
2020-09-11 13:32:16 -07:00
Sudheer Shanka
b60c823aab Merge "Include batterystats constants in the service dump." 2020-09-11 20:11:58 +00:00
Chris Wailes
5d29f49b7b Quiet excessive logging of missing lambdas during preload
This patch will change the logging behavior in the Zygote such that
lambdas from the preload list that aren't found during Zygote
initialization will be counted and a summary provided at the end rather
than logging them each individually.  These missing lambdas will only be
logged for userdebug builds.

Test: Compared logs before and after
Bug: 163602260
Change-Id: I4cd11d626d7e4f365c55f8458aac20cd442638ed
Merged-In: I4cd11d626d7e4f365c55f8458aac20cd442638ed
2020-09-11 10:55:02 -07:00
Alex Johnston
6834e11d92 Replace can managed scope enforce methods
Removed DPMS methods
* enforceCanManageScope
* enforceCanManageScopeOrCheckPermission
* ensureAllUsersAffiliated

Updated DPMS methods
* installKeyPair
* removeKeyPair
* setKeyGrantForApp
* generateKeyPair
* setKeyPairCertificate
* setKeepUninstalledPackages
* getKeepUninstalledPackages
* setApplicationRestrictions
* isNetworkLoggingEnabled
* getApplicationRestrictions
* setPackagesSuspended
* isPackageSuspended
* setApplicationHidden
* isApplicationHidden
* enableSystemApp
* enableSystemAppWithIntent
* installExistingPackage
* setNetworkLoggingEnabled
* retrieveNetworkLogs
* setUninstallBlocked
* setPermissionPolicy
* setPermissionGrantState
* getPermissionGrantState
* requestBugreport
* retrievePreRebootSecurityLogs
* retrieveSecurityLogs

Bug: 163732959
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstaller
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegationCertSelection
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testApplicationRestrictionIsRestricted
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegatedCertInstaller
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegatedCertInstallerDirectly
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegationCertSelection
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegation
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testApplicationRestrictionIsRestricted

Change-Id: Ifa0372021148d779d7b73034c3b51c9c903a4464
2020-09-11 14:28:49 +01:00
Sudheer Shanka
48e50a835d Include batterystats constants in the service dump.
Bug: 168268504
Test: manual
Change-Id: Ib5eb3d968c84146e45490e610508fa3b671fe23d
2020-09-10 19:58:55 -07:00
TreeHugger Robot
95425202db Merge "Quiet excessive logging of missing lambdas during preload" 2020-09-10 20:34:31 +00:00
Ytai Ben-Tsvi
10c9b09f25 Sessionize VoiceInteractionManagerService
This change associates an identity with every
VoiceInteractionManagerService session.

Change-Id: I6c87c2976a4409b8dda4480234d794db91cee374
Bug: 163865561
2020-09-10 13:27:08 -07:00
Ytai Ben-Tsvi
7558017301 Sessionize the SoundTriggerService layer.
This changes associates identity information with every
SoundTrigerService session.

Change-Id: I30c9177f21203c8f3d03d4ff31523137497e760b
Bug: 163865561
2020-09-10 13:27:08 -07:00
Marcin Oczeretko
a1a00b9fa8 Log FrameTracker aggregated frame stats as trace counters
Bug: 162927074
Test: manual - collected perfetto trace and verified the counters are
available

Change-Id: If742a487aba1493828653b2a8bb8109ae92deacf
2020-09-10 13:41:16 +01:00
TreeHugger Robot
fe4f84bbe0 Merge "Remove Session#getDisplayFrame" 2020-09-10 05:29:20 +00:00
TreeHugger Robot
ce48d61c99 Merge "Fix up PackageSetting pkg and path documentation" 2020-09-10 01:37:52 +00:00
Jing Ji
b133074462 Merge "Untangle BatteryStats lock" 2020-09-10 00:18:36 +00:00
Winson
b92073c580 Fix up PackageSetting pkg and path documentation
Renames baseCodePath -> baseApkPath and codePath -> path to better
reflect their actual meanings. Their respective JavaDoc has also been
consolidated and updated.

Also explains why the pkg field can be null, as this has been the cause
of a significant number of bugs. Also hides it behind a getter to
preempt any mutation issues. Doesn't refactor existing usages. This can
be done inline with other changes that touch that code.

Bug: 164218844
Bug: 164488334

Test: atest com.android.server.pm

Change-Id: Ia254e7cebb0ab86165e5ec42e8f8bfcf8673884b
2020-09-09 16:19:44 -07:00
Riddle Hsu
ccaeffc03f Remove Session#getDisplayFrame
The frame won't be changed if there is no IWindow#resized or
IWindowSession#relayout. So it can be retrieved from these methods
directly instead of another binder transaction.

And because some parameters are usually used together for layout,
the parameters are consolidated into a new ClientWindowFrames.
That reduces changing the interface in the future if the frame
related information needs to be changed.

Also refine the resize handling in ViewRootImpl to make it easier
to read.

There should be no behavior change by this modification.

Bug: 161781274
Test: WmTests, DialogFrameTests

Change-Id: I9f711ad2023442046fa8582944320b98e7c4ecfa
2020-09-10 00:26:11 +08:00
Ben Lin
7c10e48b42 Implement pinch to resize.
Bug: 166478885
Test: adb shell cmd device_config put systemui pip_pinch_resize true
Change-Id: Ide6fecd7a26c040b533fb49d399744c5617bfc93
2020-09-08 17:53:42 -07:00
Andrii Kulian
e2bd80228d Don't default to 1.33 min aspect ratio for pre-Q apps
1.33 minAspectRatio requirement for legacy apps was removed from CDD.

Bug: 165945457
Test: Verify resolved minAspectRatio on pre-Q apps
Change-Id: Ib9e14c2986dd27f900bd8a5fc4d500da3381e73d
2020-09-04 16:01:54 -07:00
Tiger Huang
7053288de1 Merge "Make FLAG_LAYOUT_NO_LIMITS compatible" 2020-09-03 07:14:31 +00:00
Zoey Chen
0707378f06 Merge "[5G] Implement Physical Channel Listener" 2020-09-03 02:47:06 +00:00
Chris Wailes
a39a1cead7 Quiet excessive logging of missing lambdas during preload
This patch will change the logging behavior in the Zygote such that
lambdas from the preload list that aren't found during Zygote
initialization will be counted and a summary provided at the end rather
than logging them each individually.  These missing lambdas will only be
logged for userdebug builds.

Test: Compared logs before and after
Bug: 163602260
Change-Id: I4cd11d626d7e4f365c55f8458aac20cd442638ed
2020-09-02 17:47:57 -07:00
Darryl Johnson
148a9925fc Merge "Prevent DecorContext from creating DisplayContext for default display." 2020-09-02 17:39:34 +00:00
Zoey Chen
bcdb260b5f [5G] Implement Physical Channel Listener
To support the new listen event, use long instead of int for the new one then creat bitmask for old events.

Bug: 162300897
Test: manual - 5g testing

Change-Id: I002cb3579eb920ffc0b0a8dbf59e8d1153222411
2020-09-02 14:43:41 +08:00
Darryl L Johnson
eb039cc64e Prevent DecorContext from creating DisplayContext for default display.
The previous implementation of createDisplayContext() was essentially a
noop within ResourcesManager when the default display was passed. However,
the current implementation always overrides the configuration with the provided
display's metrics so when a DecorContext with the default display is
created a new ResourcesImpl object is also created due to the difference in
configuration. This CL changes the DecorContext logic to match the
previous implemenation where the configuration is only overriden for a
non-default display thus only creating a new ResourcesImpl object for
non-default displays.

Bug: 166174272
Test: atest google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test -v
Test: atest com.android.internal.policy.DecorContextTest

Change-Id: I05920c4f7987ffcaec8b197e8636606c04b418d4
2020-09-01 14:54:46 -07:00
Marcin Oczeretko
d68c208ed7 Merge "Log measurements from LatencyTracker to statsd" 2020-09-01 13:08:47 +00:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Marcin Oczeretko
d4430329bc Report per-interaction frame statistics to statsd
Also reorganized the FrameTrackerTest a bit

Bug: 162927074
Test: manual - statsd_testdrive to verify statsd logging + run
FrameTrackerTest

Change-Id: Iec1fcafcd6c8373ebdeebbbd829eb94967c2bfb8
2020-08-28 16:08:36 +01:00
TreeHugger Robot
1e19bfb919 Merge "Introducing an interface to store alarms" 2020-08-28 02:33:49 +00:00