Commit Graph

6765 Commits

Author SHA1 Message Date
Glenn Kasten
d1b71e8331 Merge "Resolve conflict between javadoc and CDD re: audio output" into pi-dev am: a5d8c3718d
am: a64203d608

Change-Id: I3ee35bba2cf8e38a2667145ec818dd573da003a2
2018-05-29 12:37:37 -07:00
Glenn Kasten
a64203d608 Merge "Resolve conflict between javadoc and CDD re: audio output" into pi-dev
am: a5d8c3718d

Change-Id: I7cd068ce53874be19ed4a81e32b87731b0d13c35
2018-05-29 12:21:18 -07:00
Glenn Kasten
a5d8c3718d Merge "Resolve conflict between javadoc and CDD re: audio output" into pi-dev 2018-05-29 19:09:31 +00:00
Wale Ogunwale
56034a4f59 Merge "Added TestApi to ActivityInfo.isTranslucentOrFloating" into pi-dev am: 9d19487b1c
am: 9f6c8feb6f

Change-Id: Ia6008e05fe7a7b369be2d9a84bcedc94d74c5334
2018-05-25 19:57:10 -07:00
Wale Ogunwale
9f6c8feb6f Merge "Added TestApi to ActivityInfo.isTranslucentOrFloating" into pi-dev
am: 9d19487b1c

Change-Id: Ie430137f84f8b6a8d702e4ea5070ded4711da4a8
2018-05-25 19:43:48 -07:00
TreeHugger Robot
9d19487b1c Merge "Added TestApi to ActivityInfo.isTranslucentOrFloating" into pi-dev 2018-05-26 02:23:25 +00:00
Wale Ogunwale
30eab1f430 Added TestApi to ActivityInfo.isTranslucentOrFloating
This would be use to determine the right activity state during CTS
test for products that have windowSwipeToDismiss set.

Also, dump ActivityRecord.fullscreen to proto for the same reason.

Bug: 76207986
Bug: 79167358
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerAssistantStackTests
Change-Id: Iadc088e9129be088b8a083ebbafd8d20fe26b673
2018-05-25 10:24:14 -07:00
Makoto Onuki
da4db58021 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev am: 621fd20f55
am: d8cf91c5f8

Change-Id: Icac177c8d404ce20d5e894d85df2b72a001d6d9a
2018-05-24 22:14:27 -07:00
Makoto Onuki
d8cf91c5f8 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev
am: 621fd20f55

Change-Id: I31ae3e9e11b9defb7e6352830439484d7ec7ac01
2018-05-24 17:54:37 -07:00
sanryhuang
8842f6fe1c Merge "Merge "Hide system apps until installed (1/2)" into pi-dev am: 56cc567dfd" into pi-dev-plus-aosp
am: 984436e530

Change-Id: I24ddd296f8d72fa69c557935156ee6380955f33b
2018-05-24 17:53:48 -07:00
Makoto Onuki
621fd20f55 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev 2018-05-24 23:22:09 +00:00
sanryhuang
6a2a4a01f8 Merge "Hide system apps until installed (1/2)" into pi-dev
am: 56cc567dfd

Change-Id: I5256f98f1face09fbd95146d8a36335b37b3091f
2018-05-24 13:49:35 -07:00
sanryhuang
40ede29ed6 Hide system apps until installed (1/2)
Applying this mechanism for system carrier apps to make visibility
reasonable from the user's perspective. In other words, before
hidden system apps have been installed, they wouldn't be listed
via APIs in PackageManager which are used at all apps list and
search in Settings and so on.

Test: manual
Test: atest CarrierAppUtilsTest
Test: atest PackageManagerTest
Bug: 74068582
Change-Id: Id3ff138ad529b909d9bbf6719af3a553b909ccbb
2018-05-23 16:29:31 -07:00
Makoto Onuki
d5f25d2cd8 Tweak exemption for sync requests made by FG apps
Exemption given to a sync request made by a foreground app (including
PROCESS_STATE_IMPORTANT_FOREGROUND).
At the schedule time, we promote the sync adapter app for a higher bucket:
- If the device is not dozing (so the sync will start right away)
  promote to ACTIVE for 1 hour.
