Commit Graph

468813 Commits

Author SHA1 Message Date
Santhosh Thangaraj
b403e7d24f Fix the delay time for Assistant
Bug: 150144102
Test: no new test added Existing is sufficient NotificationManagerServiceTest

Change-Id: Iaa3559b20e69ef57a4a4ddd6665d4d7156bb7dfe
2020-02-24 22:30:27 +00:00
Amy
630fc01bf6 Fix issues in register/unregister client API implementation
Issues include:
1. clientId array size checking too hard
2. missed use case validation
3. missed in use resources update when unregistering client(same in on
binder dead, will be in separate CL)
4. Calling PID should have only be used when tvinputsession id is null
5. Adding resources list to client profile

Test: atest TunerResourceManagerServiceTest
Bug: 147380513
Change-Id: I09b4105659a491b3c07e3b737fe0617b83d24447
(cherry picked from commit 19b71275e0)
2020-02-24 14:27:36 -08:00
Amy
abdf7b6a57 Add a TRM use case priority hints info object
This object includes a parser that reads the vendor config xml

Test: atest UseCasePriorityHintsTest
Bug: 147380513
Change-Id: I4bff0bc196a0c2a78ce4305acec7ce7cc9a4fa70
(cherry picked from commit 2f62bf64ca)
2020-02-24 14:27:36 -08:00
Amy
38ff0181c3 Add requestFrontend implementation in TunerResourceManager
Test: atest TunerResourceManagerServiceTest
Bug: 147380513
Change-Id: Icec048913e2cbe141448c0c322d37c233588dfcd
(cherry picked from commit 9d150f58bd)
2020-02-24 14:27:36 -08:00
Amy
9796ba2f6d Implement TRM setFrontendInfoList logic with unit tests
Note that this CL includes some format changes and redundant
implementation removing in ClientProfile.java and
TunerResourceManagerService.java.

The key change of the CL is the FrontendResource.java object and
the impl of the setFrontendResourceList method in
TunerResourceManagerService.java.

Test: atest TunerResourceManagerServiceTest
Bug: 147380513
Change-Id: I3df8e386ad37bc67694594b07de04cc9f3b88e02
(cherry picked from commit caf201a8e7)
2020-02-24 14:27:36 -08:00
Makoto Onuki
2d80ca09fc Squash same ApplicationInfo's in Parcel
ApplicationInfo now automatically tries to "squash" the same instances in a
Parcel.

NOTE: This CL still does *not* optimize the package manager APIs that return a
list. e.g. PM.queryContentProviders() still return duplicate AppInfo's.
We can optimize them by making ParcelableListSlice call "allowSquashing",
but that *could* have negative side effects, so I'm not doing it in this CL.
I think we can do that for S.

Bug: 148588589
Test: atest CtsContentTestCases # except for two preexsiting failures:
- android.content.pm.cts.PackageManagerTest#testGetIcon
- android.content.pm.cts.PackageManagerTest#testGetPreferredActivities

Test: Use the debugger and make sure bindApplication() is not receiving
duplicate AppInfo's in the provider list.

Change-Id: I3ba2c047a469169340c0f75c36bdfd394bc5d627
(cherry picked from commit 7d09275d70)
2020-02-24 22:22:13 +00:00
Amy
9db88a2f0d Add @NonNull annotation per API Council's suggestion
Test: make framework-minus-apex -j8
Bug: 150127251
Change-Id: I667668ec97cc46f2513c63eeadcc56d5a26cb41f
2020-02-24 14:10:40 -08:00
Feng Cao
85cbe43d48 Merge "Use context for correct display in the renderer service" into rvc-dev 2020-02-24 22:10:06 +00:00
Fabian Kozynski
f6063aea22 Use KeyguardStateController in GlobalActionsDialog
KeyguardStateController is the source of truth in SystemUI. In
particular, it is user aware and provides the state for the current
user.

