OSDN Git Service

android-x86/frameworks-base.git
5 years agoMerge "Make DefGrantPolicy always grant ALWAYS_LOCATION" into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 21:43:42 +0000 (21:43 +0000)]
Merge "Make DefGrantPolicy always grant ALWAYS_LOCATION" into qt-dev

5 years agoMerge "Add START_ACTIVITIES_FROM_BACKGROUND permission for com.android.providers...
TreeHugger Robot [Tue, 18 Jun 2019 20:11:01 +0000 (20:11 +0000)]
Merge "Add START_ACTIVITIES_FROM_BACKGROUND permission for com.android.providers.downloads" into qt-dev

5 years agoMerge "Added missing mGlobalLock in system server" into qt-dev
Chavi Weingarten [Tue, 18 Jun 2019 19:58:49 +0000 (19:58 +0000)]
Merge "Added missing mGlobalLock in system server" into qt-dev

5 years agoMerge "Ensure snapshot orientation matches snapshot buffer size" into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 19:46:34 +0000 (19:46 +0000)]
Merge "Ensure snapshot orientation matches snapshot buffer size" into qt-dev

5 years agoMerge "When the notification shade is shown the functionality to show/hide HUN should...
TreeHugger Robot [Tue, 18 Jun 2019 18:58:43 +0000 (18:58 +0000)]
Merge "When the notification shade is shown the functionality to show/hide HUN should be controlled via a config flag." into qt-dev

5 years agoMake DefGrantPolicy always grant ALWAYS_LOCATION
Eugene Susla [Tue, 18 Jun 2019 17:47:13 +0000 (10:47 -0700)]
Make DefGrantPolicy always grant ALWAYS_LOCATION

Test: atest DefaultPermissionGrantPolicyTest
Fixes: 135490561
Change-Id: Ifb70ee4cf3a04d3306c1412415ab46711f098d9e

5 years agoMerge "Use task bounds when drawing app theme snapshot" into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 18:06:27 +0000 (18:06 +0000)]
Merge "Use task bounds when drawing app theme snapshot" into qt-dev

5 years agoMerge "Log usage of addPerson() and setStyle() in notifications." into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 17:04:01 +0000 (17:04 +0000)]
Merge "Log usage of addPerson() and setStyle() in notifications." into qt-dev

5 years agoAdd START_ACTIVITIES_FROM_BACKGROUND permission for
Michal Karpinski [Tue, 18 Jun 2019 14:39:46 +0000 (15:39 +0100)]
Add START_ACTIVITIES_FROM_BACKGROUND permission for
com.android.providers.downloads

Required because DownloadManager needs to whitelist
a broadcast for bg activity starts.

Bug: 135515407
Test: builds, boots (it wouldn't without this)
Change-Id: Id6c22d1397417bbc10e2829e563f29cbccccd8bf

5 years agoMerge "Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable." into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 12:27:15 +0000 (12:27 +0000)]
Merge "Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable." into qt-dev

5 years agoAdding atom for logging GrantPermissionsActivity buttons presented and pressed.
Stanislav Zholnin [Thu, 6 Jun 2019 21:38:33 +0000 (22:38 +0100)]
Adding atom for logging GrantPermissionsActivity buttons presented and pressed.

Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 213
Bug:133401502
Bug:134581123
Change-Id: I4c74d590266f89b192605be6f94d038bc2e1bd5a

5 years agoMerge "[Magnifier-87] Fix deadlock causing ANR" into qt-dev
Mihai Popa [Tue, 18 Jun 2019 09:10:17 +0000 (09:10 +0000)]
Merge "[Magnifier-87] Fix deadlock causing ANR" into qt-dev

5 years agoMerge "Remove the <= P restriction for WIFI_P2P" into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 06:16:30 +0000 (06:16 +0000)]
Merge "Remove the <= P restriction for WIFI_P2P" into qt-dev

5 years agoRemove the <= P restriction for WIFI_P2P
Chalard Jean [Mon, 17 Jun 2019 15:20:11 +0000 (08:20 -0700)]
Remove the <= P restriction for WIFI_P2P

This is still sent in an intent.

Bug: 131764329
Fixes: 131764329
Merged-In: I56c86b0c1912064d5a642991df32d2cefb6a8d5b
Change-Id: I64b9d632be97dc51e6085162371bb8c19f410258
(cherry picked from commit e546cb0bd16b7359feeb3c46ba52e64cf91ae4d3)

5 years agoMerge "Don't apply some custom animation cases from app in WindowStateAnimator" into...
TreeHugger Robot [Tue, 18 Jun 2019 05:10:54 +0000 (05:10 +0000)]
Merge "Don't apply some custom animation cases from app in WindowStateAnimator" into qt-dev

5 years agoMerge "Set activity state to PAUSED when making visible from STOPPING/STOPPED" into...
TreeHugger Robot [Tue, 18 Jun 2019 04:26:01 +0000 (04:26 +0000)]
Merge "Set activity state to PAUSED when making visible from STOPPING/STOPPED" into qt-dev

5 years agoMerge "Reinflate silent notif header on config change" into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 03:06:58 +0000 (03:06 +0000)]
Merge "Reinflate silent notif header on config change" into qt-dev