- If the device is dozing (so the sync *won't* start right away),
promote to WORKING_SET for 4 hours, so it'll get a higher chance to be started once the
device comes out of doze.
- When the sync actually starts, we promote the sync adapter app to ACTIVE for 10 minutes,
so it can schedule and start more syncs without getting throttled, even when the first
operation was canceled and now we're retrying.

Test: atest cts/tests/tests/syncmanager/
Test: Manual test with "requestsync -f" and "am set-standby-bucket", while checking
"dumpsys usagestats"
Test: settings put global app_idle_constants \
  exempted_sync_scheduled_nd_duration=1,exempted_sync_scheduled_d_duration=2,exempted_sync_start_duration=3
  and check "dumpsys usagestats" and make sure the constants are properly updated.
Fixes: 72443754

Change-Id: I233d8e4be85769150830bac798abc04810f4cc7b
2018-05-23 14:50:05 -07:00
Suprabh Shukla
1037336ffd Merge "Remove MANAGE_USERS from setPackagesSuspended" into pi-dev am: d0897f2b65
am: 485cdce1ca

Change-Id: I6f60f14a705e354fab5f08382a146be7f9dd9f2d
2018-05-21 13:20:37 -07:00
Suprabh Shukla
485cdce1ca Merge "Remove MANAGE_USERS from setPackagesSuspended" into pi-dev
am: d0897f2b65

Change-Id: Ia624b12b32d06b7e341f7023231000ffb1fb530b
2018-05-21 13:11:40 -07:00
TreeHugger Robot
d0897f2b65 Merge "Remove MANAGE_USERS from setPackagesSuspended" into pi-dev 2018-05-21 20:01:36 +00:00
Glenn Kasten
0a111ad6d0 Resolve conflict between javadoc and CDD re: audio output
As CDD text is likely to change in this area, rather than attempt to
keep them in sync we'll just defer to CDD for the official definition.

Test: N/A
Bug: 79440478
Change-Id: Ibd352af626f192eac9a4dfa2fafe675a3955270e
2018-05-17 08:57:48 -07:00
Suprabh Shukla
14405c9ac3 Remove MANAGE_USERS from setPackagesSuspended
MANAGE_USERS is a widely used permission and setPackagesSuspended is a
dangerous API. Also having a lot of apps which can use the api can lead
to complications like them suspending each other.

Test: Existing tests with SUSPEND_APPS pass:
atest com.android.server.pm.SuspendPackagesTest

Existing permission tests without SUSPEND_APPS pass:
atest GtsSuspendAppsPermissionTestCases

Bug: 79773970
Change-Id: I49d81c0254c6ba528c50ece960a0db277c0afd7f
2018-05-16 20:41:02 -07:00
lpeter
d62e8f174f Merge "[IdleController] Support dock scenario on idle or active judgement" into pi-dev am: 86b2581c16
am: 2fdc1b8b13

Change-Id: I0d6e38e4cc8a7f24874956a1382f476c8021e838
2018-05-16 20:27:18 -07:00
lpeter
2fdc1b8b13 Merge "[IdleController] Support dock scenario on idle or active judgement" into pi-dev
am: 86b2581c16

Change-Id: I11655b619b9ac5bce4819d20f550eb75769d5630
2018-05-16 20:16:38 -07:00
lpeter
318abc9324 [IdleController] Support dock scenario on idle or active judgement
In the current design, IdleController of Job service considers devices as ‘idle’ after 71 minutes of screen off. But under docking use scenario, devices screen might remain on for a very long time and it’s not necessary implying the device being interactive with users.
So create a mechanism for device to enter the ‘idle’ state that JobScheduler can kick off idle tasks.

Bug: 79183658
Test: atest DeviceStatesTest
Change-Id: I5b307ca51e28ffca63f79a9c43984c3b76e51629
2018-05-17 02:23:02 +00:00
Pete Gillin
24e959cc6b Merge "Merge "Stop using Arrays.checkOffsetAndCount. am: 60f55a255f" into stage-aosp-master am: 72629d9999" into pi-dev-plus-aosp
am: cb45faa86e

Change-Id: Ibabe1fec3050f26e0a3182077180009ccd3271ad
2018-05-16 08:44:56 -07:00
Pete Gillin
306481a63b Merge "Stop using Arrays.checkOffsetAndCount. am: 60f55a255f" into stage-aosp-master
am: 72629d9999

Change-Id: Ia8f5ce41c654cb6522c6ea5f2863d97f282ce268
2018-05-16 08:27:27 -07:00
Pete Gillin
a9d6a27a2e Stop using Arrays.checkOffsetAndCount.
am: 60f55a255f

Change-Id: Ic9f894d8fe813d0bb6e3776790ff113d2826d881
2018-05-16 07:11:54 -07:00
TreeHugger Robot
70650a5747 Merge "Add annotation for CHANGE_COMPONENT_ENABLED_STATE permission" 2018-05-11 22:40:43 +00:00
Chad Brubaker
3875ce09fa Add annotation for CHANGE_COMPONENT_ENABLED_STATE permission
Test: builds
Bug: 79583362
Change-Id: Id7259d22b24ffdd0506ede28cce7307bdc44bd9b
2018-05-11 13:42:38 -07:00
Todd Kennedy
f6f2f50745 Merge changes from topic "b_78809704" into pi-dev am: 92b64bb1bb
am: f08b40642a

Change-Id: I2e71d83df38b87e2379b6d0bbc2a09cfe6bed4bc
2018-05-11 11:59:39 -07:00
Mrten Kongstad
44a1a24da1 OMS: rebase settings when overlays update am: 2f1944bf0e
am: 0ddacd34de

Change-Id: I7efbcefacbb1d8c7811587889382386fe1513cc8
2018-05-11 11:55:48 -07:00
Mrten Kongstad
0ddacd34de OMS: rebase settings when overlays update
am: 2f1944bf0e

Change-Id: I1691fa4251182adf9484cafb12484aa8003cbf3c
2018-05-11 11:09:25 -07:00
Todd Kennedy
92b64bb1bb Merge changes from topic "b_78809704" into pi-dev
* changes:
  OMS: teach the OMS about static RROs
  OMS: rebase settings when overlays update
2018-05-11 17:44:53 +00:00
Christopher Tate
331cf5af98 Merge "Document system activity intents that may not be implemented" into pi-dev am: f9dbd76be3
am: b11cfdbb68

Change-Id: Ibbf7e19e942dd63774fd43f10e66d5c87e2aa8aa
2018-05-10 20:15:41 -07:00
Christopher Tate
72da1e6f78 Document system activity intents that may not be implemented
All of these activity-start intents might be unimplemented on some
Android products.  Document this to make sure that developers are
aware of the need to safeguard against this.

Bug: 68300743
Bug: 62201251
Bug: 69587018
Fixes: 77282739
Test: atest CtsContentTestCases:.AvailableIntentsTest
Change-Id: Ia2346d03ccb7f2bdad2b84ba9efff72413fdc3c2
2018-05-10 17:55:26 -07:00
Patrick Baumann
adc9fb5651 Merge "Expands javadocs for Intent.FLAG_ACTIVITY_MATCH_EXTERNAL" into pi-dev am: a1e56fb23b
am: 896935a5f8

Change-Id: I718e45fb57d900d8ff191f266575f7406cf30e92
2018-05-10 15:10:49 -07:00
Jordan Liu
8d2e3abb40 Add documentation for what to use for SS changes
Since the broadcast is deprecated in favor of the ServiceStateProvider,
the documentation should reflect this.

Note that the LteEarfcnRsrpBoost has not been migrated into the provider
so this also needs to happen.

Bug: 33756364
Fixes: 78188866
Test: no behavior change, ran make
Change-Id: Ia15a7408bdc79927438fa243cce77b262bbb66c4
Merged-In: Ia15a7408bdc79927438fa243cce77b262bbb66c4
2018-05-10 14:28:47 -07:00
TreeHugger Robot
a1e56fb23b Merge "Expands javadocs for Intent.FLAG_ACTIVITY_MATCH_EXTERNAL" into pi-dev 2018-05-10 18:23:07 +00:00
Pete Gillin
60f55a255f Stop using Arrays.checkOffsetAndCount.
Start using ArrayUtils.throwsIfOutOfBounds instead. The Arrays method
is going to be removed.

Bug: 78447530
Test: cts-tradefed run cts-dev -m CtsOsTestCases (shows only unrelated failures: two user/userdebug mismatches and one from b/79471510)
Test: cts-tradefed run cts-dev -m CtsDrmTestCases
Test: adb shell am instrument -w -e class android.content.pm.LimitedLengthInputStreamTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w -e class android.os.FileBridgeTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ib3cd4f4ead61dbec1ccdc94b2ad4ad9c28574582
2018-05-10 18:17:50 +01:00
Patrick Baumann
92ae2c6665 Expands javadocs for Intent.FLAG_ACTIVITY_MATCH_EXTERNAL
This change adds much needed detail to the new MATCH_EXTERNAL flag,
explaining some of the behavior changes that come with using it.

Test: none
Bug: 63117034
Bug: 79325769
Change-Id: Iab320d2171ffe8d8012a2928656ea61d5e0f0862
2018-05-10 10:13:53 -07:00
Régis Décamps
0bece9db0d Merge "Reuse String literals rather new instance in UriMatcher" 2018-05-10 09:07:02 +00:00
Régis Décamps
e6dc996bf1 Reuse String literals rather new instance in UriMatcher
Micro-optimization: Instead of using a new instance of "#" and "*", reuse the
String literals. This will save 18 bytes for each "*" and "#" used in Uri
matchers.

Also, use switch/case rather than if/else for string matching.

Finally, add test and move TestClass in same package.

Bug: 32502682
Change-Id: Id672138a2213f68e05cafb4e88ed3c1e61c735a4
Test: Unit test
source build/envsetup.sh
lunch aosp_x86-eng
m -j 8
emulator -system out/target/product/generic_x86/system-qemu.img
make FrameworkCoreTests
adb -e install out/target/product/generic_x86/testcases/FrameworksCoreTests/FrameworksCoreTests.apk
adb -e shell am instrument -w -r -e class android.content.UriMatcherTest  com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
2018-05-10 09:39:56 +02:00
Philip P. Moltmann
56c1b4f704 DO NOT MERGE: Allow to control behavior of loadSafeLabel
(Minimal change for P, full change already in master)

Test: looked at package installer UI and saw that labels are not
truncated anymore.
Bug: 77964730

Change-Id: Ia181288a90501f4f563d24dacd6edb0c81406b82
2018-05-09 12:51:43 -07:00
android-build-team Robot
8c6d1f0d59 Merge changes I5851dd16,Id196307f into pi-dev am: 8d6571aeed
am: bcbe8d1999

Change-Id: Ic39f37084708a70d98a887762175160204706120
2018-05-09 10:29:37 -07:00
android-build-team Robot
8d6571aeed Merge changes I5851dd16,Id196307f into pi-dev
* changes:
  OMS: harden permission checks
  Add missing fields to OverlayInfo.hashCode
2018-05-09 16:55:26 +00:00
Mårten Kongstad
a525e2239a OMS: teach the OMS about static RROs
Teach the OMS about static RROs (those with <overlay isStatic="true">)
and add a new OVERLAY_ENABLED_STATIC state to OverlayInfo. This makes
isStatic less of an edge case and something that can be reasoned about
together with the other states.

Bug: 78809704
Test: atest OverlayHostTests OverlayDeviceTests
Change-Id: Ia785554ed2bcf7679888c3ccdaeaedca1430a477
2018-05-09 09:15:05 -07:00
Mårten Kongstad
2f1944bf0e OMS: rebase settings when overlays update
When an overlay package has been upgraded, OMS needs to reconcile any
previous settings about the overlay with the new state of affairs.
Sometimes it is possible to rebase the OMS settings on the new
information [e.g. the overlay has changed categories]; sometimes the OMS
settings have to be scrapped [e.g. the overlay has changed target
package]. Update OMS to do The Right Thing.

Bug: 78809704
Test: manual (adb shell stop, adb push specially prepared overlays, adb shell start, adb exec-out cmd overlay dump)
Change-Id: Icd1ae633dbee5b5ca957fa6b652af6209b4b1260
2018-05-09 09:10:28 -07:00
android-build-team Robot
2ec88c4050 Merge "Allow to influence how loadSafeLabel works" 2018-05-09 15:28:33 +00:00
Mårten Kongstad
3e9331125a Add missing fields to OverlayInfo.hashCode
OverlayInfo.category was inadvertently omitted when calculating the hash
code for an OverlayInfo.

Bug: 78809702
Test: atest OverlayHostTests OverlayDeviceTests
Change-Id: Id196307f75569d851503ffd8ef778aec50c2de37
2018-05-08 15:38:22 -07:00
Dianne Hackborn
5cb741a42b Merge "Make android:cantSaveState an optional feature." into pi-dev am: 330dd0b244
am: 5e2cf45571

Change-Id: Id8c89fa40853b41e19359540aa00c0aaaaf34f91
2018-05-08 11:43:18 -07:00
Philip P. Moltmann
a6f5c70b91 Allow to influence how loadSafeLabel works
Also remove all references to old loadSafeLabel method to prevent
proliferation of old method via copy+paste.

The implementation assumes that there are three cases:
- Short labels that don't have anything wrong with them
- Labels that are fine, but are a little too long
- Intentionally bad label that try to break stuff and slow things down.

In the first two cases no characters are marked for removal, in the
third case we have an implementation that does not use a lot of memory
and has linear performance when there are a lot of bad characters.

Test: gts-tradefed run gts-dev -m GtsContentTestCases
Bug: 77964730
Change-Id: I3feb17b2a12018cd5407c88fe3603f2ebbc9d14e
2018-05-08 11:27:41 -07:00
Mathew Inwood
40f67c52bb Fix typo in comments.
Keep the nitpickers happy.

Test: m
Bug: 77517571
Merged-In: I70374c05df3e366b5a0ce3bbb103dce28f48d4b8
Change-Id: I70374c05df3e366b5a0ce3bbb103dce28f48d4b8
(cherry picked from commit 5e986dccfd)
2018-05-08 10:29:39 +01:00