Commit Graph

18820 Commits

Author SHA1 Message Date
Nikita Ioffe
89f7de19c3 Promote NO_ISOLATED_STORAGE app op to SystemApi(MODULE_LIBRARIES)
This app op was introduced to support --no-isolated-storage
instrumentation flag in MediaProvider mainline module. Because it was
very late in the release cycle, app op wasn't exposed as @SystemApi in
rvc-dev, even though there CTS tests written around it, and
MediaProvider module depends on it.

To make things fair, expose it as @SystemApi.

Test: atest CtsScopedStorageHostTest
Bug: 159708202
Change-Id: Ifddf2cb920285eda5f859972937b0f9084fc32a3
2020-07-17 14:59:34 +01:00
Songchun Fan
69131f8965 Merge "[resolver] only keep one preferred activity if selected with always=true" 2020-07-16 22:42:03 +00:00
Songchun Fan
201c064d3b [resolver] only keep one preferred activity if selected with always=true
With this change, if user selects a preferred activity with "Always"
checked, there will only be one mAlways=true intent filter
for a given action.

BUG: 161394369
Test: manual
Test: atest FrameworksServicesTests
Change-Id: I3d5ee0130f6f07530bb53f9c1509d5121a46a34a
2020-07-16 13:15:31 -07:00
Lee Shombert
b99a7abd16 Merge "Enhance PropertyInvalidatedCache debug" 2020-07-15 15:57:04 +00:00
TreeHugger Robot
9ed4468e71 Merge "Inroduce UNIFORM_OPS sampling." 2020-07-15 10:16:40 +00:00
Lee Shombert
e2fbc3b811 Enhance PropertyInvalidatedCache debug
Bug: 159039903

A set of small changes to the class to allow for addition debugging.
1. Distinguish a cache that is disabled because the nonce has not
   set from a cache that is disabled because it is corked.
2. Count the times the cache was bypassed because it was corked, unset,
   or disabled.  This does not count the times the cache was bypassed
   because it was locally disabled.  Add these counts to dumpsys.
3. Count the number of times a cache is invalidated, corked, and
   recorked (corked while already corked).  Add these counts to dumpsys.
4. Log some additional information if cache inconsistency is detected.
5. Record cache overflows and cache high-water marks.

Test: Run the following tests with and without the changes.  Verify that
the changes do not affect behavior.
 * CtsContactsProviderTestCases
 * FrameworksServicesTests
 * FrameworksServicesTests:UserManagerServiceCreateProfileTest
 * PlatformScenarioTests
 * PtsChreTestCases
 * FrameworksServicesTests:UserManagerServiceUserInfoTest
 * FrameworksServicesTests:UserManagerServiceIdRecyclingTest
 * CtsProviderTestCases
 * FrameworksServicesTests:UserSystemPackageInstallerTest
 * FrameworksServicesTests:PackageManagerSettingsTests
 * FrameworksServicesTests:UserLifecycleTests
 * CtsCalendarProviderTestCases
 * BluetoothInstrumentationTests
Pull a bug report and verify that the new counters are included.

Change-Id: I38d5545947d6f09c7e62e094c7b2858aab4a8cf9
2020-07-15 00:37:04 +00:00
Jing Ji
f67b5b5ff8 Use the processName from ProcessRecord instead of ApplicationInfo
... in the AppError

The processName could be different in case the crashing component
specifies a different one other than the global process name.

Bug: 161165487
Test: atest android.jobscheduler.cts
Test: Manual - induce a crash in a receiver w/ different proc name \
               verify the proc name is showing up in dumpsys
Change-Id: Ied1658091edbd16d75a61e15e3501a92b222ab42
2020-07-14 13:31:27 -07:00
Ruslan Tkhakokhov
77c7e4858a Merge changes from topic "fsd2d-1"
* changes:
  Add BackupManager API to start migration
  [FSD2D] Add migration-aware methods to AppBackupUtils
2020-07-11 10:13:23 +00:00
Philip P. Moltmann
d1a1e1d764 Merge "Allow client side permission check in AppOpsManager" 2020-07-10 18:07:53 +00:00
Ruslan Tkhakokhov
2f2e13c1b6 Add BackupManager API to start migration
Add an override of BackupManager#requestBackup where type of the
operation (a regular backup or a migration) can be specified.