5 years agoMerge "Check flags for user in SoftRestrictedPermPolicy" into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 02:59:17 +0000 (02:59 +0000)]
Merge "Check flags for user in SoftRestrictedPermPolicy" into qt-dev

5 years agoMerge "Hiding home handle while on home in no-button mode" into qt-dev
TreeHugger Robot [Tue, 18 Jun 2019 00:10:17 +0000 (00:10 +0000)]
Merge "Hiding home handle while on home in no-button mode" into qt-dev

5 years agoMerge "Use connected boolean as NLS does vs IBinder" into qt-dev
TreeHugger Robot [Mon, 17 Jun 2019 22:00:04 +0000 (22:00 +0000)]
Merge "Use connected boolean as NLS does vs IBinder" into qt-dev

5 years agoMerge "[AML] Check if launched activity has changed when handling visibility changes...
TreeHugger Robot [Mon, 17 Jun 2019 21:56:08 +0000 (21:56 +0000)]
Merge "[AML] Check if launched activity has changed when handling visibility changes" into qt-dev

5 years agoReinflate silent notif header on config change
Ned Burns [Thu, 13 Jun 2019 23:06:47 +0000 (19:06 -0400)]
Reinflate silent notif header on config change

Necessary in order to support locale changes.

Test: manual
Fixes: 135170814
Change-Id: Ic5fd09b539860a1119f1a5f1316c4a1f6c46e111

5 years agoCheck flags for user in SoftRestrictedPermPolicy
Philip P. Moltmann [Mon, 17 Jun 2019 21:28:11 +0000 (14:28 -0700)]
Check flags for user in SoftRestrictedPermPolicy

As the context might not be for the right user.

Test: Granted storage permission to app only installed in secondary user
Fixes: 135268081
Change-Id: I62569c812511509b60c4272042f949e547cb304b

5 years agoMerge "Handle invalid package name in isPermissionsReviewRequired" into qt-dev
TreeHugger Robot [Mon, 17 Jun 2019 21:26:57 +0000 (21:26 +0000)]
Merge "Handle invalid package name in isPermissionsReviewRequired" into qt-dev

5 years agoHiding home handle while on home in no-button mode
Sunny Goyal [Sun, 16 Jun 2019 20:50:07 +0000 (13:50 -0700)]
Hiding home handle while on home in no-button mode

> Unifying handling home and back button alpha logic

Test: go home, manual
Bug: 134381592
Change-Id: I93a72cc4ac252f2ced22216f14c50b074e9903c8

5 years agoMerge "Atoms for logging permission grants during system upgrade." into qt-dev
Stanislav Zholnin [Mon, 17 Jun 2019 19:45:41 +0000 (19:45 +0000)]
Merge "Atoms for logging permission grants during system upgrade." into qt-dev

5 years agoMerge "Remove dependency on OverviewProxyService from StatusBarWindowController"...
Winson Chung [Mon, 17 Jun 2019 19:00:41 +0000 (19:00 +0000)]
Merge "Remove dependency on OverviewProxyService from StatusBarWindowController" into qt-dev

5 years agoUse connected boolean as NLS does vs IBinder
Julia Reynolds [Wed, 5 Jun 2019 12:44:36 +0000 (08:44 -0400)]
Use connected boolean as NLS does vs IBinder

To determine if the CPS can get/send messages. Apparently
the IBinder can be cached in ActivityManager and onBind() is not
always called when a service is connected the second time.

Test: manual; ensure a service recieves an onsubscribe for an
active rule post requestUnbind/requestRebind
Fixes: 62584038

Change-Id: Iffe37242509f3bf26e609e6b423f3928c00156ad
(cherry picked from commit 265d093cd93099300df671f9a625b1c6985651c1)

5 years agoMerge "qt_dev: Fix ContentSuggestions service connection" into qt-dev
Perumaal Shanmugam [Mon, 17 Jun 2019 17:04:25 +0000 (17:04 +0000)]
Merge "qt_dev: Fix ContentSuggestions service connection" into qt-dev

5 years agoqt_dev: Fix ContentSuggestions service connection
Perumaal S [Fri, 14 Jun 2019 22:34:07 +0000 (15:34 -0700)]
qt_dev: Fix ContentSuggestions service connection

Issue:
When the RemoteContentSuggestionsService dies (due to package manager
update or clear data), the ContentSuggestionsPerUserService (system)
does not restart and uses an old zombie instance.

Fix:
 Reset the instance upon onServiceDied in the system service.

Test: Verified that stopping/clear-data/package-update of Device
Personalization Services (which implements ContentSuggestionsService)
multiple-times and then Overview long-press actually works.

Also verified that if the Remote Service crashes, we don't keep
 reconnecting infinitely.

Fixes: 120865921
Fixes: 130420008

Change-Id: I80197ec1cb446ddb5f1865a4b75beb18b48d2e9e

5 years agoMerge "Fix battery content description when there is no percent mode" into qt-dev
TreeHugger Robot [Mon, 17 Jun 2019 15:24:44 +0000 (15:24 +0000)]
Merge "Fix battery content description when there is no percent mode" into qt-dev

5 years agoMerge changes I80bebcd0,I35f3718f into qt-dev
TreeHugger Robot [Mon, 17 Jun 2019 14:15:13 +0000 (14:15 +0000)]
Merge changes I80bebcd0,I35f3718f into qt-dev

