Commit Graph

94312 Commits

Author SHA1 Message Date
Pinyao Ting
e3eba1322b Fix the issue provider can be wrong when requesting slice permission
SlicePermissionActivity reads provider_pkg from intent, which can be
modified at will. As a result user might see incorrect package name in
the dialog granting slice permission.

Bug: 159145361
Test: manual
Merged-In: I8b66c02786df4096dad74b7e76255d5ddd1d609d
Change-Id: I8b66c02786df4096dad74b7e76255d5ddd1d609d
(cherry picked from commit 0ad32a2d70)
2020-09-24 19:06:07 +00:00
TreeHugger Robot
3830f1214c Merge "Sanitize more of the notification text fields" into qt-qpr1-dev 2020-09-09 23:41:05 +00:00
Seigo Nonaka
41b1674f77 Accept repeated locale as an input of LocaleList construction.
Repeated locale has not been accepted and IllegalArgumentException
is thrown. Instead of throwing exception, dropping repeated locale
instead.

Bug: 152410253
Test: atest LocaleListTest
Change-Id: I80f243678ac3024eaeb0349f770cff897df7f332
2020-09-08 20:22:48 +00:00
Julia Reynolds
8061246d4a Sanitize more of the notification text fields
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092

Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
2020-09-03 19:39:55 +00:00
Patrick Baumann
b059bd3947 Do not set referrerUri on SessionInfo for non-owners
This change leaves the referrerUri field null when the caller leading to
its production is not the owner of the session.

Bug: 142125338
Test: atest SessionReferrerUriTest
Merged-In: I84679ea0636aa2097e25e23813c48134c9cc1d75
Change-Id: I84679ea0636aa2097e25e23813c48134c9cc1d75
2020-06-26 16:23:36 +00:00
Linus Tufvesson
eb827bb278 RESTRICT AUTOMERGE am: 7faec2493b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11326773

Change-Id: I04e0d0d822ba6ecc65f9433ad5229ceef6f37468
2020-06-03 12:15:47 +00:00
Martijn Coenen
0a91f61ac8 Use killProcessGroup when killing app zygote.
To make sure we kill all untracked children, too.

Bug: 156741968
Bug: 157598956
Test: manual inspection, PoC no longer works.
Change-Id: I5d8efeb05ddec08a7fc7c00eabca6590c4cfdd8c
2020-05-29 14:33:49 +00:00
Kevin Chyn
38691f7626 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941 am: c1f5869518
Change-Id: I1ea9173d607acdcbd03de42aa793b018c23828e3
2020-05-07 01:15:56 +00:00
Kevin Chyn
c1f5869518 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941
Change-Id: I18eb6c4cd9c42f3cc1d1051b47aafeeffb6b0c16
2020-05-07 01:02:48 +00:00
Kevin Chyn
f21b907b1b Revert "Check Read permissions when getDocumentMetadata"
This reverts commit c94646177c.

Reason for revert: 155930637

Change-Id: Id452d316d1c1721fce715474df009ebe0fb719e8
2020-05-07 00:39:46 +00:00
Diksha Gohlyan
3bea45c642 Merge "Check Read permissions when getDocumentMetadata" into pi-dev am: 4371baafc1 am: ada451e47c
Change-Id: Id40f7456923144e3496df2028c771325ad1f480e
2020-05-06 23:16:07 +00:00
Diksha Gohlyan
ada451e47c Merge "Check Read permissions when getDocumentMetadata" into pi-dev am: 4371baafc1
Change-Id: Ib242d6ed7ff376a71f85a03aa06f2c0453638310
2020-05-06 23:05:34 +00:00
Diksha Gohlyan
c94646177c Check Read permissions when getDocumentMetadata
Test: manually tested
Bug: 151095863

