4717 Commits

Author SHA1 Message Date
Treehugger Robot
609f65048f Merge "Revert "Deprecate Data Command in Android"" 2019-12-18 19:41:49 +00:00
Shuo Qian
b179a7fc2f Revert "Deprecate Data Command in Android"
This reverts commit 5c4e7b81b571d11851fd9c63a308e1a910b196b9.

Reason for revert: <b/146461873>

Bug: 146461873

Change-Id: I8bd10333f2014e52e1d3122c5b9dc895a5d6c658
2019-12-18 17:27:21 +00:00
Jiyong Park
6316f348e7 Merge "unique_fd is passed by value in AIDL interfaces" 2019-12-18 06:14:38 +00:00
Jiyong Park
573fd3dfe0 unique_fd is passed by value in AIDL interfaces
FileDescriptor type in AIDL was translated into const unique_fd& in C++.
Now, it is unique_fd, i.e. passed by value, to make it easier to keep it
beyond the scope of the call.

Bug: 144943748
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: I2b87761401361f9cf96cdda070f26e70a5c6c935
(cherry picked from commit b8ba23418aa6868ec14e82c29311021e382a19bc)
Change-Id: I2b87761401361f9cf96cdda070f26e70a5c6c935
2019-12-18 05:32:25 +00:00
Shuo Qian
5c4e7b81b5 Deprecate Data Command in Android
Please use adb shell cmd phone data enable/disable instead.

Bug: 145553588
Test: adb shell commands; manual
Change-Id: I7d1ab779bd6c08dc8c564dc5f3f5d9e165ae39ed
2019-12-16 17:09:54 -08:00
Artur Satayev
700e08b291 Add new UnsupportedAppUsage annotation as lib dependency.
Bug: 145132366
Test: m
Change-Id: Ibb7f8424186149365354a96249c06c9fccde66bd
Merged-In: Ibb7f8424186149365354a96249c06c9fccde66bd
2019-12-11 19:44:16 +00:00
Hall Liu
e3b535b98c Remove telephony hidden api usages from commands
Remove usages of Telephony hidden APIs from Telecom's debugging commands

Fixes: 141576016
Test: manual
Change-Id: Ia1184f804b3b03104dd5c911b15c8c28190b2395
Merged-In: Ia1184f804b3b03104dd5c911b15c8c28190b2395
2019-12-05 18:21:06 -08:00
Hector Dearman
25af773ac6 Reland Perfetto upload logging atoms DO NOT MERGE
Initial state:
- I landed ag/9652310 (the original change) downstream
- I cherry-picked this change on upstream to aosp/1158971
- This cherry-pick had an incorrect Merged-In tag referring to ag/7911242
- This cl was present between mirror-aosp-master and master internally

Branch                      CL
aosp/master                 (aosp/1158971)
    \/
internal/mirror-aosp-master (aosp/1158971)
    \/
internal/[---]              Nothing since ag/7911242 was here
    ||                      already automerger skipped our change
    \/
internal/master             (ag/9652310)
    \/
[various children]          (ag/9652310)

See:
https://android-build.googleplex.com/builds/automerger/graph/project/googleplex-android/platform/frameworks/base

How this will fix the issue:
- The revert will go everywhere aosp/1158971 did
- The reland will go everywhere aosp/1158971 did plus to internal/master

This reverts commit 8ed72df3d8e21c06d8b1b848d6e58c15b251d25a.

Merged-In: Ia40303aa2a669c301fab912b0b0bdf5ec1259caf
Change-Id: I3c061fef4f103f0f83147d56ed8019dcb39a7711
2019-12-04 21:56:05 +00:00
satayev
972f7adfbf Merge "Swap default for disableTestApiChecks." 2019-12-04 17:10:17 +00:00
Tyler Gunn
1d4fcf1703 Merge "Car mode InCallService changes." 2019-12-04 16:50:47 +00:00
Artur Satayev
fdc9fe8dc0 Swap default for disableTestApiChecks.
There are more runners than those updated in tradefed/testtype/, which donot/cannot push --no-test-api-checks arg to `am instrument`. Instead reverse the default, so that by default `am instrument` disables test api enforcement policy.

Test: atest CtsHiddenApiBlacklistApi27TestCases \
        CtsHiddenApiBlacklistApi28TestCases \
        CtsHiddenApiBlacklistCurrentApiTestCases \
        CtsHiddenApiBlacklistDebugClassTestCases \
        CtsHiddenApiBlacklistTestApiTestCases \
        CtsAppSecurityHostTestCases:android.appsecurity.cts.ExternalStorageHostTest#testMediaEscalation \
        CtsAppSecurityHostTestCases:android.appsecurity.cts.StorageHostTest#testVerify \
        CtsAppSecurityHostTestCases:android.appsecurity.cts.DirectBootHostTest#testDirectBootNative