Bug: 160407842
Test: atest UserBackupManagerServiceTest
Change-Id: Ia54fa26b040c3ec3612672585561794ff831afef
2020-07-10 18:25:01 +01:00
TreeHugger Robot
e25aa04eeb Merge "Do not schedule relaunch for local activities" 2020-07-10 05:16:01 +00:00
Jing Ji
7dd929dfdd Merge "Fix javadoc error in ApplicationExitInfo#getDefiningUid()" into rvc-dev am: 42ef19d57c am: 207e715943 am: b3342aba8b am: 4ac3593c9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12118644

Change-Id: Ie3b5b7a19f1e96fb9103650b8c5f6a1895eac6be
2020-07-09 18:30:38 +00:00
Jing Ji
4ac3593c9c Merge "Fix javadoc error in ApplicationExitInfo#getDefiningUid()" into rvc-dev am: 42ef19d57c am: 207e715943 am: b3342aba8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12118644

Change-Id: Ibeed9ee6a99f5bc0f928c0264df5980a34c83f6d
2020-07-09 18:19:04 +00:00
Jing Ji
207e715943 Merge "Fix javadoc error in ApplicationExitInfo#getDefiningUid()" into rvc-dev am: 42ef19d57c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12118644

Change-Id: I2a3a7609ca76fb24c5298589951b1cc3d4634c3d
2020-07-09 18:13:59 +00:00
Stanislav Zholnin
7af6359bbe Inroduce UNIFORM_OPS sampling.
Introduce strategy which uniformly samples OPs, without biasing in
favour of specific ops.
Use this strategy half of the time.

Test: atest RuntimeMessageCollectionTest && statsd_testdrive 10069
Bug: 143519689
Change-Id: I481d3a9ef9c66f04577b57432cecdf2c02055e58
2020-07-09 18:12:33 +00:00
Jing Ji
42ef19d57c Merge "Fix javadoc error in ApplicationExitInfo#getDefiningUid()" into rvc-dev 2020-07-09 18:11:00 +00:00
Philip P. Moltmann
6cb24816c3 Allow client side permission check in AppOpsManager
Fixes: 157548188
Test: None
Change-Id: Ib3535df346741a6ab23668ce937c00318917f805
2020-07-09 11:08:49 -07:00
Jing Ji
219da992ad Fix javadoc error in ApplicationExitInfo#getDefiningUid()
Bug: 160875447
Test: m -j offline-sdk-docs & manual verify the javadoc
Change-Id: Iae09584b42990092166be3c9a2bb792fa2d0abef
2020-07-09 09:33:10 -07:00
Riddle Hsu
65f41d56de Merge "Simplify handling activity config a bit" 2020-07-09 14:43:55 +00:00
Neil Fuller
6ec0d5dfed Merge "Renames / tidy ups" 2020-07-09 07:35:30 +00:00
Riddle Hsu
64413843b5 Simplify handling activity config a bit
- Remove parameter movedToDifferentDisplay because it can be
  retrieved by comparing current display id and new id. Then
  some logic can be shared.
- REPORT_TO_ACTIVITY was used to distinguish whether to report
  new configuration to the activity according it is process or
  activity level change. Since the conditions had been separated
  by different methods, its usages can be removed.

Bug: 160780522
Test: atest MultiDisplayActivityLaunchTests
Change-Id: I914963261ba339ba8c7bb5c50d7a8b25791db12e
2020-07-09 01:48:46 +00:00
Charles Chen
1e3eece9cf Merge "Fix NPE when invoking Context#isUiContext" into rvc-dev am: 5c25605da0 am: a91c84fa14 am: 6263253bae am: 9e19211dc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12105622

Change-Id: Iff671143234e00a2330638011c46be8f064dfad2
2020-07-08 18:33:46 +00:00
Charles Chen
9e19211dc0 Merge "Fix NPE when invoking Context#isUiContext" into rvc-dev am: 5c25605da0 am: a91c84fa14 am: 6263253bae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12105622

Change-Id: Ibd9f56546ba9001c2d6f7786f3205227f5393a53
2020-07-08 18:21:51 +00:00
Charles Chen
6263253bae Merge "Fix NPE when invoking Context#isUiContext" into rvc-dev am: 5c25605da0 am: a91c84fa14
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12105622

Change-Id: I394f915b6577d1972b22e61d11af430a220aad06
2020-07-08 18:09:30 +00:00
Charles Chen
8d53c79a02 Merge "Fix NPE when invoking Context#isUiContext" into rvc-dev am: 5c25605da0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12105622