Change-Id: I4f04f08f76d039196c2c67bac80d4a46ebec87f2
(cherry picked from commit 0e75809955)
2020-05-05 20:00:05 +00:00
Linus Tufvesson
7faec2493b RESTRICT AUTOMERGE
This change is the union of
I2aaab1903dee54190338f7b6e49888aa51437108 and I58834636e092f992e403342e36b475dc60e8f20a

Original CL descriptions:

*** I2aaab1903dee54190338f7b6e49888aa51437108
Block TYPE_PRESENTATION windows on default display

... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

*** I58834636e092f992e403342e36b475dc60e8f20a
Use TYPE_PRIVATE_PRESENTATION for private presentations

Detect if the Presenation is targeting a private virtual display, and if they
are use the windowType TYPE_PRIVATE_PRESENTATION.
***

Bug: 141745510
Test: atest CtsWindowManagerDeviceTestCases:android.server.wm.PresentationTest CtsDisplayTestCases:android.display.cts.VirtualDisplayTest

Change-Id: I9f1c4b140ab4bc6183151aafc5501e8648fbc3fa
2020-05-01 18:34:59 +01:00
Linus Tufvesson
8f258aaee1 RESTRICT AUTOMERGE am: a9211d687d
Change-Id: I48884c93a30f03f0803ebfe939c2b5cedad70321
2020-04-02 13:47:14 +00:00
Linus Tufvesson
0b23243935 Merge "RESTRICT AUTOMERGE" into pi-dev 2020-04-02 13:31:56 +00:00
Linus Tufvesson
04897a9bbd Merge "RESTRICT AUTOMERGE" into qt-dev 2020-04-02 13:31:13 +00:00
Linus Tufvesson
a9211d687d RESTRICT AUTOMERGE
Revert submission 10383599-type-presentation-q

Reason for revert: Breaks apps using Presentation in combination with private virtual displays
Reverted Changes:
I2aaab1903:RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows...
Ib5a24f8be:RESTRICT AUTOMERGE Add test for Presentation

Bug: 141745510

Change-Id: I0b3a332c286900952b65ece12435f981e324cb5b
2020-03-31 17:39:41 +00:00
Linus Tufvesson
b235ee8617 RESTRICT AUTOMERGE
Revert submission 10446362-type-presentation-p

Reason for revert: Breaks apps using Presentation in combination with private virtual displays
Reverted Changes:
Ib5a24f8be:RESTRICT AUTOMERGE Add test for Presentation
I2aaab1903:RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows...

Bug: 141745510

Change-Id: I9e8a02d5162cd5f8fb0f1860c4d4f099c718a946
2020-03-31 17:37:45 +00:00
TreeHugger Robot
7a9c03e529 Merge "Parcel only the canonical Uri.Part representation, not both." into qt-qpr1-dev 2020-03-23 20:04:30 +00:00
Siarhei Vishniakou
ab9efea935 Disable deep press when long press is long
If long press timeout is not 'short', we disable deep press.

Also InputManagerService.java will now be responsible for keeping track
of the feature state.

In ViewConfiguration, we update the default value to 400 to match the
value in the settings (b/30159825)

Bug: 148311342
Bug: 30159825
Test: see the description in the frameworks/native change
Change-Id: I88b933e9e863d40e383afdc990e09b848e23192e
Merged-In: I88b933e9e863d40e383afdc990e09b848e23192e
2020-03-20 23:25:03 +00:00
TreeHugger Robot
e6627c7172 Merge "Fix bluetooth can't turn off during network reset (2/3)" into qt-qpr1-dev 2020-03-20 03:33:52 +00:00
Sarah Chin
452b3d0550 5G Q backport
Meteredness (SubscriptionPlan, CarrierConfig)
Bandwidth estimates

Bug: 151630253
Test: DcTrackerTest, DataConnectionTest, SubscriptionManagerTest
Test: manual testing with cmd phone cc set-value that unmetered values
      result in NET_CAPABILITY_NOT_METERED