Before this CL, GlobalActionsDialog used KeyguardManager in user 0,
which does not have the correct information for other users (unless we
used an unsupported API, that was not being used).

Test: manual, primary and secondary user
Fixes: 150146622
Change-Id: I5fd8786d403bed978443a8980950b66393c2b6ed
2020-02-24 16:17:02 -05:00
Hongwei Wang
85cf41fcc3 Move PiP animation to SysUI package
The bounds animation is cleaned up within window manager and it's now
the SysUI component listening on callbacks from TaskOrganizer for
entering to and exiting from PiP mode.

Additionally, the expand and move of the PiP window is now part of SysUI
as well.

Known issues:
- Black background when in transition from PiP to fullscreen. The
wallpaper gets into hidden state too early
- App gets into PiP mode too early when entering PiP, need to defer the
configuration change sent to app in this case

Bug: 146594635
Bug: 148198539
Bug: 138144750
Bug: 149569903
Test: atest PinnedStackTests
Test: atest PipAnimationControllerTest
Test: atest RecentsAnimationTest
Test: atest RecentTasksTest
Test: atest com.android.server.wm.ActivityStarterTests
Merged-In: Id0c8ce03fa26952daf5e3687b18b2eb2375b7d20
Change-Id: Id0c8ce03fa26952daf5e3687b18b2eb2375b7d20
2020-02-24 21:16:20 +00:00
Peter Kalauskas
84f02a81e8 Disable reduced scale if reduced scale config is 0
Change reduced scale implementation to toggle on/off based on
config_lowResTaskSnapshotScale=0 instead of ro.config.low_ram=true

Also, only use _reduced.jpg if reduced scale is enabled.  Previously,
for task snapshots, [0-9]+_reduced.jpg would be used if reduced scale
was disabled, and [0-9]+.jpg would never be used. This patch swaps that
behavior to make the underlying system more intuitive.  Now, if reduced
snapshots are disabled, store the task snapshot in [0-9]+.jpg and never
use [0-9]+_reduced.jpg.

Also, store low-res snapshots at config_lowResTaskSnapshotScale.
Prevously, low-res snapshots were stored at lowResScale * highResScale

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148099851
Bug: 142063079
Change-Id: I5a0d58766347d875eaec138820323063aa1c2988
2020-02-24 21:02:03 +00:00
Peter Kalauskas
fe0a413a60 Store original task width and height instead of scale
Store the original task snapshot size instead of the scale from which
the bitmap was saved. This simplifies the logic around restoring and
saving from the proto, as both the reduced scale and full scale
snapshots make use and share the same state.

Also remove scale from TaskSnapshot, and remove and reducedScale from
TaskSnapshot.Builder.

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148491788
Bug: 148617404
Bug: 142063079
Change-Id: I1dccaba87c3d8b95bf4156f41f9fd5d40019f675
2020-02-24 21:01:03 +00:00
Garfield Tan
8291ac23f8 Send input event ID in InputEventSender.
Bug: 144889238
Test: Builds.
Change-Id: I2a57767b08c88bbb84cc1dfd4f21f1b3c22af773
Merged-In: I2a57767b08c88bbb84cc1dfd4f21f1b3c22af773
(cherry picked from commit 4e67f841a7)
2020-02-24 12:46:02 -08:00
Garfield Tan
c8362b24f6 Add ID to InputEvent.
The interaction between Java and native code for KeyEvent and
MotionEvent is different, so I used different arrangement to pass
sequence number across JNI that keeps the consistency with other
metadata.

Unfortunately this new ID doesn't have absolute uniqueness guarantee so
it can't replace InputEvent#getSequenceNumber() which is used with a
strict in-process uniqueness assumption. Therefore only convert systrace
related use to ID.

Also expose ID generator through a static function in InputEvent so that
everyone can use it. InputReader and InputDispatcher will use different
instances.

