Commit Graph

19090 Commits

Author SHA1 Message Date
Beverly Tai
7014861ff7 Merge "Add getLastInteraction API to PeopleManager" 2020-09-28 18:16:30 +00:00
Beverly
feb12590d3 Add getLastInteraction API to PeopleManager
Retrieves the last interaction for a given conversation (provided
package, userId and shortcutId).

Test: atest DataManagerTest
Bug: 169412531
Change-Id: Ie6f6d87e9ade78b99a18deb2959d0c699579c5f2
2020-09-28 10:19:46 -04:00
Hall Liu
4998ea41b8 Merge "Expose RoleManager#getDefaultSmsPackage" 2020-09-25 21:37:39 +00:00
Philip P. Moltmann
d9141a9c6d Merge "Reduce the overhead of historical appops" 2020-09-25 18:13:11 +00:00
Julia Reynolds
ce302adbc6 Merge "Bulk process shortcut removals" 2020-09-25 14:19:52 +00:00
Hall Liu
eb0af2008f Expose RoleManager#getDefaultSmsPackage
Expose this method for module libraries. It's needed to support a public
method in TelephonyProvider that doesn't require any permissions.

Test: atest RoleManagerTest#smsRoleHolderAvailableWithoutObserveRoleHolders
Fixes: 169350676
Change-Id: Ia2725dc5aa0de74b2cf67ecd0666917ae27adda9
2020-09-24 13:56:54 -07:00
Hall Liu
155cb54ec8 Merge "Rename StatusBarManager#setDisabledForSimNetworkLock" 2020-09-24 20:52:29 +00:00
Kweku Adams
f502b885b9 Merge "Revert "Allow package verifier to hide specific fgs notifications."" 2020-09-24 17:19:09 +00:00
Eugene Susla
c50a911daa Merge "Run shell commands reliably" 2020-09-24 16:46:12 +00:00
Riddle Hsu
340ce85572 Merge "Make process level rotated config and display metrics consistent" 2020-09-24 15:42:39 +00:00
Greg Kaiser
26702432de Merge "Revert "Define FLAG_MUTABLE and add a compat change for explicit..."" 2020-09-24 03:26:06 +00:00
Greg Kaiser
c55f2961ba Revert "Define FLAG_MUTABLE and add a compat change for explicit..."
Revert "Add a check for FLAG_MUTABLE and FLAG_IMMUTABLE being se..."

Revert submission 12627798-define-flag-mutable

Reason for revert: Makes wembley device unusable by killing UI, also kills Bluetooth repeatedly

Bug: 169241864, 169239341
Test: Locally reverted and wembley now has UI and no Bluetooth crashing messages
Reverted Changes:
I2ffbc6859:Add a check for FLAG_MUTABLE and FLAG_IMMUTABLE be...
I1f1f72c6c:Define FLAG_MUTABLE and add a compat change for ex...

Change-Id: I0b1f0eadce97a1f7bbd17768f5ee491b3871b10f
2020-09-24 00:52:45 +00:00
Eugene Susla
8fa2bdb099 Run shell commands reliably
Tests sometimes fail due to a shell command failing, bet we don't get the
appropriate result from the command run itself, which leads to confusing
states and challenging troubleshooting.
E.g. jobscheduler reports its failure only via stderr.

This introduces a utility that fails with the relevant command output,
should something be printed to stderr.

Test: atest AutoRevokeTest
Bug: 168843991
Change-Id: I5e354c1b88ca3ceeeda2d5500b62c421174fd57c
2020-09-23 17:02:55 -07:00
Kweku Adams
292f997f7d Revert "Allow package verifier to hide specific fgs notifications."
This reverts commit e49aa726f0.

Reason for revert: We've decided not to have this in the QPR.

Bug: 164440539
Change-Id: I72ca946f1a5be937b3f3bed746e4251fa9257891
2020-09-23 21:40:24 +00:00
Julia Reynolds
2b38187538 Bulk process shortcut removals
This will reduce file writes for notification history