Test: manual testing with TestServiceState that NR_NSA and NR_NSA_MMWAVE
      bandwidths are updated when ServiceState changes
Change-Id: I718fb1540892bd3630439a06955d82f6c35dcdfc
Merged-In: Idb67fb7676adf9e1158113e7b8b08e655f470920
2020-03-19 02:15:02 +00:00
Automerger Merge Worker
20cd95a7f6 RESTRICT AUTOMERGE am: 60a6583adf
Change-Id: I387d6fcf719b56132baeff486aebce875d76f602
2020-03-11 20:05:08 +00:00
Shuzhen Wang
ca1872dc0d Merge "Camera: Add new hidden API for camera open/close callback" into qt-qpr1-dev 2020-03-11 19:29:42 +00:00
TreeHugger Robot
3d4cf34685 Merge "RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows on default display" into qt-dev 2020-03-11 19:25:05 +00:00
TreeHugger Robot
5c1ada4bb3 Merge "RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows on default display" into pi-dev 2020-03-11 04:55:07 +00:00
Christopher Tate
45a53e6cb8 DO NOT MERGE - Kill apps outright for API contract violations
...rather than relying on in-app code to perform the shutdown.

Bug: 128649910
Bug: 140108616
Test: manual
Test: atest OsHostTests#testForegroundServiceBadNotification
Change-Id: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
Merged-In: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
2020-03-10 22:32:13 +00:00
Shuzhen Wang
e375ee8f8a Camera: Add new hidden API for camera open/close callback
The hidden API is used by SystemUI process to adjust the system UI based
on when a certain camera is opened or closed.

Test: Manually observe callbacks in SystemUI when running camera CTS
Bug: 150540299
Change-Id: I04cae782d96f0e32be8ef588dcd328f84b32887a
Merged-In: I04cae782d96f0e32be8ef588dcd328f84b32887a
2020-03-10 11:34:26 -07:00
weichinweng
d61f3f9ce1 Fix bluetooth can't turn off during network reset (2/3)
Remove disable Bluetooth action from AdapterService and move to
BluetoothManagerService.
Add factory reset reason into Bluetooth enable/disable reason list.

Bug: 110181479
Test: manual
Change-Id: I4bff3c3bb75fbb0d1e13c459c0d9d3fd3b8b3195
Merged-In: I4bff3c3bb75fbb0d1e13c459c0d9d3fd3b8b3195
2020-03-09 15:35:29 +08:00
TreeHugger Robot
97f5b4092a Merge "DO NOT MERGE - Kill apps outright for API contract violations" into qt-dev 2020-03-06 01:15:38 +00:00
Linus Tufvesson
bf89805ea3 RESTRICT AUTOMERGE
Block TYPE_PRESENTATION windows on default display

... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

Bug: 141745510
Test: cts-tradefed run cts -m CtsActivityManagerDeviceTestCases -t android.server.am.PresentationTest
Change-Id: I2aaab1903dee54190338f7b6e49888aa51437108
2020-03-04 10:05:55 -08:00
Linus Tufvesson
60a6583adf RESTRICT AUTOMERGE
Block TYPE_PRESENTATION windows on default display

... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

Bug: 141745510
Test: cts-tradefed run cts -m CtsWindowManagerDeviceTestCases -t android.server.wm.PresentationTest
Change-Id: I2aaab1903dee54190338f7b6e49888aa51437108
2020-03-04 10:01:09 -08:00
TreeHugger Robot
a373984e96 Merge changes from topic "revert-9783082-1574797358199-802c4081-VGXGMNZIXS" into qt-qpr1-dev
* changes:
  DO NOT MERGE: Revert Move startInput for WINDOW_FOCUS_GAIN to background thread
  DO NOT MERGE: Revert: Freeup lock when IME is set inactive and unbound
2020-02-29 21:24:47 +00:00
Yohei Yukawa
344858dd9c DO NOT MERGE: Revert Move startInput for WINDOW_FOCUS_GAIN to background thread
Reason for revert:
Caused an unexpected regression Bug 144174015