Bug: 144889238
Test: Build and run.
Test: atest FrameworksCoreTests:KeyEventTest
Test: atest FrameworksCoreTests:MotionEventTest
Change-Id: Icbdcaee1d98948c05484865a4e15e55161ecfa69
Merged-In: Icbdcaee1d98948c05484865a4e15e55161ecfa69
(cherry picked from 29d21d4062)
2020-02-24 12:45:27 -08:00
Michael Wachenschwanz
1103ff27a8 Fix exempt vs unexempt scheduled sync standby bucket logic
Fix for bug in AppStandbyController that would treat all scheduled
syncs for user 0 as unexempted syncs and syncs for not user 0 as
exempted syncs, regardless of the actual exemption status.

Fixes: 150016258
Test: atest AppStandbyControllerTests

Change-Id: Ie9e63c2954d0abe2a28469ea95ba6995a5c8696d
(cherry picked from commit 3ffa92f62c)
2020-02-24 20:42:57 +00:00
Jack Yu
1e1ff94bdb Added missed incoming call SMS support
Provided a way for carrier to notify their users
about missed incoming call via special SMS.

Bug: 144068181
Test: MissedIncomingCallSmsFilterTest
Merged-In: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
Change-Id: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
(cherry picked from commit 0630b6c358)
2020-02-24 11:58:30 -08:00
Roshan Pius
807b34a2c6 WifiOemMigrationHook: Rename class to address API council feedback
Bug: 149418926
Test: Compiles
Change-Id: I59a6e893599b1ccaec51a39c9594f157622668a0
2020-02-24 11:49:02 -08:00
Jack Yu
0b9a12c2c4 Removed permission check
Removed permission check for getNetworkCountryIso and made it public.
This API was added since the first version of Android. Removed the
permission check for backward compatibility reason.

Test: Telephony sanity tests
Bug: 149872821
Change-Id: I68833fdf6f078d69bc8c2e5f01cf4e058d6d7093
2020-02-24 11:35:58 -08:00
Kweku Adams
0e2cbece6c Allow location when Car mode is active.
Car mode may be activated without the user plugging the device into the
car. In this scenario, the user is "interacting" with the device via the
car and may need navigation to work. To allow this use case, we make
sure battery saver doesn't disable location when the screen is off if
car mode is enabled. Night mode is also disabled as it could affect the
projected UI.

Bug: 149586834
Test: atest android.os.cts.batterysaving.BatterySaverTest
Test: atest BatterySaverPolicyTest
Test: manual visual confirmation and adb shell dumpsys power scanning
Change-Id: I3390c8a7f94652644f37027f3d22746a6af0efd6
(cherry picked from commit 8da3edbb56)
2020-02-24 19:28:33 +00:00
Miranda Kephart
2750ad0d59 Fix screenshot scaling bug
Occasionally, the screenshot preview would not reach the correct
final scale, instead getting "stuck" at some larger size. This is
because there was no final condition for the scale, so the final
state depended on exactly which values the ValueAnimator update
listener was called with. Setting a final state correctly fixes
this problem.

(Also fixes the equivalent bug for the x position.)

Bug: 150134649
Test: manual -- there was not a reliable repro for the bug, but it
hasn't been seen since making the change

Change-Id: Ia383ca9336db382fd54087ce12accafd35b48a22
2020-02-24 14:08:34 -05:00
Samuel Fufa
1acbf7763b Fix widget restore flow
After restore, the app should set OPTION_APPWIDGET_RESTORE_COMPLETED to
true on its widgets followed by calling updateAppWidget to update views.

Bug:63667276
Test: Manual
Change-Id: Idb6fc63b0f894fca9e0470aaf335240fc124e2e9
2020-02-24 19:07:59 +00:00
Samuel Fufa
191149a4d0 Clear registered prediction callbacks on destroy
destroy() removes callbacks from AppPredictionManagerService but not
from mRegisteredCallbacks.