* changes:
  Simplification of code to prevent a Log.wtf in expected cases.
  Suppress the wtf log for notifications that are expected

5 years agoSimplification of code to prevent a Log.wtf in expected cases.
Chalard Jean [Mon, 17 Jun 2019 11:42:04 +0000 (04:42 -0700)]
Simplification of code to prevent a Log.wtf in expected cases.

This mostly serves to unindent code to make it locally more
readable. It is a functional no-op.

Bug: 135043192
Test: atest FrameworksNetTests
Merged-In: Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80
Change-Id: I80bebcd04c277f6e4b0665fe1253b2309e3bc535
(cherry picked from commit e1f5759319a4559b3cf89029449878dc56f92bb7)

5 years ago[Magnifier-87] Fix deadlock causing ANR
Mihai Popa [Mon, 17 Jun 2019 11:34:50 +0000 (12:34 +0100)]
[Magnifier-87] Fix deadlock causing ANR

Before this CL, the magnifier could deadlock when the following
happened:
1. the renderer is asked to draw (and a frame callback is provided)
2. a #dismiss() happens on the UI thread. This acquires mDestroyLock
(previously line 309)
3. InternalPopupWindow#destroy() is called, and this calls
mRenderer.destroy(). This attempts to destroy the renderer on the UI
thread, however the UI thread will wait until the pending frame callback
corresponding to step 1 is executed on the render thread.
4. The frame callback starts executing on the render thread, and tries
to acquire mDestroyLock (previously line 1093). However, this is held by
the UI thread, so a deadlock happens.

This CL completely removes mDestroyLock, relying on the existing
synchronization between the UI and render threads described in step 3.

Bug: 134584742
Test: manual testing
Change-Id: Ia4c75b5b997e0ed94d5a3814dd4507a8fffa124d

5 years agoMake InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable.
lumark [Mon, 17 Jun 2019 08:09:42 +0000 (16:09 +0800)]
Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable.

Annotates InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED as @TestApi
to let cts can verify if multi-client IME enabled.

Bug: 135217809
Test: build and passes
Change-Id: Id7b4dceb2dbfaf3d7ed1084957dd14b04cad0cdf

5 years agoMerge "We should prevent starting home activity before setup" into qt-dev
TreeHugger Robot [Mon, 17 Jun 2019 05:28:23 +0000 (05:28 +0000)]
Merge "We should prevent starting home activity before setup" into qt-dev

5 years agoSuppress the wtf log for notifications that are expected
Chiachang Wang [Thu, 13 Jun 2019 09:50:16 +0000 (02:50 -0700)]
Suppress the wtf log for notifications that are expected

PARTIAL and NO_INTERNET may happen in the real world for
those transport types that provide internet. These two
notification types should be reasonable notificaitons, not a
terrible failure as the log. For Q, it may be too risky to
display more notifications with other information instead of
SSID. Thus, suppress the wtf log for these two notifications.

Bug: 135043192
Test: atest FrameworksNetTests
Change-Id: I35f3718fa93b403858587d918f0bc596f6c92f3e
Merged-In: I91b92249dc7905aadbc59df50c3bc6da30a8590e
Merged-In: Ia1c2a765b0fb0cc8d440c02533bdc15774a5a3ef
(cherry picked from commit ed0a54bd07ea1c9072459bafeaf796eaa4dad4c5)

5 years agoSet activity state to PAUSED when making visible from STOPPING/STOPPED
Louis Chang [Mon, 22 Apr 2019 02:45:37 +0000 (10:45 +0800)]
Set activity state to PAUSED when making visible from STOPPING/STOPPED

An invisible activity state was STOPPED and was not updated while
making it visible. Once the activity became invisible again, the
activity won’t have to reenter the STOPPED state. But the window
surface was not destroyed and the window was in the surface destroy list
(WindowState.mDestroying was true).

In that case, when resuming the activity by finishing current top
activity (such as pressing back key), a transition animation was
set, but failed to play and had to wait until timeout.

Bug: 118349021
Bug: 132811175
Bug: 134986295
Test: ActivityRecordTests
Test: ActivityVisibilityTests
Test: ActivityLifecycleTests

Change-Id: I887740312de8f8580c58cde36e0f5137365b607c

5 years agoMerge "Restore the Private DNS settings to default mode upon network resets." into...
TreeHugger Robot [Mon, 17 Jun 2019 01:08:00 +0000 (01:08 +0000)]
Merge "Restore the Private DNS settings to default mode upon network resets." into qt-dev

5 years agoMerge "Fix the potential NullPointerException." into qt-dev
TreeHugger Robot [Mon, 17 Jun 2019 01:06:30 +0000 (01:06 +0000)]
Merge "Fix the potential NullPointerException." into qt-dev

5 years agoMerge "Import translations. DO NOT MERGE" into qt-dev
TreeHugger Robot [Sat, 15 Jun 2019 14:57:33 +0000 (14:57 +0000)]
Merge "Import translations. DO NOT MERGE" into qt-dev

5 years agoMerge "Update the edge back gesture width from the current user's overlays" into...
Winson Chung [Sat, 15 Jun 2019 06:30:51 +0000 (06:30 +0000)]
Merge "Update the edge back gesture width from the current user's overlays" into qt-dev