Bug: 139806621
Bug: 144103599
Fix: 144174015
Test: Manually verified Bug 144174015 disappeared as follows
 1. Open Gmail then start composing an email
 2. Swipe up the home button to recents then re-launch Gmail
 3. Do the step 2 several times.
 4. Make sure that you can still type something on Gmail.
Change-Id: I9265f01ed2f6e4aca7728d278f06ceea5633dac5
2020-02-28 23:07:53 +00:00
Yohei Yukawa
9494c9dbb7 DO NOT MERGE: Revert: Freeup lock when IME is set inactive and unbound
Reason for revert:
Caused an unexpected regression Bug 144174015

Bug: 139806621
Bug: 144103599
Fix: 144174015
Test: Manually verified Bug 144174015 disappeared as follows
 1. Open Gmail then start composing an email
 2. Swipe up the home button to recents then re-launch Gmail
 3. Do the step 2 several times.
 4. Make sure that you can still type something on Gmail.
Change-Id: I04a77afea17f9d3eb05017fa00313fad4e48cd5c
2020-02-28 23:06:57 +00:00
Dmitry Dementyev
eab74f8e20 Merge "Remove hidden shared account methods from AccountManager.java" into qt-qpr1-dev 2020-02-13 23:01:31 +00:00
Felipe Leme
e8d9d331ae Merge "Disabled some DEBUG constants." into qt-qpr1-dev 2020-02-08 21:12:22 +00:00
Yan Zhu
f8c0b31524 DO NOT MERGE - Enable blacklist for headless system user
- Get all packages for system user
- Reuse split system user's logic to blacklist packages when headless system
user is enabled
- Add new method in UserManager to get headless sytem user mode (same as
in master)

Bug: 145626101
Test: edit device's sysconfig file, use tag: system-user-blacklisted-app to blacklist app
make services && adb sync system && adb reboot
cts test

Change-Id: I98d1bc33e7dd59ffa3ac6426f95af708671138da
(cherry picked from commit 9c4cf4945d57d45e429bc7d33bf6ffa68eb0838c)
2020-02-08 00:29:19 +00:00
Felipe Leme
85382ce4d2 Disabled some DEBUG constants.
Bug: 138939803
Bug: 142965266
Bug: 148457657

Test: echo 'in TH we trust!'

Change-Id: Ie3112fa1965d9b03bc142924ca17cf27dd6aa44d
(cherry picked from commit e966b8e76d26283163721620528eea0bfd77b43c)
2020-02-07 11:52:28 -08:00
Dmitry Dementyev
a5fb0829d5 Remove hidden shared account methods from AccountManager.java
Bug: 145207098,145206763,145206842
Test: CTS
Change-Id: I0d07e0e6c4377eff5756ee938c5b43ad632249df
(cherry picked from commit b6907622f7)
2020-02-06 22:18:47 +00:00
Automerger Merge Worker
74c9ad17c2 Merge "Fix serialization issue of ExternalVibration" into qt-dev am: 02824fc2a9
Change-Id: I196882cf82416b3d4e84c487bd94b925f719dc1d
2020-02-06 00:25:37 +00:00
Chris Ye
02824fc2a9 Merge "Fix serialization issue of ExternalVibration" into qt-dev 2020-02-06 00:12:49 +00:00
Christopher Tate
38567a6051 DO NOT MERGE - Kill apps outright for API contract violations
...rather than relying on in-app code to perform the shutdown.

Bug: 128649910
Bug: 140108616
Test: manual
Test: atest OsHostTests#testForegroundServiceBadNotification
Change-Id: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
Merged-In: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
2020-02-05 12:32:21 -08:00
Tobias Thierer
f35f2913f8 Parcel only the canonical Uri.Part representation, not both.
Before this CL, Uri.AbstractPart's implementation of Parcelable
was parceling and unparceling both the encoded and the decoded
representation. A Uri with inconsistent decoded/encoded
representation of its Parts would have remained inconsistent
across parcel/unparcel cycles. For example, such a Uri's
uri.getDecodedAuthority() might have returned "good.com" while
url.getEncodedAuthority() (used e.g. for toString()) returned
"evil.com".