Bug: 149388856
Test: manual
Change-Id: Id08d6b20362486bd1640310c64da35e0382d9b5e
2020-02-24 19:06:21 +00:00
Mingguang Xu
dea9593d23 Extension API: Replace NetworkScore object with integer in API surface
NetworkScore object is removed as part of punting the network selection refoundation feature out of Android 11.

Test: atest android.net.wifi
Bug: 135573686, 122133502, 136312816, 135572156

Change-Id: Ib4226a4d66ab29fc4b31226d5ece8ad14a14d1e1
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
(cherry picked from commit 705d110d85)
2020-02-24 19:05:32 +00:00
Galia Peycheva
a8e4641296 Clean up dreamland
Sort imports and exchange inline Runnables for lambdas

Bug: 133216167
Test: m && ./vendor/google/tools/flashall
Merged-In: Ife3d13904a698efbe0933676b176ac1fbb53d0bd
Change-Id: Ife3d13904a698efbe0933676b176ac1fbb53d0bd
(cherry picked from commit 21cab31b82)
2020-02-24 19:04:25 +00:00
Valerie Hau
27f83cdbce Merge "RESTRICT AUTOMERGE - Explicitly disable BLAST for SurfaceControlViewHost surfaces" into rvc-dev 2020-02-24 18:52:13 +00:00
Evan Laird
6075dd7f58 DO NOT MERGE: Add SystemUI support for front-facing camera protection
Devices with a DisplayCutout configured may want to add some extra area
of turned-off pixels around the cutout in order to keep light from
leaking into camera hardware. This CL adds two new config values to
sysui to enable the configuration of this cutout protection, and listens
for CameraManager events telling us that a relevant camera has turned
on.

Test: manual
Bug: 145095085
Change-Id: Ifce67a593247e3a2151d41800ae46a50478e0b7d
2020-02-24 18:44:48 +00:00
Fabian Kozynski
1e3178de3b Changed management to just show all controls
This is the first of a series of CLs to update management screens to
latest mocks. Now ControlModel is an interface to interact with the
Adapters. Different implementers can be used to surface different views
of all the controls.

Zones are now sorted according to the order they appear on load. Zones
with no name (or blank name) are given a generic "Other" and put at the
end.

Test: atest
Test: manual
Bug: 149138395

Change-Id: Ica708d903afed582c4c6ad4a5142351cd81cec89
2020-02-24 13:35:33 -05:00
Stanislav Zholnin
dbcf85e576 Trim "android.permission." from permission name to reduce reporting footprint.
Bug: 136134050
Test: ./out/host/linux-x86/bin/statsd_testdrive 10050
Change-Id: I32f4c83f3362ca06cf0893b60f523af86cbcda5c
2020-02-24 18:32:09 +00:00
Winson Chiu
1fd15d2073 Merge "Fix PackageSetting isUpdatedSystemApp and SYSTEM_EXT rescan" into rvc-dev 2020-02-24 18:29:21 +00:00
chaviw
b9c44aae79 Fix Display SurfaceControl leak
The DisplayContent was merging its transaction into the
RootWindowContainer's pendingTransaction. However, that transaction is
never applied so it was stuck in that transaction forever.

There's no need to merge to parent transaction when removing since
calling getPendingTransaction will already return the DisplayContent's
transaction.

Also added a forced Transaction.apply() when removing the DisplayContent
since there's a chance it may no be reachable when
performSurfacePlacement is called to apply all transactions.

Test: EncodeVirtualDisplayWithCompositionTest#testVirtualDisplayRecycles
No longer leaks SurfaceControls
Fixes: 149526716