Test: atest
Bug: 169100698
Change-Id: If6488808087ad06023a994d51e00fb739ef11bd1
2020-09-23 17:01:07 -04:00
Ashwini Oruganti
73faccb867 Merge "Define FLAG_MUTABLE and add a compat change for explicit definition of PendingIntent mutability flags" 2020-09-23 01:07:11 +00:00
Hall Liu
409c9893b4 Rename StatusBarManager#setDisabledForSimNetworkLock
Rename method to setExpansionDisabledForSimNetworkLock

Fix: 169152870
Test: atest StatusBarManagerTest
Change-Id: I7a555e6c501a0a5e98127a49bfbfe2c742806160
2020-09-22 16:39:19 -07:00
Ashwini Oruganti
571ed8dc58 Define FLAG_MUTABLE and add a compat change for explicit definition of PendingIntent mutability flags
For future releases, we will require that either FLAG_IMMUTABLE or
FLAG_MUTABLE is defined when a PendingIntent is created.

The check only results in a log.wtf for now while we notify, identify,
and update major PendingIntents. We will add a stricter
IllegalArgumentException soon.

- Define FLAG_MUTABLE
- Add a check and log.wtf that either FLAG_IMMUTABLE or FLAG_MUTABLE is
  specified on creation for future releases
- Update api/current.txt and non-updatable-api/current.txt to include
  FLAG_MUTABLE

Test: atest PendingIntentTest
Bug: 160794467
Change-Id: I1f1f72c6ce22358e98e9f38be2fb98b27e60898c
2020-09-22 14:59:31 -07:00
Philip P. Moltmann
fcd259d22c Reduce the overhead of historical appops
- Use cheaper round method

Fixes: 164465976
Test: TH
Change-Id: I2c661b94ee4a87f96620bde25b2dfae297dc1f5e
2020-09-22 14:32:23 -07:00
Philip P. Moltmann
faeec12c7d Merge changes from topic "revert-12439864-PermAppOpsCrossUserCheck-Fixed-DGFFMARPXU"
* changes:
  Revert "Give all non-package services the power to interact accr..."
  Revert "Check cross-user interactions for permissions and app-op..."
  Revert "Invalidate package/permission cache if cross-profile app..."
2020-09-22 15:20:22 +00:00
Louis Chang
6de0c0a56d Merge "Remove ATM#positionTaskInStack API" 2020-09-22 00:51:53 +00:00
Philip P. Moltmann
bbeed895f5 Revert "Check cross-user interactions for permissions and app-op..."
Revert "Add dedicated host side tests for permissions and appops"

Revert submission 12439864-PermAppOpsCrossUserCheck-Fixed

Reason for revert: Bug 169044600
Reverted Changes:
I95d015e01:Invalidate package/permission cache if cross-profi...
I2a8a84f57:Check cross-user interactions for permissions and ...
Ie8f0db231:Give all non-package services the power to interac...
I11af434a8:Test package/permission cache invalidation when IN...
Ib6d609a4d:Add dedicated host side tests for permissions and ...

Change-Id: Iea5eeded0ee5caf5383bb0e749133d4fef18d392
2020-09-21 22:26:18 +00:00
Charles Chen
a73d039aee Merge "Make a context dervied from an UI context as an UI context" 2020-09-21 10:43:30 +00:00
Riddle Hsu
d5c5a1b421 Make process level rotated config and display metrics consistent
The application may get Resources instance from Resources.getSystem()
and context.getApplicationContext().getResources(). Since fixed
rotation is introduced that allows an activity to start in a different
rotation than the current display, when using getConfiguration() and
getDisplayMetrics() of these Resources instances, the orientation
and metrics need to be the same as current display is rotated.
Otherwise the app may show unexpected UI layout.