5 years agoUpdate the edge back gesture width from the current user's overlays
Winson Chung [Fri, 14 Jun 2019 16:31:46 +0000 (09:31 -0700)]
Update the edge back gesture width from the current user's overlays

- Also add some logging about the back gesture state

Bug: 135212748
Test: Switch to secondary user while first user is in 2/3 button and ensure
      secondary user back works

Change-Id: I0b144f8dc7c4818056068696b8fad5a6611515b9

5 years agoMerge "Removing noisy logging" into qt-dev
TreeHugger Robot [Sat, 15 Jun 2019 02:00:13 +0000 (02:00 +0000)]
Merge "Removing noisy logging" into qt-dev

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 15 Jun 2019 01:58:15 +0000 (18:58 -0700)]
Import translations. DO NOT MERGE

Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I66499356b7bb4d012b24c05035b052d92eca1314

5 years agoMerge "DO NOT MERGE: Add DENSITY_450" into qt-dev
TreeHugger Robot [Sat, 15 Jun 2019 00:26:09 +0000 (00:26 +0000)]
Merge "DO NOT MERGE: Add DENSITY_450" into qt-dev

5 years agoMerge "Mark getProfileOwnerAsUser(int) as UnsupportedAppUsage again" into qt-dev
TreeHugger Robot [Sat, 15 Jun 2019 00:21:45 +0000 (00:21 +0000)]
Merge "Mark getProfileOwnerAsUser(int) as UnsupportedAppUsage again" into qt-dev

5 years agoMerge "Always remove IconState in onViewRemoved, even if animations are off" into...
TreeHugger Robot [Sat, 15 Jun 2019 00:13:10 +0000 (00:13 +0000)]
Merge "Always remove IconState in onViewRemoved, even if animations are off" into qt-dev

5 years agoMerge "Zygote: do not preload Vulkan driver in Q" into qt-dev
TreeHugger Robot [Sat, 15 Jun 2019 00:02:36 +0000 (00:02 +0000)]
Merge "Zygote: do not preload Vulkan driver in Q" into qt-dev

5 years agoMerge "Pause watchdog triggering on the main thread during package scan" into qt-dev
TreeHugger Robot [Sat, 15 Jun 2019 00:02:26 +0000 (00:02 +0000)]
Merge "Pause watchdog triggering on the main thread during package scan" into qt-dev

5 years agoAdded missing mGlobalLock in system server
chaviw [Fri, 14 Jun 2019 23:41:17 +0000 (16:41 -0700)]
Added missing mGlobalLock in system server

The method resetFreezeTaskListReorderingOnTimeout is posted onto a
handler so it loses mGlobalLock. Reacquire the lock when the runnable is
invoked. Without the lock, the code enters very critical code unlocked,
causing race conditions.

Fixes: 135016269
Test: Hard to repro, go/wm-smoke
Change-Id: Iafccc466c1aa22ff6f528e99e68a672e0dc50975

5 years agoMerge "Add key layout for Nintendo Switch controller" into qt-dev
TreeHugger Robot [Sat, 15 Jun 2019 00:00:06 +0000 (00:00 +0000)]
Merge "Add key layout for Nintendo Switch controller" into qt-dev

5 years agoRemove dependency on OverviewProxyService from StatusBarWindowController
Winson Chung [Fri, 14 Jun 2019 05:37:31 +0000 (22:37 -0700)]
Remove dependency on OverviewProxyService from StatusBarWindowController

Bug: 134712444
Test: atest SystemUITests
Change-Id: Ifd6ac77670c408da74a7278e8da5868e78a6a068
Merged-In: Ifd6ac77670c408da74a7278e8da5868e78a6a068

5 years agoDO NOT MERGE: Add DENSITY_450
bj1211jeon [Tue, 11 Jun 2019 05:52:28 +0000 (14:52 +0900)]
DO NOT MERGE: Add DENSITY_450

Add 450dpi as a supported screen density.
This change follows up below change Id : Iac673eae2d82c27d96e279c076454af2f5933208

Originally 600dpi was added to support sw384 with WQHD resolution,
though it was lack of for the cases when resolution is FHD resolution. (In case of other resolutions, there already exist 300 and 200 for HD and WVGA resolutions).

Bug: 78283907
Test: run android.dpi.cts.ConfigurationTest#testScreenConfiguration and android.app.cts.ActivityManagerMemoryClassTest#testGetMemoryClass
(cherry picked from commit 13ca0450ede3eedf7d34bbd0b69525cb6ebc63f1)

Change-Id: Ide0baba183c7dea962610d16f18fecbd0dc62567

5 years agoMerge "Hide MultiUserSwitch when guestEnabled && no_add_users" into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 22:33:10 +0000 (22:33 +0000)]
Merge "Hide MultiUserSwitch when guestEnabled && no_add_users" into qt-dev

5 years agoHandle invalid package name in isPermissionsReviewRequired
Philip P. Moltmann [Fri, 14 Jun 2019 21:35:42 +0000 (14:35 -0700)]
Handle invalid package name in isPermissionsReviewRequired

Fixes: 129522923
Test: atest PermissionsHostTests
Change-Id: I2e0e65c5d10b88b5d74ed7eefa80fb381b22ddd7

