Commit Graph

12951 Commits

Author SHA1 Message Date
TreeHugger Robot
e378131ece Merge "Do not require reauth when turning on profile with unified challenge" 2020-02-03 17:32:06 +00:00
Andrei-Valentin Onea
af747cef1e Merge "Use FrameworkStatsLog instead of StatsLog" 2020-02-03 16:49:04 +00:00
TreeHugger Robot
c62ab87518 Merge "Check for feature flag when creating the package monitor." 2020-02-03 14:37:10 +00:00
TreeHugger Robot
c055ea0dc3 Merge "Verify personal package monitor is initialized before unregister" 2020-02-03 14:05:36 +00:00
Muhammad Qureshi
18b77a0cc5 Use FrameworkStatsLog instead of StatsLog
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by *StatsLog.java
that is autogenerated for each module.
This CL replaces some usages of StatsLog with FrameworkStatsLog.
Re-landing of http://ag/10194708 .

Bug: 145952197
Test: m
Change-Id: Ie5dcc3c677c0f3667d6505a76b91c05649787fba
2020-02-03 13:30:26 +00:00
Automerger Merge Worker
ea2a336113 Merge "Minor refactor of ChangeReporter and PlatformCompat" am: 55d16fac97 am: a8116d930c am: f8f7f29b32
Change-Id: Ic7db4dd118dceb1f8fe618cf341cbf725c818520
2020-02-03 13:10:18 +00:00
Automerger Merge Worker
a8116d930c Merge "Minor refactor of ChangeReporter and PlatformCompat" am: 55d16fac97
Change-Id: I691696fa0ffa50c87bb3afb26173f4cc595453a2
2020-02-03 12:46:12 +00:00
Treehugger Robot
55d16fac97 Merge "Minor refactor of ChangeReporter and PlatformCompat" 2020-02-03 12:37:48 +00:00
arangelov
e0cceb28dd Check for feature flag when creating the package monitor.
Fixes: 148657395
Test: manually used share sheet on both personal and work
profiles with the feature flag disabled

Change-Id: I02617454a57fb1933ba8e0e2a6d5598a3bb4016d
2020-02-03 12:20:26 +00:00
arangelov
96dec88059 Verify personal package monitor is initialized before unregister
The package monitor instances are now initialized after
configureContentView, which means we have to null check
when we autolaunch.

Test: none
Fixes: 148656667
Change-Id: If0bed185c7ee85840f691290a7718a6ff3b81b12
2020-02-03 12:20:09 +00:00
Automerger Merge Worker
ef21e5aefe Merge "Fix comments on ChangeId." am: 74e47edc82 am: c9f42024cd am: 4a54329474
Change-Id: If39b9bf0833327e9f13e7d39d6704efa2b2e0f96
2020-02-01 16:17:35 +00:00
Automerger Merge Worker
c9f42024cd Merge "Fix comments on ChangeId." am: 74e47edc82
Change-Id: I4c10072f6d20071cefb08338c9903275ba6ad69e
2020-02-01 16:00:13 +00:00
Jorim Jaggi
0e1ac39a06 Merge "Replace OnContentApplyWindowInsetsListener with simple boolean" 2020-02-01 15:44:51 +00:00
Jorim Jaggi
1f08f649c8 Replace OnContentApplyWindowInsetsListener with simple boolean
The concept will move into the support library (androidx), so in
the framework we only need a simple boolean to toggle the default
behavior.

Also remove redundant methods on WIC to control IME.

Bug: 143556682
Bug: 118118435
Test: WindowTest CTS
Change-Id: I30fbffdfbe79a57b0f4166f0657c78370c7bcf02
2020-02-01 12:51:42 +01:00
Sudheer Shanka
fe830f9760 Merge "Validate input arguments to BlobStoreManager APIs." 2020-01-31 22:19:23 +00:00
Taran Singh
bba1617932 Merge "Use ViewRoot's attrs in Window" 2020-01-31 17:58:24 +00:00
Automerger Merge Worker
892e354de9 Merge "Remove try-catch from LocationPermissionChecker" am: 497afcff0c
Change-Id: Iba17dc925db09447e71e766c5fac254128f820d1
2020-01-31 16:43:37 +00:00
atrost
e0c0823569 Fix comments on ChangeId.
This allows them to be used in doc generation.