Although it is not recommended to use global resources/config for
activity. One of the goal of fixed rotation transform is to simulate
the app is started in a rotated environment, so this CL makes the
configuration and display metrics of system resources are consistent
with application and activity for compatibility.

About WindowProcessController and ActivityStackSupervisor:
 The process configuration passed to LaunchActivityItem may be
 associated from activity. if the sequence number of configuration
 is overridden by activity, the configuration may be ignored when
 launching the activity because the sequence number isn't larger
 than the previous process configuration. Although there will be a
 ConfigurationChangeItem later to update correct state, the app may
 get the intermediate state with old configuration and metrics.

About ResourcesManager and DisplayAdjustments:
 There are 2 new fields appWidth and appHeight added to
 DisplayAdjustments#FixedRotationAdjustments because the display
 metrics from Resources.getSystem() is independent from activity
 configuration. Only window manager knows the rotated size, so
 the values need to send to client and then ResourcesManager takes
 the adjustment to change the global display metrics.

About WindowToken:
 When fixed rotation is applied on the token, send the
 FixedRotationAdjustmentsItem first so the later configuration
 change can pick the adjustment at ActivityThread. And because the
 registration of activity configuration only occurs on add/remove
 activity, if it is only switching to another existing activity in
 different orientation, the process configuration still needs to
 be updated.

About ActivityThread:
 The code flow for a rotated activity (DA = display adjustments):
 - Launch new activity
    handleLaunchActivity: override app DA
     handleConfigurationChanged: adjust global display metrics by DA
     performLaunchActivity
      createBaseContextForActivity: override activity DA
 - Resume existing activity
    handleFixedRotationAdjustments: override app and activity DA
    handleConfigurationChanged: adjust global display metrics by DA
    handleResumeActivity

Also some minor corrections:
- Set missing rotated max bounds.
- Fix wrong display metrics adjustment that xdpi and ydpi should
  not be swapped because they are physical attributes.

Bug: 167564038
Test: atest DisplayAdjustmentsTests
      AppConfigurationTests#testRotatedInfoWithFixedRotationTransform
      WindowProcessControllerTests#testProcessLevelConfiguration
      DisplayContenTests#testApplyTopFixedRotationTransform

Change-Id: I60bedc7e09f54683d5e857ccc51402d5d144cd9e
2020-09-21 06:54:00 +00:00
Chilun Huang
3dda8e66d3 Merge "Revert "Revert "Introduce ActivityTransactionItem and reduce null checks""" 2020-09-21 05:09:48 +00:00
Philip P. Moltmann
fa24a327ab Merge changes from topic "PermAppOpsCrossUserCheck-Fixed"
* changes:
  Invalidate package/permission cache if cross-profile app is is changed
  Check cross-user interactions for permissions and app-ops operations
  Give all non-package services the power to interact accross users
2020-09-20 03:22:25 +00:00
Hall Liu
780b2f753e Merge "Expose StatusBarManager#setDisabledForSimNetworkLock" 2020-09-18 19:12:58 +00:00
Winson Chiu
189a385fd7 Merge "Add getTargetSdkVersion without AppInfo" 2020-09-18 18:18:28 +00:00
Joanne Chung
64c78cba88 Merge "Update TEST_MAPPING file under Activity path." 2020-09-18 14:44:40 +00:00
Chilun Huang
d5af95b56f Revert "Revert "Introduce ActivityTransactionItem and reduce null checks""
This reverts commit fd2be2c178.

Reason for revert: Reland the CL

This class is used for activity-targeting item to inherit,
which encapsulate null checks of activity client record.
This patch also change signature of ClientTransactionHandler#handle*
and reduces null checks.

In addition, add some null pointer checks after getActivityClient().
Also fix a typo in performStopActivityInner() and
performDestroyActivity().