5 years agoZygote: do not preload Vulkan driver in Q
Yiwei Zhang [Fri, 14 Jun 2019 21:11:47 +0000 (14:11 -0700)]
Zygote: do not preload Vulkan driver in Q

This is a partial revert of http://ag/7064585 to be safe for Q.

1. skia is not going to use Vulkan backend in Q.
2. usap is no longer preloading graphics drivers.
3. Most importantly, Vulkan loader is not quite ready to be preloaded in Zygote.
   Because the layers discovering mechanism currently only happens once with the
   driver loading. By preloading in Zygote, apps won't be able to use the layers
   shipped with the debug apk.

Bug: 135281983
Test: build, flash and boot.
Change-Id: I88b0ad60ab8233714253a92166da76dc992f7f98

5 years agoMark getProfileOwnerAsUser(int) as UnsupportedAppUsage again
Philip P. Moltmann [Fri, 14 Jun 2019 21:09:35 +0000 (14:09 -0700)]
Mark getProfileOwnerAsUser(int) as UnsupportedAppUsage again

As it was in P. There are no public APIs created, hence there is no
better, _public_, alternative.

Fixes: 135282729
Test: none
Change-Id: I199cfcc125f948b983eb55a199abf673cc58b7e1

5 years agoMerge "Add PSS info to dumpsys output." into qt-dev
Daniel Sandler [Fri, 14 Jun 2019 20:34:52 +0000 (20:34 +0000)]
Merge "Add PSS info to dumpsys output." into qt-dev

5 years agoMerge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"" into...
Tim Murray [Fri, 14 Jun 2019 19:50:20 +0000 (19:50 +0000)]
Merge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"" into qt-dev

5 years agoAlways remove IconState in onViewRemoved, even if animations are off
Evan Laird [Thu, 13 Jun 2019 20:29:20 +0000 (16:29 -0400)]
Always remove IconState in onViewRemoved, even if animations are off

Recent changes to avoid animating added a case where we can remove views
but not remove the actual IconState for that view, causing a leak

Fixes: 135180058
Test: heap dump?
Change-Id: If3e3924348a606484ac0968f644b4895871bd406

5 years agoMerge "Ensure onDarkIntensity is called on the proper thread." into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 19:16:44 +0000 (19:16 +0000)]
Merge "Ensure onDarkIntensity is called on the proper thread." into qt-dev

5 years agoLog usage of addPerson() and setStyle() in notifications.
Will Brockman [Fri, 14 Jun 2019 18:55:31 +0000 (14:55 -0400)]
Log usage of addPerson() and setStyle() in notifications.

Added Tron logging to StatusBarNotification.getLogMaker() so it will
be present in most logs about the notification.

Change-Id: I720706d37c663f2018bdfe2153ad180970166c90
Test: atest android.service.notification.StatusBarNotificationTest
Bug: 135180518

5 years agoAdd key layout for Nintendo Switch controller
Siarhei Vishniakou [Wed, 12 Jun 2019 16:59:59 +0000 (09:59 -0700)]
Add key layout for Nintendo Switch controller

The controller for Nintendo Switch is currently missing a key layout,
and the resulting codes are incorrect. Provide the appropriate map here.

Also, update some button mappings for the Xbox 360 controller.

Bug: 135136477
Test: Tested using "gamepad tester". CTS test will be added in a future
release. Tested using custom app.

Change-Id: I1ffcabdcc11aa83316c483ea49cb10fc85f6264f

5 years agoMerge "When data switches during voice call, make sure signal bar updates it." into...
Xiangyu/Malcolm Chen [Fri, 14 Jun 2019 17:53:30 +0000 (17:53 +0000)]
Merge "When data switches during voice call, make sure signal bar updates it." into qt-dev

5 years agoFix battery content description when there is no percent mode
Evan Laird [Fri, 14 Jun 2019 17:27:54 +0000 (13:27 -0400)]
Fix battery content description when there is no percent mode

Fixes: 135157243
Test: can focus on status bar battery when talkback is on
Change-Id: I413ba6664bc651ddc378ae344fa42a17d460bfa5

5 years agoRevert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"
Tim Murray [Fri, 14 Jun 2019 17:16:17 +0000 (17:16 +0000)]
Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"

This reverts commit c18c6da44185ce4a8b387dc367181781834cfc5f.

Reason for revert: major memory increase

Change-Id: Iffb9cd14343cd678849e487bfa163b5f23608ffd
Test: presubmit
Bug: 134695730

5 years agoMerge "Make silent notifications header font theme-aware" into qt-dev
Ned Burns [Fri, 14 Jun 2019 16:59:59 +0000 (16:59 +0000)]
Merge "Make silent notifications header font theme-aware" into qt-dev

5 years agoMerge "Fix default home detection logic" into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 16:53:33 +0000 (16:53 +0000)]
Merge "Fix default home detection logic" into qt-dev

5 years agoMerge ""Fix" issue #112467931: APR: WTF in ActivityManager:..." into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 16:40:49 +0000 (16:40 +0000)]
Merge ""Fix" issue #112467931: APR: WTF in ActivityManager:..." into qt-dev

5 years agoMerge "Clear transitions for app windows display change." into qt-dev
David Nelloms [Fri, 14 Jun 2019 16:39:56 +0000 (16:39 +0000)]
Merge "Clear transitions for app windows display change." into qt-dev