Exempt-From-Owner-Approval: small fix
Bug: 133832325
Change-Id: Id1870cdd4bb0a51bddede24afd7f87d6e5ec766c
2019-12-04 14:31:07 +00:00
Tyler Gunn
f701f7a765 Car mode InCallService changes.
1. Grant ENTER_CAR_MODE and CONTROL_INCALL_EXPERIENCE permissions to the
shell identity for use within CTS tests.
2. Remove un-needed Telecom shell command.

Test: unit tests, telecom CTS tests, manual testing
Bug: 144345414
Change-Id: I54a2e723d6ef9552117e6cadf4ab7c449dd5e3cb
2019-11-26 13:43:53 -08:00
satayev
5c8ed7f6e7 Merge "Add --no-test-api-acces to am instrument."
am: 188abff5b2

Change-Id: I4b345fd330ba92caa96781f64f703a057adad2b0
2019-11-12 10:49:01 -08:00
satayev
188abff5b2 Merge "Add --no-test-api-acces to am instrument." 2019-11-12 18:39:01 +00:00
Artur Satayev
e2ebc1be4b Add --no-test-api-acces to am instrument.
By default instrumented processed have access to @TestApis; however for certain CTS tests we want to disable access to test APIs, where this flag would be used.

Test: manual
Bug: 133832325
Change-Id: Id56ce3079bcea2632d4002edcf120d9d5c9e0a26
Merged-In: Id56ce3079bcea2632d4002edcf120d9d5c9e0a26
2019-11-12 12:52:19 +00:00
Hector Dearman
9df31fae0e Add Perfetto upload logging atoms
Assessment: https://eldar.corp.google.com/assessments/480866545
Doc: go/perfetto-monitoring-uploads
Bug: b/140984898
Bug: b/139351286
Test: Patch aosp/1156355 & aosp/1156886
  Run ./out/host/linux-x86/bin/statsd_testdrive 229
  adb shell perfetto -c :test --dropbox perfetto
Change-Id: I3e2dfa213b8fd3496aa0b09e02e0094be41711bc
Merged-In: I8f41d72c8f96a004911ef68491de8a214da4db24
(cherry picked from 40579f616d3627021808619dcd82735316ed72d5)
2019-11-06 16:34:13 +00:00
Tej Singh
dbd03d7f3a Merge "Store elapsedRealtimeNs as int64 instead of long"
am: dc51e5ef21

Change-Id: I487ca72036cfcc28bb04aebc44c7f3ca156a78b4
2019-11-04 12:15:03 -08:00
Tej Singh
ca782ac5ff Store elapsedRealtimeNs as int64 instead of long
long can be 32 bits, which will overflow in ~2 seconds if signed.

Test: builds
Change-Id: I78e69e2c2ceb21a5748d9d5d860b45e5a3fae865
Merged-In: I78e69e2c2ceb21a5748d9d5d860b45e5a3fae865
2019-11-01 17:30:36 -07:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Xin Li
d3498e3053 Merge Coral/Flame into AOSP master
Bug: 141248619
Change-Id: Ic0486c8c79d94c9a30efa37676b2f6a94fb7b5fa
Merged-In: Ibe8ff7bdba7a886bd8b91155ae56f087a836981f
2019-10-25 10:27:58 -07:00
Tom Cherry
2ff78bb657 Merge "Remove legacy logger_entry_v* structs"
am: 4be2934e61

Change-Id: I910d9429de9ae6dd571af726fc3dbd04c2b94490
2019-10-25 10:05:00 -07:00
Tom Cherry
d02698938e Remove legacy logger_entry_v* structs
These are obsolete so we move all users to a single format.

Test: build, logging unit tests
Change-Id: I05ebb0b9135c61585ff103d24b785b9f21197257
2019-10-24 10:56:34 -07:00
Tom Cherry
7b1e0eee95 Merge "Use sizeof(android_log_header_t) instead of sizeof its components"
am: 8facba4326

Change-Id: Ia7655b2d082c1b55fa2e0a98245e49d2b0326dbc
2019-10-17 06:54:34 -07:00
Tom Cherry
937e1bdc1f Use sizeof(android_log_header_t) instead of sizeof its components
Particularly because sizeof_log_id_t is a misnomer and is going away.

Test: build, liblog and logcat unit tests
Change-Id: I7978bf83e44336a334229753ff1e11a07134e8fc
2019-10-16 15:48:56 -07:00
Howard Ro
41128933e4 Merge "Terminate statsd on a few signals including SIGTERM"
am: 99f231f3bc