Change-Id: I14aa5b2e0e14d75fb0285a1b7a511235064f621c
(cherry picked from commit 93938469fc)
2020-02-24 18:09:51 +00:00
Stanislav Zholnin
fd2f367df6 Merge "Add atom and puller for AppOps with FeatureIds" into rvc-dev 2020-02-24 17:37:45 +00:00
Felipe Leme
9fa3a870c6 Merge "Improved user callbacks on SystemService:" into rvc-dev 2020-02-24 16:59:32 +00:00
Nikita Ioffe
2773260387 Merge "UserspaceRebootLogger: query sys.boot.reason.last" into rvc-dev 2020-02-24 16:58:21 +00:00
Automerger Merge Worker
30d7e1c32e [automerger skipped] Merge "Add DEBUG flag for rounded corner and display cutout path" into qt-qpr1-dev am: 353d26c897 -s ours
am skip reason: Change-Id I87f04b50945e1500babdf9fa7ba9cdb37010fde8 with SHA-1 3bf9ca2727 is in history

Change-Id: I60d0be497a66025937b6d2ab8513d35b72b3bcfb
2020-02-24 16:47:04 +00:00
TreeHugger Robot
353d26c897 Merge "Add DEBUG flag for rounded corner and display cutout path" into qt-qpr1-dev 2020-02-24 16:45:30 +00:00
Felipe Leme
339b7149af Improved user callbacks on SystemService:
* Renamed:

  onStartUser() -> onUserStarting()
  onStopUser() -> onUserStopping()
  onSwitchUser() -> onUserSwitching()
  onUnlockUser() -> onUserUnlocking()
  onCleanupUser() -> onUserStopped()
  isSupportedUser() -> isUserSupported()

* Added:

  onUserUnlocked()

Tested on automotive, which uses the callbacks to dump user metrics:

$ adb shell dumpsys car_service --user-metrics
adb shell dumpsys car_service --user-metrics
* User Metrics *
  no users starting
  no users stopping
Last 10 started users
  2020-02-21T19:44:47.101 - user=0 start=2020-02-21 19:44:45.357 unlocking=+885ms unlocked=+1s122ms
  2020-02-21T19:44:56.376 - user=10 start=2020-02-21 19:44:47.380 switch=+209ms unlocking=+8s262ms unlocked=+8s994ms
  2020-02-21T20:00:08.792 - user=11 start=2020-02-21 20:00:04.634 switch(from 10)=+351ms unlocking=+4s44ms unlocked=+4s156ms
Last 10 stopped users
  2020-02-21T20:00:48.323 - user=10 stop=2020-02-21 20:00:16.741 shutdown=+31s581ms

Test: m update-api
Test: atest BackupManagerServiceTest
Test: manual verification (see above)
Fixes: 150001654

Exempt-From-Owner-Approval: approved on master right before rvc split

Merged-In: I8774c57620030b9aa8e7ec039a6a758ad56db368
Change-Id: I8774c57620030b9aa8e7ec039a6a758ad56db368
(cherry picked from commit 58e7458ac7)
2020-02-24 16:44:52 +00:00
Julia Reynolds
7d5dfe8f44 Merge "Address api feedback" into rvc-dev 2020-02-24 16:39:40 +00:00
Automerger Merge Worker
547ddb0e60 [automerger skipped] Merge "DO NOT MERGE Respect rounded.xml size in ScreenDecorations" into qt-qpr1-dev am: 688ebd6876 -s ours
am skip reason: subject contains skip directive

Change-Id: I0e6c482e042e14f1b1eddd284fbd7a98dca574ce
2020-02-24 16:39:16 +00:00
Bill Lin
688ebd6876 Merge "DO NOT MERGE Respect rounded.xml size in ScreenDecorations" into qt-qpr1-dev 2020-02-24 16:27:20 +00:00
Joanne Chung
b0b721bbe0 Fix wrong parameter fieldIndex caused IndexOutOfBoundsException
The inline authentication change ag/10235929 changes the parameter of
createInlineSuggestion from fieldIndex to datasetIndex. However, the
passed parameter forget to change to datasetIndex. It is possible to
trigger IndexOutOfBoundsException when we have multiple fields but
only one dataset.