5 years agoPause watchdog triggering on the main thread during package scan
Zimuzo [Fri, 14 Jun 2019 10:47:45 +0000 (11:47 +0100)]
Pause watchdog triggering on the main thread during package scan

Similar to I3876c41e6d0e41d044a5b1d5e57f894c7fb4fb0e and
I69067fbbb8be4e421918c18b67269044fab51b3e where we pause
the watchdog because dexopting and moving A/B artifacts can take a while,
here scanning packages can take a long time depending on the number of
apps installed on the device.

Bug: 135103243
Test: Manually tested by adding an artificial sleep in
PackageManagerService#main and verified that watchdog was not triggered

Change-Id: Ia5b2b5741194a33f7cd09e79c0904696ce546026
Merged-In: Ia5b2b5741194a33f7cd09e79c0904696ce546026

5 years agoHide MultiUserSwitch when guestEnabled && no_add_users
Fabian Kozynski [Fri, 14 Jun 2019 14:54:35 +0000 (10:54 -0400)]
Hide MultiUserSwitch when guestEnabled && no_add_users

If the device is guestEnabled but the user cannot add new users (either
by system or by device policy), do not show MultiUserSwitch

Even if the user set the setting USER_SWITCHER_ENABLED to true by
accidentally going to "Multiple Users", it doesn't make sense to show it
in devices with a single user that cannot add users.

We still set the setting to true by default (even if it may be disabled
by policy), as the setting should reflect what the user sees in that
screen.

Test: manual
   * Set the user restrictions for user 0 as per in BR in b/134569467.
   Including policy as well as modifying /data/system/users/0.xml
   * Go to Multiple Users, see that it matches screenshot with setting
   enabled
   * See that the issue is that guests are enabled, even though the user
   cannot add guests and that's why MultiUserSwitch is showing.

Fixes: 134569467
Change-Id: If7c596769faa577d6d9ba8943722fb6e6734f7c2

5 years agoMerge "Revert "Change attrbute of double-power-to-camera vibration"" into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 14:07:13 +0000 (14:07 +0000)]
Merge "Revert "Change attrbute of double-power-to-camera vibration"" into qt-dev

5 years agoMerge "Revert "Change attribute of fingerprint vibrations"" into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 14:07:13 +0000 (14:07 +0000)]
Merge "Revert "Change attribute of fingerprint vibrations"" into qt-dev

5 years agoFix default home detection logic
Govinda Wasserman [Thu, 13 Jun 2019 13:58:22 +0000 (09:58 -0400)]
Fix default home detection logic

Default home detection did not perform priority analysis if the default
home was null. Furthermore, the default home was retrieved before it was
initialized. By listening for boot complete and package changes, we
ensure that we get the correct default home.

This fixes incorrect handle behavior and metrics logging.

Test: Tested locally
BUG:135150547
Change-Id: I4ca36cbb1fad73905344e2434592a1893c178e23
FIX:135150547

5 years agoAtoms for logging permission grants during system upgrade.
Stanislav Zholnin [Thu, 6 Jun 2019 20:28:44 +0000 (21:28 +0100)]
Atoms for logging permission grants during system upgrade.

Test: manually verified
Bug:133401502
Bug:134581123
Change-Id: I004704e39c8936de91300b6f98e722d925142c14

5 years agoDon't apply some custom animation cases from app in WindowStateAnimator
lumark [Wed, 12 Jun 2019 08:58:35 +0000 (16:58 +0800)]
Don't apply some custom animation cases from app in WindowStateAnimator

In general, app main window the animation should applied by
AppWindowToken#applyAnimationLocked through app transition.

We should avoid application can apply animation through
WM.LayoutParams.windowAnimation for app main window.

We also ignore application to customize starting window animation,
since starting window is a special window for displaying while app
starting, application should not use or change animation directly.

Bug: 133274628
Test: atest AppTransitionTests
Test: manual, as below steps:
    1) Launch apps (i.e. Pocketcasts) that override windowAnimation style
       with custom animation for app main window or starting window
       (TYPE_BASE_APPLICATION | TYPE_APPLICATION_STARTING).
    2) In gesture nav, swipe left & right back on nav bar.
    3) Expect the app's main window should not have animation or flick.

Change-Id: Ibeac1e513023ab19bcfb7ee412f41a570e917a17

5 years agoMerge "Change factoryReset to succeed for Settings" into qt-dev
Lorenzo Colitti [Fri, 14 Jun 2019 04:13:27 +0000 (04:13 +0000)]
Merge "Change factoryReset to succeed for Settings" into qt-dev

5 years agoWe should prevent starting home activity before setup
Chilun [Wed, 12 Jun 2019 04:06:37 +0000 (12:06 +0800)]
We should prevent starting home activity before setup

In original call flow, we were using startActivityAsUser, which has
the check, to start home activity.
In previous CL, we replaced it by
mActivityTaskManagerInternal.startHomeOnDisplay but missed the check.
So we need to add it back now.
Also add unit tests.

Bug: 134689126
Test: atest PhoneWindowManagerTests
Change-Id: Icc455d5596f8d9691d61c7b8dda82016720443b7