Test: m -j offline-sdk-docs
Bug: 144927670
Change-Id: I849975c8bf880433490b42d514f3c8089029b497
2020-01-31 14:50:43 +00:00
Andrei Onea
1220afbd75 Minor refactor of ChangeReporter and PlatformCompat
Move all StatsLog generated constants into ChangeReporter, to make
re-submitting http://ag/10194708 easier.

Bug: 145952197
Test: atest PlatformCompatTest ChangeReporterTest
Change-Id: Iccff9582099c58f070a6b6aeb1d2588b0fafa90a
2020-01-31 14:30:28 +00:00
Tarandeep Singh
76e9379985 Use ViewRoot's attrs in Window
App window can override attributes available in Window#getAttributes(),
instead use ViewRootImpl attributes.
Bug: 111084606
Test: Manually verify with apps that use adjust_resize

Change-Id: I6091a08879d897bd708972347ac80be859d29f35
2020-01-30 17:21:36 -08:00
Andrii Kulian
e11e951f66 Merge changes from topic "add_bundle_to_window_context"
* changes:
  Exempt-From-Owner-Approval: Fix usages of WindowManager.getDefaultDisplay() in f/b
  Add bundle options to Context#createWindowContext API
2020-01-31 01:16:34 +00:00
Andrii Kulian
e57f2dc246 Exempt-From-Owner-Approval: Fix usages of WindowManager.getDefaultDisplay() in f/b
Replace the existing usages of now-deprecated API
WindowManager.getDefaultDisplay() with WindowMetrics or
Context.getDisplay() in frameworks/base.

Bug: 128338354
Test: Build, auto test
Change-Id: I02d38a022c5e0e6e9d699f03d35b65d6c8126da9
2020-01-31 01:15:21 +00:00
Qingxi Li
0b61b3d716 Remove try-catch from LocationPermissionChecker
Since LocationPermissionChecker#checkLocationPermission will be
used in ConnectivityService and the try-catch style will end up
in unwinding the stack. This CL remove the try-catch block from
this check function.

Bug: 148460709
Test: atest LocationPermissionCheckerTest
Change-Id: Ia97b3d8b1a96aca10fd87876969c290818e7e758
Merged-In: Ia97b3d8b1a96aca10fd87876969c290818e7e758
2020-01-31 01:06:17 +00:00
Qingxi Li
b3958e2e94 Merge "Remove try-catch from LocationPermissionChecker" 2020-01-31 00:28:00 +00:00
Andrei-Valentin Onea
a3511ce62c Merge "Revert "Use FrameworkStatsLog instead of StatsLog"" 2020-01-30 22:23:58 +00:00
Andrei-Valentin Onea
a1487bc4ad Revert "Use FrameworkStatsLog instead of StatsLog"
This reverts commit 73107044ce.

Reason for revert: It breaks this revert http://go/aogs/topic:%22revert-1210143-platformcompat-permissions-FYXPNZREZR%22+(status:open%20OR%20status:merged)

Change-Id: I64e29ba2998e7c8b4e09104caadcd2a33bacead1
2020-01-30 22:14:59 +00:00
TreeHugger Robot
dde20309d8 Merge "Notification instance ids in NMS for statsd logs." 2020-01-30 21:33:18 +00:00
Makoto Onuki
dafca1e0da Merge "Make Log.wtf() safe to call from within the system server" 2020-01-30 18:50:29 +00:00
Qingxi Li
ccc1c5df4a Remove try-catch from LocationPermissionChecker
Since LocationPermissionChecker#checkLocationPermission will be
used in ConnectivityService and the try-catch style will end up
in unwinding the stack. This CL remove the try-catch block from
this check function.

Bug: 148460709
Test: atest LocationPermissionCheckerTest
Change-Id: Ia97b3d8b1a96aca10fd87876969c290818e7e758
2020-01-30 10:24:54 -08:00
TreeHugger Robot
653dd7b19f Merge changes I0677bca4,I7cad6529
* changes:
  Fix autolaunching.
  Create a PackageMonitor instance for each profile.
2020-01-30 18:15:07 +00:00
Muhammad Qureshi
a6b9b0724c Merge "Use FrameworkStatsLog instead of StatsLog" 2020-01-30 16:40:28 +00:00
Will Brockman
cfd983061a Notification instance ids in NMS for statsd logs.
Notification instance IDs are generated by NotificationManagerService
when the notification is first posted, and stored in the
StatusBarNotification so that they can be passed to the SystemUI
process.