Change-Id: Ic5670956e2cec2fd6e63a9d0e6c4fa86f2ec991e
2020-07-08 17:59:55 +00:00
Charles Chen
3b8e8d7631 Fix NPE when invoking Context#isUiContext
Add null checks in both ContextWrapper and before obtaining
ContextImpl#getOuterContext.

Test: atest ContextTest#testIsUiContext_ContextWrapper
fixes: 160037462
Change-Id: Ic6a71dd9ac4b195d219d6e5431f2f2b199a400fa
2020-07-08 23:58:58 +08:00
Darryl Johnson
ed1f9947f5 Merge "Ensure split-screen support isn't reported on devices with small displays." 2020-07-08 15:21:43 +00:00
Ruslan Tkhakokhov
2e5a1c222f [FSD2D] Add migration-aware methods to AppBackupUtils
This CL will be part of a series to implement backup / restore of all
app data during a device-to-device migration. Detailed overview of the changes at go/br-fsd2d-design-doc-app-data.

Bug: 160407842
Test: atest AppBackupUtilsTest
Change-Id: I35ce627f1d372437d8ba8495029c6df15db31552
2020-07-08 14:56:12 +01:00
Louis Chang
c9aa51b173 Do not schedule relaunch for local activities
IllegalArgumentException was thrown when reporting size config
for local activities while relaunch.

Bug: 120008604
Test: start ActivtiyGroup activities and update display cutout

Change-Id: If376012cd0741bc7436dc45aeb2f0216aee32a02
2020-07-08 12:30:22 +08:00
Jin Seok Park
913f61f009 Merge changes I9b6da97e,I1ab89d12
* changes:
  Remove using hidden API: MediaSessionManager(Context)
  Remove using ServiceManager API in MediaSessionManager
2020-07-08 02:52:58 +00:00
TreeHugger Robot
9d28be4326 Merge "Do not hide the bell icon." into rvc-qpr-dev am: 0581ca685b am: a372bf7835
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12091686

Change-Id: I2773ed04f3822d6a5f3e1774220c6dbc68b70e6c
2020-07-08 00:01:38 +00:00
TreeHugger Robot
a372bf7835 Merge "Do not hide the bell icon." into rvc-qpr-dev am: 0581ca685b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12091686

Change-Id: I18c5693b134e661a4c6538ba9502274152ca8e70
2020-07-07 23:50:05 +00:00
Jeff DeCew
43a6de043e Do not hide the bell icon.
Bug: 156887617
Test: Update a notification between 10-30 seconds after the last update, watch bell icon stay visible.
Change-Id: Ib737fd78ac5afa26ee0e456ffbee6c6dc0a5c835
2020-07-06 21:31:37 -04:00
Darryl L Johnson
138c24fb13 Ensure split-screen support isn't reported on devices with small displays.
Several partners with devices that have small displays have run into
issues w/ CTS-on-GSI testing as these builds hardcode support for
split-screen. This prevents split-screen from being reported as
supported if the display isn't compatible according to the CDD.

Bug: 158310372
Test: android.server.wm.SplitScreenTests#testMinimumDeviceSize()

Change-Id: I0dfd6caca5116dccc115d64b755998171abe831f
2020-07-06 09:41:50 -07:00
Jin Seok Park
431f3af83b Remove using hidden API: MediaSessionManager(Context)
Replace with SystemServiceRegistry.registerContextAwareService,
which is a @SystemApi. See ag/9734296 for reference.

Bug: 160380016
Test: atest
    CtsMediaTestCases:android.media.cts.MediaSessionManagerTest
Change-Id: I9b6da97e0e0f5181ce8681a399ca090e67f6fd4e
2020-07-06 15:33:47 +09:00
Jin Seok Park
8f79003bec Remove using ServiceManager API in MediaSessionManager
MediaSessionManager calls ServiceManager#getService(string) to get
ISessionManager, but it is a hidden API that will not be made into
@SystemApi (ag/6329675).

Instead, create a wrapper class that can only retrieve specified
media service binders. (ag/10123575 for reference)

Bug: 159955826
Test: atest
    CtsMediaTestCases:android.media.cts.MediaSessionManagerTest
Change-Id: I1ab89d1217e8e3d071b38da772ee96889e9859b1
2020-07-05 16:09:14 +09:00
TreeHugger Robot
a97aa2f6dc Merge "Fix Bundle#getParcelableArray call" into rvc-dev am: d70c7dda50 am: 72217807c6 am: 63178d96bd am: 5fa1f6a30e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12034230