5 years agoMerge "Fix rotation button background not showing after first boot." into qt-dev
Tracy Zhou [Fri, 14 Jun 2019 02:00:28 +0000 (02:00 +0000)]
Merge "Fix rotation button background not showing after first boot." into qt-dev

5 years agoMerge "Game Driver: Process sphal libraries in GraphicsEnvironment" into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 01:36:32 +0000 (01:36 +0000)]
Merge "Game Driver: Process sphal libraries in GraphicsEnvironment" into qt-dev

5 years agoMerge "Fix the missing longwake finish event problem." into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 01:03:34 +0000 (01:03 +0000)]
Merge "Fix the missing longwake finish event problem." into qt-dev

5 years agoMerge "Fix buffer overflow in Trace's JNI layer" into qt-dev
TreeHugger Robot [Fri, 14 Jun 2019 00:36:03 +0000 (00:36 +0000)]
Merge "Fix buffer overflow in Trace's JNI layer" into qt-dev

5 years agoMerge "Game Driver: add support to apply prerelease driver for all apps" into qt-dev
TreeHugger Robot [Thu, 13 Jun 2019 23:44:36 +0000 (23:44 +0000)]
Merge "Game Driver: add support to apply prerelease driver for all apps" into qt-dev

5 years agoMerge "userdebug: support perfetto traces as a section in incident reports" into...
Ryan Savitski [Thu, 13 Jun 2019 23:42:09 +0000 (23:42 +0000)]
Merge "userdebug: support perfetto traces as a section in incident reports" into qt-dev

5 years agoMerge "Trace sync rt transaction applier" into qt-dev
TreeHugger Robot [Thu, 13 Jun 2019 23:12:00 +0000 (23:12 +0000)]
Merge "Trace sync rt transaction applier" into qt-dev

5 years ago"Fix" issue #112467931: APR: WTF in ActivityManager:...
Dianne Hackborn [Thu, 13 Jun 2019 23:07:09 +0000 (16:07 -0700)]
"Fix" issue #112467931: APR: WTF in ActivityManager:...

...android.util.Log$TerribleFailure: No package in referenced provider

I couldn't figure out how this is happening, so for now we'll just
spackle things over and make it okay.

Fixes: 112467931
Test: We'll see in APR, if I could repro I would have a real fix
Change-Id: Ib546f76dc1146375e279e886a030468ed92668f5

5 years agoFix rotation button background not showing after first boot.
Tracy Zhou [Sat, 8 Jun 2019 00:02:53 +0000 (17:02 -0700)]
Fix rotation button background not showing after first boot.

KeyButtonView#setDarkIntensity() does not initialize mHasOvalBg and
mOvalBgPaint until the drawable is attached to the view, which happens
after KeyButtonView#draw() is called in the first run.

Test: Reboot, make sure background of the rotation button shows at first
run
Fixes: 134070810

Change-Id: Ib38660cde691f3d36f502023ffe082f0becd95eb

5 years agoWhen data switches during voice call, make sure signal bar updates it.
Malcolm Chen [Wed, 12 Jun 2019 02:48:38 +0000 (19:48 -0700)]
When data switches during voice call, make sure signal bar updates it.

isDataEnabled only reflects user setting of mobile data is on or off.
isDataCapable reflects better of whether the data could be setup or not,
considering user settings and other restrictions and exceptions.

We should use isDataCapable when deciding what to show in signal bar.

When non default data SIM is in voice call, there could be an exception
that we also setup data on that SIM.

Bug: 134981077
Test: manual
Change-Id: I54fc4ca104cb451af847d7973fbffc7f0ed97c10

5 years agoMerge "Also dispatching that we finished waking up after booting" into qt-dev
Selim Cinek [Thu, 13 Jun 2019 21:54:20 +0000 (21:54 +0000)]
Merge "Also dispatching that we finished waking up after booting" into qt-dev

5 years agoFix buffer overflow in Trace's JNI layer
John Reck [Wed, 12 Jun 2019 23:57:59 +0000 (16:57 -0700)]
Fix buffer overflow in Trace's JNI layer

There doesn't appear to be anything better
than blindly make a buffer 4x the length of a
jstring if a maximum buffer size is useful.

So do that.

This does slightly regress Trace's performance.

Before:

android.os.TracePerfTest:INSTRUMENTATION_STATUS: enabled_mean=14
INSTRUMENTATION_STATUS: enabled_median=14
INSTRUMENTATION_STATUS: enabled_min=14
INSTRUMENTATION_STATUS: enabled_standardDeviation=0
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: beginEndSection_mean=3087
INSTRUMENTATION_STATUS: beginEndSection_median=3059
INSTRUMENTATION_STATUS: beginEndSection_min=3020
INSTRUMENTATION_STATUS: beginEndSection_standardDeviation=75
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: counter_mean=1893
INSTRUMENTATION_STATUS: counter_median=1900
INSTRUMENTATION_STATUS: counter_min=1851
INSTRUMENTATION_STATUS: counter_standardDeviation=26
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: asyncBeginEnd_mean=4281
INSTRUMENTATION_STATUS: asyncBeginEnd_median=4306
INSTRUMENTATION_STATUS: asyncBeginEnd_min=4184
INSTRUMENTATION_STATUS: asyncBeginEnd_standardDeviation=65
INSTRUMENTATION_STATUS_CODE: -1