Bug: 144022566
Test: atest NotificationManagerService BuzzBeepBlinkTest RoleObserverTest
Test: statsd_testdrive 244
Change-Id: I804786dfa165864257d8801d7e96f2ac0ead960f
2020-01-30 11:35:10 -05:00
Daniel Sandler
2f7640449b Merge "Cherry-pick "action chips in share sheet" from qt-qpr1-dev." 2020-01-30 15:39:19 +00:00
arangelov
7981b1236d Fix autolaunching.
We autolaunch in the following cases:
1. There is only a personal profile, and it has 1 launchable target
2. There are a personal and work profiles, they have 1 launchable
target each, which is the same app. If the app has declared support
for cross-profile interaction, we auto launch that app on the current
profile.

Test: manually tested combinations of test cases with 0/1/2 resolved
apps on personal, 0/1/2 resolved apps on work, with enabled/disabled
cross-profile intents for both directions (work-personal and
personal-work)
Bug: 142537267
Bug: 142538125
Bug: 148536212
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest

Change-Id: I0677bca4dd0ce0412c1c5d386157b94fd87b6706
2020-01-30 13:48:29 +00:00
arangelov
bdb4005601 Create a PackageMonitor instance for each profile.
Bug: 142537267
Bug: 142538125
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest

Change-Id: I7cad6529c168422f68a1366d5c6281af605ca230
2020-01-30 13:47:31 +00:00
Rubin Xu
a3c71a1460 Do not require reauth when turning on profile with unified challenge
Encrypt a copy of the profile unified challenge with an auth-bound key
of 7-day timeout, so that the framework can rederive the challenge as
long as the user has unlocked the device in the last 7 days.

Bug: 72178550
Test: atest com.android.server.locksettings
Test: atest com.android.cts.devicepolicy.QuietModeHostsideTest

Change-Id: Icb1335ebce2bd1a29f5a7111b61536578fccedd5
2020-01-30 12:49:36 +00:00
Sudheer Shanka
4824e3dc0a Validate input arguments to BlobStoreManager APIs.
Bug: 148580257
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Change-Id: Id272c4a9be3ec9300c8cc6d8abdcd287b4d6dacb
2020-01-29 23:50:24 -08:00
Muhammad Qureshi
73107044ce Use FrameworkStatsLog instead of StatsLog
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by *StatsLog.java
that is autogenerated for each module.
This CL replaces some usages of StatsLog with FrameworkStatsLog.

Bug: 145952197
Test: m
Change-Id: Id3e0900a050441b9aef3ee6244759f5098afdfb1
2020-01-29 17:03:56 -08:00
Soonil Nagarkar
b6375a4f7f Create AppForegroundHelper
Create a new helper to deal with application foreground state changes.

1) Rename various Helpers.
2) Move GnssManagerService into location dir.
3) Use new AppForegroundHelper everywhere.
4) Move sendNiRequest to internal API
5) Some refactoring of NetInitiatedActivity

Test: atest AppForegroundHelperTest
Change-Id: Ifffe0e6a34452a18d017c6b190547b904d77b430
2020-01-29 15:23:06 -08:00
Makoto Onuki
83679a6c5c Make Log.wtf() safe to call from within the system server
Make sure to use the handler if the caller is the system server

Test: Build / treehugger / manual code inspection
Change-Id: I0c9998511280193d785ebcf7aa501ee02c0a8548
Fix: 148230239
2020-01-29 14:39:53 -08:00
Winson Chung
75f5bf33b0 Merge changes from topic "winscope-sysui"
* changes:
  Add initial SysUI trace support
  Update trace buffer to support SysUI & Launcher
2020-01-29 05:04:48 +00:00
Dan Sandler
e3d1993e47 Cherry-pick "action chips in share sheet" from qt-qpr1-dev.
> Action chips in share sheet.
>
> Move the Copy button to a new row of chips below the
> (now larger) preview. Optionally, if a proximity-sharing
> service is installed, show that chip as well.
>
> Bug: 143229724
> Fixes: 144290152
> Test: atest SystemUITests frameworks/base/core/tests/coretests
> Change-Id: I0d6457df85bc937f72ca97da6b4b84b634a90daf
>
> ----------
>
> Exclude nearby_sharing_component from backup test
>
> Fixes: 146019461
> Test: atest SettingsBackupTest
> Change-Id: Ieb953284f2c00d69220e776f2b628f73013140e0
>
> ----------
>
> DO NOT MERGE: Fix alignment of share chips.
>
> Bug: 144290152
> Test: visual inspection in landscape & portrait
> Change-Id: Ib60b7b56bdf23a45c61416b8309a921451010e8e
>
> ----------
>
> Allow nearby sharing to substitute name & icon in chip
>
> meta-data bundle keys (values are resids):
>
>     CHIP_LABEL_METADATA_KEY = "android.service.chooser.chip_label"
>     CHIP_ICON_METADATA_KEY = "android.service.chooser.chip_icon"
>
> Test: manual, confirm that correct name & icon are used
>       and that custom icon is tinted in light/dark theme
>       (and that the copy chip is tinted right, too!)
> Bug: 144290152
> Change-Id: I57157e07630fa8bec3057e6d18336c59944fcb4f
>
> ----------
>
> DO NOT MERGE: Add another exception to the nearby-sharing chip code.
>
> Fixes: 146690046
> Test: Share from Chrome
> Change-Id: I41b3965ca2289f628a2d1de3a6da7daf01385a54