Bug: 149891961
Test: atest android.autofillservice.cts.inline.InlineAuthenticationTest
Test: Manual test by local sample
Change-Id: Iec074b14f2aa3fdb7de918ad684192921b9c5d65
2020-02-24 15:58:05 +00:00
Robert Carr
6d16c8c340 RESTRICT AUTOMERGE - Explicitly disable BLAST for SurfaceControlViewHost surfaces
Right now it crashes because the ViewRoot expects to receive a
BLAST surface but the WindowlessWindowManager doesn't support it.
Adding support should be relatively trivial (coming in a follow-up)
but we haven't tested it yet so suggesting merging this patch for
today.

Bug: 150000636
Test: Existing tests pass
Change-Id: I4b36d190c8f4f022dada656e02452034113a4000
(cherry picked from commit b4727e0f55)
2020-02-24 15:56:07 +00:00
Stanislav Zholnin
7dcc51dc79 Add atom and puller for AppOps with FeatureIds
Bug: 136134050
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive 10074

Change-Id: Ic1d84b2f91e9b6857dda717ab21208d9f331be2f
2020-02-24 15:30:00 +00:00
Les Lee
14ebab3b19 Merge "wifi: correct API name" into rvc-dev 2020-02-24 15:29:21 +00:00
Gavin Corkery
025b96ee57 Merge "Ensure staged rollback status is logged on boot" into rvc-dev 2020-02-24 15:23:01 +00:00
Patrick Baumann
d3990130cb Disable caches for perf tests
Bug: 140788621
Test: atest PackageManagerPerfTest
Change-Id: Idba8ea4c53ceacd9e07a06717c44d5411aef45d8
2020-02-24 14:57:54 +00:00
Carmen Jackson
37887b2d4c Fix PinnerService SecurityException at boot
We were passing "system" as the callingPackage argument when calling
registerUidObserver, which is apparently invalid. null is a valid option
here and seems to pin everything as expected, so this change updates
this call to avoid the SecurityException.

Note that this SecurityException does not seem to have affected the
actual pinning of the expected files - we still pin the same files
before and after this change.

Bug: 147355976
Test: No longer see the SecurityException at boot. Running dumpsys
pinner at boot shows that the same files are pinned as before this
change, including the Camera app but not including a Launcher app.
After using the four-corner tap to bypass the setup wizard, the Launcher
app is pinned. This indicates that the uid observer worked correctly to
re-pin the Launcher app after it replaces the setup wizard.

Change-Id: I2cd845cb5fad3de251d110141dcd1af9ec3aa234
Merged-In: I2cd845cb5fad3de251d110141dcd1af9ec3aa234
(cherry picked from commit 96f6b2d1d9)
2020-02-24 13:48:07 +00:00
Nikita Ioffe
7bc82dd543 UserspaceRebootLogger: query sys.boot.reason.last
Also did a small refactoring in computeOutcome() method to make it work
for cases when boot reason has a sub-reason, e.g.:
reboot,mount_userdata_failed,no_userdata_in_fstab.

Test: adb shell svc reboot userspace
Bug: 148767783
Change-Id: I13474d8a5be9382f56fdc8f17cf201666492e60d
2020-02-24 12:27:06 +00:00
Jiyong Park
5f85c597df reduce the visibility of framework-minus-apex
statsd no longer depends on it.

Bug: 147128803
Test: m

Change-Id: Iae72b5cadf2c747a5c1a203959c6ebcd2953050c
2020-02-24 21:07:45 +09:00
shawnlin
16ba068293 Fixed not updating waterfall insets in DisplayCutout.inset()
Bug: 149975807
Test: atest DisplayCutoutTest
Change-Id: Ic672e0688bbafabdd67790936568f40f6c4a3dff
2020-02-24 18:00:22 +08:00
Charles Chen
23c81a156e Merge "Revert "Revert "Always get window insets from server""" into rvc-dev 2020-02-24 09:14:56 +00:00