After this CL, AbstractPart's constructor allows at most one of
the representations to be set (exception: NULL and EMPTY); this
means that no Part instance with inconsistent values can be
constructed via the constructor (e.g. by unparceling parceled
data). The historical parcel representation of a Part with both
values present can no longer be unparceled, which is safe because
Parcel does not guarantee backwards compatibility (the parceled
form must not be persisted across Android version upgrades).

When parceling, only one of the values is now stored, namely
the (canonical) one that was passed to the constructor.

Fixes: 124526860
Test: atest FrameworksCoreTests:android.net.UriTest
Test: Checked that if run before this CL, the added tests
      would fail with a failure along the lines of:
      ComparisonFailure: expected:</foo/[b]> but was:</foo/[a]>
      or (if the first assertion was commented out):
      ComparisonFailure: expected:<[b].com> but was:<[a].com>

Change-Id: I2bc2008e49de5a66641ecdbd8e5354dfa647269d
Merged-In: I2bc2008e49de5a66641ecdbd8e5354dfa647269d
(cherry picked from commit c9afa38f97)
2020-02-05 18:13:24 +00:00
Christopher Tate
a79b6ba5c5 DO NOT MERGE - Kill apps outright for API contract violations
...rather than relying on in-app code to perform the shutdown.

Backport of security fix.

Bug: 128649910
Bug: 140108616
Test: manual
Test: atest OsHostTests#testForegroundServiceBadNotification
Change-Id: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
Merged-In: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
2020-02-04 16:59:47 -08:00
Alexey Kuzmin
b1a33a8b4f Fix serialization issue of ExternalVibration
Remove excessive serialization of Audio Attributes
Bug: 140417434
Test: atest ExternalVibrationTest#testSerialization

Change-Id: Ib7ceaed875889126a53f874eec64fab4817e48d1
2020-01-30 11:30:04 -08:00
Yiwei Zhang
a3acf85a3b GraphicsEnv: refactor to unify the debuggable logic
By default, PR_SET_DUMPABLE is 0 for zygote spawned apps, except in the
following circumstances:
1. ro.debuggable=1 (global debuggable enabled, i.e., userdebug or eng builds).
2. android:debuggable="true" in the manifest for an individual application.
3. An app which explicitly calls prctl(PR_SET_DUMPABLE, 1).
4. GraphicsEnv calls prctl(PR_SET_DUMPABLE, 1) in the presence of
   <meta-data android:name="com.android.graphics.injectLayers.enable"
              android:value="true"/>
   in the application manifest.

So checking both ro.debuggable=1 and PR_GET_DUMPABLE is redundant.

Bug: b/144186877, b/148566223
Test: CtsAngleIntegrationHostTestCases
Test: CtsRootlessGpuDebugHostTest
Change-Id: Ica49254df2c7c090808411935cdeb8efd4e3cb51
Merged-In: Ica49254df2c7c090808411935cdeb8efd4e3cb51
(cherry picked from commit 097a3062b9)
2020-01-29 21:29:56 -08:00
Automerger Merge Worker
e29951e29e Fix potential double destroy of AssetManager am: 0a8a1e9d40 am: 303d3874f2
Change-Id: I3ddb9a9b1b67341b76ead480662356944d9146e6
2020-01-29 00:28:12 +00:00
Automerger Merge Worker
303d3874f2 Fix potential double destroy of AssetManager am: 0a8a1e9d40
Change-Id: I10010fa2087e7978dc88b1d1e6f6e5d3a4661499
2020-01-29 00:12:51 +00:00