Change-Id: I6ec64bec0571c432cc521e4f0d630cfac314a899
2020-07-03 03:34:51 +00:00
TreeHugger Robot
63178d96bd Merge "Fix Bundle#getParcelableArray call" into rvc-dev am: d70c7dda50 am: 72217807c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12034230

Change-Id: I771521370a581188f14bff35c7b04ba4b4c6c636
2020-07-03 03:03:22 +00:00
TreeHugger Robot
e7322068cc Merge "Fix Bundle#getParcelableArray call" into rvc-dev am: d70c7dda50
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12034230

Change-Id: I18687d77b5383d35b5cd079345be1cbac64dd532
2020-07-03 02:40:20 +00:00
TreeHugger Robot
d70c7dda50 Merge "Fix Bundle#getParcelableArray call" into rvc-dev 2020-07-03 02:22:57 +00:00
Charles Chen
82a951abc3 Merge "Revert "Revert "Enable IMS and its config context to obtain UI component""" into rvc-dev am: 8deb612a14 am: f9ccadb06d am: 2712b5e401 am: 718528f4bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004931

Change-Id: I669e79f51cd8a2390c53308b30cbe1d94a3b39c5
2020-07-02 00:28:39 +00:00
Charles Chen
f9ccadb06d Merge "Revert "Revert "Enable IMS and its config context to obtain UI component""" into rvc-dev am: 8deb612a14
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004931

Change-Id: Ied208126c1c21f736f07d4d7f24cb14c3a83c280
2020-07-01 23:42:26 +00:00
Charles Chen
8deb612a14 Merge "Revert "Revert "Enable IMS and its config context to obtain UI component""" into rvc-dev 2020-07-01 23:21:51 +00:00
Neil Fuller
3e93c016dd Renames / tidy ups
Various non-functional tidy ups:
1) Rename StubbedTimeZoneDetectorStrategy to
FakeTimeZoneDetectorStrategy since it contains some fake behavior.
2) Switch to the android.util.IndentingPrintWriter everywhere.
3) Clarify / rename constants in tests to better document their meaning.
4) Rename Dumpable.Dumpee to Dumpable.Container because Dumpee is a bad
/ misleading name.

Test: Treehugger / atest of touched test files
Bug: 149014708
Bug: 159888952
Change-Id: Ied3d5b8030ccaab6af2f5d47ef643820efa71c1d
2020-07-01 17:17:09 +01:00
Aurimas Liutikas
45b1a58bce Merge "Clean up old references to android.support in Activity and Fragment" into rvc-dev-plus-aosp am: 47029fe43d am: 87e64b5698 am: 19bb58eb47
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12039663

Change-Id: I0e69615ea0540bbcc8d859493f1b1ea21b409e90
2020-06-30 21:53:26 +00:00
Aurimas Liutikas
47029fe43d Merge "Clean up old references to android.support in Activity and Fragment" into rvc-dev-plus-aosp 2020-06-30 21:16:33 +00:00
vichang
26ed852eaf Merge "Use new package name for ZoneInfo and libcore.timezone" am: af6f8e2301 am: 64937407f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1346485

Change-Id: I5ded5092e4c7706f58417a5c97f3207524b44a95
2020-06-30 17:23:46 +00:00
Victor Chang
2ea241f6ee Use new package name for ZoneInfo and libcore.timezone
Bug: 141747409
Test: None
Merged-In: Id99a345ec024179295063c3644f72c062cb50554
Change-Id: Id99a345ec024179295063c3644f72c062cb50554
2020-06-30 13:53:47 +01:00
Tadashi G. Takaoka
c4a13e9b0b Fix Bundle#getParcelableArray call
Because Bundle.getParcelableArray() returns Parcelable[] object,
simply casting a return value to a typed array will cause
ClassCastException.

Bug: 158584842
Bug: 160120833
Test: manually install ArcNotificationTest2 and try inline reply
Change-Id: Idd8eaa412925ac826590d44a0db297aacef806d8
2020-06-30 14:18:49 +09:00
Aurimas Liutikas
5d681da22c Clean up old references to android.support in Activity and Fragment
Bug: 158760874
Change-Id: Ia3c0aa2393e6d444af04e35446ac34d4e129c9aa
2020-06-30 04:08:12 +00:00