Bug: 127877792
Bug: 164982975
Test: atest frameworks/base/core/tests/coretests/src/android/app/servertransaction
Test: atest ActivityThreadTest ActivityThreadClientTest
Test: atest TransactionExecutorTests#testActivityItemNullRecordThrowsException
Test: atest TransactionExecutorTests#testActivityItemExecute
Test: atest CtsAppTestCases:LocalActivityManagerTest
Change-Id: Ida612f1c8af7ecd7a04e69ade461403b8711508a
2020-09-18 14:36:10 +08:00
Winson
050de3f78b Add getTargetSdkVersion without AppInfo
For quickly checking an app's targetSdkVersion without building and
returning an entire ApplicationInfo object.

Bug: 164459559

Test: atest android.content.pm.cts.PackageManagerTest#testGetInfo

Change-Id: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
2020-09-17 10:37:11 -07:00
Louis Chang
82ddec5645 Remove ATM#positionTaskInStack API
since this API is no longer needed.

Bug: 157876448
Test: existing tests
Change-Id: Ib89fcbddf65bcf2aee4676be66b3f27c9d9f5f78
2020-09-16 17:37:17 +08:00
Charles Chen
202a82802c Merge "Use Builder for ActivityView" 2020-09-16 08:38:13 +00:00
Charles Chen
87f67a9fe9 Use Builder for ActivityView
fixes: 162901735
Test: touched tests
Change-Id: I230d65d76b1bc8dfbae304b33579e7eb96d0593d
2020-09-16 10:44:07 +08:00
Hall Liu
3dbee7e17c Expose StatusBarManager#setDisabledForSimNetworkLock
Expose method for use by Telephony when it moves over to a mainline
module.

Fixes: 168647030
Test: atest android.app.cts.StatusBarManagerTest
Change-Id: I88807ff0e46acce67f683b71ea8621719e6fe6ac
2020-09-15 15:27:46 -07:00
Jorge Gil
eac9364f7a Merge "Rename autoEnterAllowed to autoEnterEnabled" 2020-09-15 22:12:26 +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
Philip Junker
c14b6b52ff Merge "Support for notification panel key on ATV" 2020-09-15 07:19:05 +00: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
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
Treehugger Robot
bc93881957 Merge "Replace 'whitelist' with 'allowlist'" am: 8ac6819c0e am: 3563eeb4ae am: 1d3e694b97 am: e022945d69
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427048

Change-Id: I5725049a13c30e122e1f8b5e4e772b7431a4e32d
2020-09-14 22:44:28 +00:00
Jeff Sharkey
c0b288133a Merge changes from topic "sep11"
* changes:
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
2020-09-14 21:52:13 +00:00
Treehugger Robot
1d3e694b97 Merge "Replace 'whitelist' with 'allowlist'" am: 8ac6819c0e am: 3563eeb4ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427048

Change-Id: I70eb21c1ea9411974a1c07f6aaaf611760110c34
2020-09-14 21:27:14 +00:00
Julia Reynolds
71c18d2afc Replace 'whitelist' with 'allowlist'
Change-Id: If7422064e59e6c055c9dae092ead298b81cf41e8
Test: atest
Bug: 161889253
Merged-In: I94a43c1c995052b034d8a5377786e1a15e4c9c59
2020-09-14 18:29:23 +00:00
jorgegil@google.com
318397b034 Rename autoEnterAllowed to autoEnterEnabled
Bug: 167621602
Test: atest PinnedStackTests#testAutoPipAllowedBypassesExplicitEnterPip

Change-Id: I6e92c138c49b55f8641950bc9c45dd4631d62ee8
2020-09-14 09:45:44 -07:00
Alex Buynytskyy
d15391e426 Rollforward: Digest API: allow installer to provide digests for an APK.
5d9710d5b72136b2face76b578ac120ad6ed931e

Bug: 160605420
Fixes: 168445565
Test: atest ChecksumsTest
Test: atest ApkVerityTest:com.android.apkverity.ApkVerityTest

Change-Id: Ib559ad9107996290f4ae4661ccec4dc14658a7e9
2020-09-14 16:23:40 +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