Change-Id: I4a1f39eac54da861d88337a15e0c8e7a764a66f3
2019-10-14 15:37:24 -07:00
Treehugger Robot
99f231f3bc Merge "Terminate statsd on a few signals including SIGTERM" 2019-10-14 22:23:12 +00:00
Howard Ro
48dfcdb90a Terminate statsd on a few signals including SIGTERM
- statsd is handling SIGHUP/SIGQUIT/SIGINT/SIGTERM, but doesn't exit.
- The expected behaviour is that statsd would exit after finalizing log
processing when those signals are received.

Bug: 139817664
Bug: 138764189
Test: Send SIGTERM to statsd and check if it is terminated. (note that
init will revive statsd)

Change-Id: Ie45821613664bf030754f835f5481c986ed3cede
Merged-In: Id1146d772f8c68892256ee7a3eea70837fee5c7a
2019-10-14 13:56:41 -07:00
Nick Desaulniers
4a3a9b4a9f Merge "[frameworks][base][statsd] fix -Wimplicit-int-float-conversion"
am: 8b178a6607

Change-Id: I6345752405ea779c221aff6699a832cc440de06e
2019-10-14 09:38:15 -07:00
Nick Desaulniers
8208b201ca Merge "[frameworks][base][statsd] fix -Wreorder-init-list"
am: 00ae277630

Change-Id: Icf1d23aba020cec0b084c435cfcf2a2ca4a66f83
2019-10-11 09:24:42 -07:00
Nick Desaulniers
58664e8a7c [frameworks][base][statsd] fix -Wimplicit-int-float-conversion
RAND_MAX cannot be precisely represented in an IEEE 754 single precision
float.  For the purpose of generating a random number, the imprecision
is irrelevant. Fix the warning with an explicit cast.

Bug: 139945549
Test: mm
Change-Id: Ica60b410bbbca0b3807f985e302abb0775133877
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-10 13:09:42 -07:00
Nick Desaulniers
691e1a093c [frameworks][base][statsd] fix -Wreorder-init-list
C++20 would like members of designated initializers to be ordered, so
that initialization side effects match member initialization in explicit
constructors. This differs from C99.

Bug: 139945549
Test: mm
Change-Id: Iadc96f8f0bf57181970ca3e96b5c5f68ac40a030
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-10 13:08:34 -07:00
Ryan Mitchell
042900cf9a Merge "Add requiredSystemPropertyValue support in idmap2" am: b30f65713f am: fa9362aec9
am: b8a749dac6

Change-Id: I042eaa94407e1aa431f60afcb39b27198acfa3f0
2019-10-02 14:48:37 -07:00
Brad Ebinger
7acb9ff577 Merge "Add Telecom command for setting connectionservice filter" am: 25f4dca660 am: 05e03e8c0c
am: 4d4dc1165a

Change-Id: Id7e2c0c4f6c18b074ba40d31dbb43ec2dfc269fc
2019-10-02 14:03:19 -07:00
Ryan Mitchell
fa9362aec9 Merge "Add requiredSystemPropertyValue support in idmap2"
am: b30f65713f

Change-Id: Id9636ed8579775ba9ca91bc3f44bc481a89697a8
2019-10-02 13:32:16 -07:00
Ryan Mitchell
b30f65713f Merge "Add requiredSystemPropertyValue support in idmap2" 2019-10-02 16:48:50 +00:00
Brad Ebinger
05e03e8c0c Merge "Add Telecom command for setting connectionservice filter"
am: 25f4dca660

Change-Id: I00ba7ce3b64f4680eaf8798c52d98318160b45f0
2019-10-01 10:51:45 -07:00
Brad Ebinger
a9a33e1d68 Add Telecom command for setting connectionservice filter
For testing we need the emergency call to go through the CTS
ConnectionService. This is achieved by passing in a package
name filter for testing, which restricts which ConnectionServices
are available for emergency calling.

For safety this filter will be bypassed if the user calls an
actual emergency number (instead of a test number).

Bug: 138741228
Test: atest CtsTelecomTestCases
Change-Id: I656533e4a36a7bba48625bf6f763731991695aed
2019-09-30 17:46:36 -07:00
Brad Ebinger
4016d704e4 Merge "Integrate the active emergency session listener in TelephonyRegistry" am: 4a54c2fa2b am: 64418f4c31
am: 32dfda5c4a

Change-Id: Ie82cc7eb41329821fc79ac94659ab84c3b59c3f2
2019-09-30 16:36:03 -07:00
Brad Ebinger
64418f4c31 Merge "Integrate the active emergency session listener in TelephonyRegistry"
am: 4a54c2fa2b