Test: atest SystemUITests frameworks/base/core/tests/coretests SettingsBackupTest
Test: manual sharing
Change-Id: Ibcf36b3c216da8e55597fbd307c9a7780cf571c6
2020-01-28 22:49:13 -05:00
Mady Mellor
bd35832d9b Merge "Bubble API: post update when bubble notification suppression flag changes" 2020-01-28 22:04:38 +00:00
Qingxi Li
df40c6dd2f Merge "Update location permission check for ConnectivityUtil"
am: 1e5d7a9020

Change-Id: Ic9a61ab57335f778c856ec226ded08a86dc22fc0
2020-01-27 15:21:59 -08:00
Qingxi Li
545a87c852 Update location permission check for ConnectivityUtil
This CL does following updates for the ConnectivityUtil class:
1. Remove the current profile check from location permission
check since it's not related to location permission check.
2. Makes all the checking functions to static to avoid memory
allocation
3. Rename the class from util to checker.

Bug: 148180968
Bug: 148232681
Bug: 148233000
Test: atest FrameworksNetTest
Change-Id: Ibf8879fe7dbcecdf766b959cb052d4d825b9b24c
Merged-In: Ibf8879fe7dbcecdf766b959cb052d4d825b9b24c
2020-01-27 14:11:15 -08:00
Qingxi Li
64fee3eb04 Merge "Update location permission check for ConnectivityUtil" 2020-01-27 21:50:07 +00:00
Mady Mellor
f44b68378c Bubble API: post update when bubble notification suppression flag changes
When bubbles are expanded or if the user dismisses the notification, the
notification associated with the bubble is suppressed from the shade, but
still technically active / in active notification list because of the
bubble.

We already have a concept of this with isNotificationSuppressed on
BubbleMetadata, this just ensures that the flag is properly updated when
the state changes in System UI. This allows other things showing
notifications (e.g. long press on launcher app icon -> see notifs) to
hide or show notifications consistently with the rest of system ui.

I'm re-using the flag that apps may set to suppress notifications when
they send a bubble that is foreground, since its the same concept.

When this flag state changes a new update is sent with the flag
adjusted.

Added a notification delegate method to communicate the suppression changes
back to NoMan. This is piped through a listener set on Bubble objects.

Test: atest NotificationManagerTest NotificationTest NotificationManagerServiceTest
Bug: 131926652
Bug: 144352570
Change-Id: I25e86849858cdfe2fb81ab51b1ff09980bf70944
2020-01-27 10:46:41 -08:00
Qingxi Li
38c37b5c1b Update location permission check for ConnectivityUtil
This CL does following updates for the ConnectivityUtil class:
1. Remove the current profile check from location permission
check since it's not related to location permission check.
2. Makes all the checking functions to static to avoid memory
allocation
3. Rename the class from util to checker.

Bug: 148180968
Bug: 148232681
Bug: 148233000
Test: atest FrameworksNetTest
Change-Id: Ibf8879fe7dbcecdf766b959cb052d4d825b9b24c
2020-01-27 10:16:51 -08:00
Winson Chung
b53b30cd26 Update trace buffer to support SysUI & Launcher
- Move TraceBuffer to sysui-accessible package, and make it generic
  to support both lite and nano proto callers
- Expose shell command to start/stop sysui tracing

Bug: 144854916
Test: atest TraceBufferTest

Change-Id: Id117024d943f148a91631fd9fcae1fd70fca8ab5
2020-01-27 10:04:58 -08:00
TreeHugger Robot
78ea2e1294 Merge "Sets the home handle default to always visible" 2020-01-27 17:49:46 +00:00