After:

android.os.TracePerfTest:INSTRUMENTATION_STATUS: enabled_mean=16
INSTRUMENTATION_STATUS: enabled_median=16
INSTRUMENTATION_STATUS: enabled_min=16
INSTRUMENTATION_STATUS: enabled_standardDeviation=0
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: beginEndSection_mean=3869
INSTRUMENTATION_STATUS: beginEndSection_median=3864
INSTRUMENTATION_STATUS: beginEndSection_min=3840
INSTRUMENTATION_STATUS: beginEndSection_standardDeviation=21
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: counter_mean=2511
INSTRUMENTATION_STATUS: counter_median=2503
INSTRUMENTATION_STATUS: counter_min=2480
INSTRUMENTATION_STATUS: counter_standardDeviation=35
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: asyncBeginEnd_mean=5348
INSTRUMENTATION_STATUS: asyncBeginEnd_median=5344
INSTRUMENTATION_STATUS: asyncBeginEnd_min=5318
INSTRUMENTATION_STATUS: asyncBeginEnd_standardDeviation=28
INSTRUMENTATION_STATUS_CODE: -1

But it also works correctly and doesn't crash, and that seems worth it.

Fixes: 133104515
Test: systrace still works, AtraceHostTest passes, verified
    Trace.beginSection of 4-byte utf8 octets showed up in systrace
Change-Id: Ie2e31227d9380df4190f9bc09ecd67f8a982827f

5 years agoMerge "Bump up contrast of NotificationInfo.Secondary" into qt-dev
TreeHugger Robot [Thu, 13 Jun 2019 21:51:25 +0000 (21:51 +0000)]
Merge "Bump up contrast of NotificationInfo.Secondary" into qt-dev

5 years agoGame Driver: Process sphal libraries in GraphicsEnvironment
Yiwei Zhang [Thu, 13 Jun 2019 21:02:35 +0000 (14:02 -0700)]
Game Driver: Process sphal libraries in GraphicsEnvironment

Previously, there's only one Game Driver existed in the system, so we process
sphal libraries in GPU service to save the launch time for loading Game Driver.
Now we need to support a separate prerelease driver, so we have to move the
processing back to app launch time.

Bug: 134881329
Test: Manual test with prerelease driver and Settings UI.
Change-Id: Ic1bb412a6a026c68f55243c906bd56fe1fee44c3

5 years agoAdd PSS info to dumpsys output.
Dan Sandler [Fri, 7 Jun 2019 19:51:27 +0000 (15:51 -0400)]
Add PSS info to dumpsys output.

We now track the last 12 hours of PSS measurements in SysUI
and emit them in bugreports.

While we're at it, tidy up some of the heap dumping code
(dump on separate thread, update tile state, tweak sharing
extras to fix filename when sharing to Drive).

Bug: 133671238
Test: adb shell dumpsys activity service SystemUI
Change-Id: I862f6e78ed49cf669786610fec0768ebb3b24438

5 years agoMerge "Add atom for logging of ReviewPermissionsFragment actions." into qt-dev
TreeHugger Robot [Thu, 13 Jun 2019 20:15:35 +0000 (20:15 +0000)]
Merge "Add atom for logging of ReviewPermissionsFragment actions." into qt-dev

5 years agoTrace sync rt transaction applier
Jorim Jaggi [Thu, 13 Jun 2019 19:44:42 +0000 (21:44 +0200)]
Trace sync rt transaction applier

Test: Trace
Bug: 134583193
Change-Id: I00c2863f954e4c991d684ce4220380573db4d749

5 years agoEnsure onDarkIntensity is called on the proper thread.
Matt Casey [Thu, 13 Jun 2019 19:24:58 +0000 (15:24 -0400)]
Ensure onDarkIntensity is called on the proper thread.

Bug: 135064217
Test: Verified thread behavior via logging.
Change-Id: Ib1a6dcacb22dc2eeabc49c6a7568ca248ae79cdf

5 years agoEnsure snapshot orientation matches snapshot buffer size
Winson Chung [Thu, 13 Jun 2019 17:36:58 +0000 (10:36 -0700)]
Ensure snapshot orientation matches snapshot buffer size

- We take/create the snapshot based on the bounds of the task, which are
  taken from the task's configuration.  However, the orientation is taken
  from the app window's configuration, and if it has a requested
  orientation then the snapshot bounds can differ from the orientation
  (which makes it impossible for Launcher to render it correctly).

  This is visible when returning home from a landscape app where we update
  the configuration of the display as a part of resuming the home activity,
  which propagates down to the task, but where the app window's override
  configuration is still landscape while the bounds are portrait.

Bug: 132687470
Test: Open Hearthstone, hit home and then go to overview
Change-Id: I748a60c50a8f79a861b721dc490bd359d14d8160

5 years agoUse task bounds when drawing app theme snapshot
Jorim Jaggi [Thu, 13 Jun 2019 14:22:35 +0000 (16:22 +0200)]
Use task bounds when drawing app theme snapshot

Otherwise the buffer we draw isn't really consistent with the
normal case, where we always create a buffer the size of the task.

Test: Quick switch with Camera
Fixes: 130020567
Change-Id: I222ec7e6d3112384d0981519b39be951ea855c1c