Change-Id: I890a913c18332669dee8f21baf81db78a50a0fb0
2019-09-30 16:08:04 -07:00
Shuo Qian
b61230c51d Integrate the active emergency session listener in TelephonyRegistry
Add Telecom shell command: "adb shell telecom set-system-dialer"

Test: PhoneStateListener cts
Bug: 135204580
Merged-In: I5eaada6a671606642a849f0ff6fe964332d80d5f
Change-Id: I5eaada6a671606642a849f0ff6fe964332d80d5f
2019-09-30 20:43:42 +00:00
Gabriel Siqueira
d7fc4f774a Add requiredSystemPropertyValue support in idmap2
Up to Android P, there was this feature were we are able to
define "requiredSystemPropertyValue" in the AndroidManifest.xml
of the RRO apk, so that it will only be loaded if
requiredSystemPropertyValue/requiredSystemPropertyName are matched.

Porting support from idmap
https://android.googlesource.com/platform/frameworks/base/+/master/cmds/idmap/scan.cpp#135

To idmap2
https://android.googlesource.com/platform/frameworks/base/+/master/cmds/idmap2/idmap2/Scan.cpp#175

Bug: 140891738
Change-Id: I47752af93efa4563a60e336c1e1b1ffc081b51ec
2019-09-27 11:35:34 -03:00
Jeongik Cha
cac5791954 Merge changes from topic "system_ext" am: a828ee6442 am: dee02a0fae
am: 6a46c5315a

Change-Id: Ic31f9d12fffda486d36ce427848e04c7755cc531
2019-09-26 16:00:00 -07:00
Jeongik Cha
dee02a0fae Merge changes from topic "system_ext"
am: a828ee6442

Change-Id: I2b636d0c54c932342586de47a38c16e93bf978e8
2019-09-26 15:40:26 -07:00
Treehugger Robot
a828ee6442 Merge changes from topic "system_ext"
* changes:
  Consider overlay in system_ext as system's
  Support /system_ext partition
2019-09-26 22:18:07 +00:00
Mike Ma
262a3b0009 Merge "Add an API to dump incident report for dumpstate" am: a11beeca12 am: af1f91a133
am: 3343814a57

Change-Id: I2d4bfdf8537adf1541a78c264a36f95e1384af71
2019-09-23 21:40:26 -07:00
Mike Ma
af1f91a133 Merge "Add an API to dump incident report for dumpstate"
am: a11beeca12

Change-Id: If5ca98de9a5a85ae6e2aff90224a80e925ea419c
2019-09-23 21:17:34 -07:00
Mike Ma
a11beeca12 Merge "Add an API to dump incident report for dumpstate" 2019-09-24 01:07:25 +00:00
Mike Ma
15f83a3118 Add an API to dump incident report for dumpstate
Instead of just relying on the regular iteration through the system
services inside dumpstate, add another API to IIncidentManager
dedicated for dumpstate.

- It is only callable by dumpstate() (check the calling uid)
- It has the same behavior as the current call inside dump()

Advantages:
- More explicit function name, right next to takeIncidentReport will
  make it easier to keep them in sync.
- Nobody else can call it, make security easier.
- If dumpstate calls it explicitly, it can skip the 10 second timeout
- The regular dump() call should provide debugging data about
  incidentd itself, for example timestamps for the most recent N
  incident reports taken and the current state of the work directory,
  allowing us to debug incidentd itself.

Bug: 137493082
Test: Manually trigger a bug report, and verify
      /proto/incident_log.proto in the zip file.

Change-Id: I19139c765b53ede63d3beb3ea3ac40ada1aba42d
Merged-In: I19139c765b53ede63d3beb3ea3ac40ada1aba42d
2019-09-23 16:20:53 -07:00
Jeongik Cha
3e725f2224 Consider overlay in system_ext as system's
When there is overlay package in system_ext, turn on POLICY_SYSTEM_PARTITION.
In other words, overlay pacakge in /system_ext is considered as system's one

Test: mv vendor/overlay/framework-res__auto_generated_rro.apk system_ext/overlay
      and then check if it works properly.
Bug: 136715327

Change-Id: Ib225368eae41203a8630f4310d26e9cf1afa706a
Merged-In: Ib225368eae41203a8630f4310d26e9cf1afa706a
(cherry picked from commit cba9579158cc70bf8eadb6e8a239e0ab2dc073d2)
2019-09-23 22:01:29 +00:00
Steven Moreland
c1e240aa7a Merge "Host users of libutils trace use libcutils." am: 4a17a712f5 am: 330c15e273
am: fb59c94709

Change-Id: I1c2fe37eb3d12d07ea0f6c7e2aa03fd9e3ff3813
2019-09-23 09:45:49 -07:00