20159 Commits

Author SHA1 Message Date
Hongming Jin
e2304c2ed4 Merge "Enforce permission check before returning application info Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest Bug: 77821568" into pi-dev
am: dbc6052022

Change-Id: I137f5df296a05d7ec128427d8aafd5ae66b519f7
2018-06-01 10:36:14 -07:00
Hongming Jin
83e162615f Enforce permission check before returning application info
Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest
Bug: 77821568

Change-Id: I7554805c36c0c2552163dad7b07cfc5f552b624e
2018-05-31 17:20:14 -07:00
Todd Kennedy
87fbe89e5d Merge "Ensure permission held for MATCH_KNOWN_PACKAGES" into pi-dev
am: 2f898c4df5

Change-Id: I3c987d0d74f9f60fe23ab7d1cc815b4343503194
2018-05-31 14:56:10 -07:00
Brad Ebinger
f122c22c50 Merge "IMS: Support for Implicit Call Rejection" am: 19d032b695
am: 982ceb81a9

Change-Id: Icc22c412ab47c5a4ca895dfc6c3389a3a6202200
2018-05-31 14:02:10 -07:00
Omkar Kolangade
275b1358eb IMS: Support for Implicit Call Rejection
Adding an API in MmTelFeature to allow IMS
Service to report the reasons for implicit
call rejections by lower layers. Corresponding
ImsReasonInfo codes are also being added.

The call rejections are not related to any
call session or a call that Framework is aware
of.

Change-Id: Ie47a239856db21e84d199a7620edf7b6ceeb81bc
2018-05-31 01:37:47 +00:00
Todd Kennedy
ef9acb6ed9 Ensure permission held for MATCH_KNOWN_PACKAGES
There's an escape clause that passes the cross user permissions
if the caller UID is identical to the target user ID [eg. we're not
operating across users]. However, the method getInstalledPackagesList()
uses android.permission.INTERACT_ACROSS_USERS to filter the results and
a calling UID check is not sufficient. Ensuure the permission is
actually held, regardless of the calling UID or target user.

Change-Id: Iebf88668766d387a15246d6eea6420610665105a
Fixes: 80435086
Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest
2018-05-30 13:56:17 -07:00
Hall Liu
39ac9ffe27 Merge "Add CallAudioState ctor as TestApi" 2018-05-30 20:24:34 +00:00
Tobias Thierer
b0a4b71b34 Merge "Track: Revert some needless differences vs upstream in Matcher.java" am: adb8532394
am: ca97e3a29b

Change-Id: Ibf3e7fab17af69b2d7225661d29e022a933650a2
2018-05-29 06:47:56 -07:00
Tobias Thierer
028d1b5f5a Track: Revert some needless differences vs upstream in Matcher.java
Android Matcher.start(int) declared "throws IllegalStateException",
which is correct but redundant. Upstream OpenJDK8u121-b13 does not
have this declaration. Another CL in this topic drops the declaration,
without changing behavior.

Bug: 35910877
Test: Treehugger

Change-Id: I59778f13f0df8bd4112af4edc25ee5a93084ae35
2018-05-26 16:20:22 +01:00
Hall Liu
378f1f4972 Add CallAudioState ctor as TestApi
Needed for CTS testing

Bug: 79528185
Test: CTS
Change-Id: Iad154257a93cc776d5800527e46e777fd6c88220
Merged-In: Iad154257a93cc776d5800527e46e777fd6c88220
2018-05-25 15:22:16 -07: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
David Chen
f94b4936b4 Marks deprecated StatsManager APIs.
Marking some API's as deprecated, so users avoid getting confused.

Test: Test that build works.
Bug: 80099023
Change-Id: I4b3d4e4fa1ee3d706e49b8180aa4d0ad0e7d6eeb
2018-05-21 17:40:56 -07:00
Svet Ganov
6b03aa76e9 Make RemoteCallback test API
Test: manual

bug:79782915

Change-Id: I61343573428333c0d4a9ee2523c444753280186c
2018-05-21 15:55:28 +00:00
Xiangyu/Malcolm Chen
272769c41a Merge "Unhide constructors of DataService and NetworkService." 2018-05-15 18:54:50 +00:00
Jeff Sharkey
8e6445a1a5 Merge "Let tests enumerate all transports/capabilities." into pi-dev 2018-05-15 15:17:30 +00:00
Malcolm Chen
1d7e446f6e Unhide constructors of DataService and NetworkService.
DataService and NetworkService are System level classes. We shouldn't
hide their constructors otherwise their System level sub-class
can't be instantiated properly.

Test: gts
Bug: 77531655
Change-Id: I1a58b4857dbcf939ac124e20eb0a801ad5a9b597
Merged-In: I1a58b4857dbcf939ac124e20eb0a801ad5a9b597
2018-05-14 23:27:42 +00:00
Jeff Sharkey
a5ee62f356 Let tests enumerate all transports/capabilities.
This gives them a way to collect all included values without
resorting to manual probing of each newly added value.

Bug: 16207332
Test: atest com.android.cts.net.HostsideVpnTests
Change-Id: I35ca412512dc8515b44d5518e1ca4caa5bdc678f
2018-05-14 17:17:33 -06:00
Hall Liu
c1d95aad1a Add CallAudioState ctor as TestApi
Needed for CTS testing

Bug: 79528185
Test: CTS
Change-Id: Iad154257a93cc776d5800527e46e777fd6c88220
2018-05-11 17:14:58 -07:00
Treehugger Robot
87a7c657bd Merge "add install action for carrier id to system API" 2018-05-11 17:36:24 +00:00
fionaxu
4ff8de609b add install action for carrier id to system API
Bug: 79426800
Test: Manual
Change-Id: Icd3e9ae527dc17ab5762aa57df596f058de08d5b
(cherry picked from commit 2776ed56b846ff34e45467f7618a679049d16f3f)
Merged-in: Icd3e9ae527dc17ab5762aa57df596f058de08d5b
2018-05-11 15:54:45 +00:00
TreeHugger Robot
689866352b Merge "add install action for carrier id to system API" into pi-dev 2018-05-09 22:47:40 +00:00
fionaxu
2776ed56b8 add install action for carrier id to system API
Bug: 79426800
Test: Manual
Change-Id: Icd3e9ae527dc17ab5762aa57df596f058de08d5b
2018-05-08 15:25:40 -07:00
Tyler Gunn
f858a0e8d2 Make TelecomManager#endCall a public API.
A broad category of apps such as wearable companion apps and call blocking
apps rely on the ability to reject a ringing call.
Previously this was achieved using a broken TelephonyManager API which
lacked permission checks.
To support these applications, removing the @hide attribute on the existing
TelecomManager#endCall API so that apps with the existing
ANSWER_PHONE_CALLS permission can reject ringing calls and end ongoing
calls.  Logically if an app has permission to answer a call, it should be
able to end it.

Test: Created test app to verify API permission checks.
Test: Added new CTS tests to cover this API.
Bug: 78290258
Merged-In: Ic6527969793ebe05eb9c5fa8205558ae788ea572
Change-Id: Ic6527969793ebe05eb9c5fa8205558ae788ea572
2018-05-08 11:19:18 -07:00
Dianne Hackborn
330dd0b244 Merge "Make android:cantSaveState an optional feature." into pi-dev 2018-05-08 17:59:32 +00:00
Tyler Gunn
872a039ab3 Merge "Make TelecomManager#endCall a public API." into pi-dev 2018-05-08 04:01:35 +00:00
Dianne Hackborn
c8e4fad862 Make android:cantSaveState an optional feature.
This doesn't make sense on things like watches and appliances,
so make this an optional feature that the device must enable.
If the feature is not set, then the system will ignore
the app's request.

Bug: 76213401
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: I91abf9d86ec14fa632e3bcc83c4a3febade5d2e4
2018-05-07 15:01:57 -07:00
Tyler Gunn
e1aa26c744 Make TelecomManager#endCall a public API.
A broad category of apps such as wearable companion apps and call blocking
apps rely on the ability to reject a ringing call.
Previously this was achieved using a broken TelephonyManager API which
lacked permission checks.
To support these applications, removing the @hide attribute on the existing
TelecomManager#endCall API so that apps with the existing
ANSWER_PHONE_CALLS permission can reject ringing calls and end ongoing
calls.  Logically if an app has permission to answer a call, it should be
able to end it.

Test: Created test app to verify API permission checks.
Test: Added new CTS tests to cover this API.
Bug: 78290258
Change-Id: Ic6527969793ebe05eb9c5fa8205558ae788ea572
2018-05-02 13:23:48 -07:00
Dianne Hackborn
ed23b9b12c Fix issue #78230210: Strobe: Need separate runtime permission group for READ_CALL_LOG and WRITE_CALL_LOG
Bug: 78230210
Test: manual
Change-Id: Ie5a0ab3dffd40dc44f7aa5deb81b42fbc2dbd406
2018-05-01 14:00:34 -07:00
goneil
f6c6e8efa7 Added test API to refresh the UICC Profile
Bug: 74016670
Test: GTS tests - vendor/xts/gts-tests/hostsidetests/simappdialog
Change-Id: I8f8ffdad8666d523172b035d24b96278d4d1a1ee
2018-04-25 18:19:42 -07:00
Lorenzo Colitti
a09c06a6c1 Merge "Actually @hide unwanted capability methods." into pi-dev 2018-04-24 21:20:25 +00:00
Lorenzo Colitti
19c0ccaa8c Actually @hide unwanted capability methods.
Bug: 77601789
Test: builds, boots
Test: make doc-comment-check-docs
Change-Id: I7a913b83ab5110047d187564b3a1b0bbe1631942
2018-04-24 13:12:56 +09:00
Jeff Sharkey
c3c8d16380 Give CTS a way to force-poll network stats.
Collecting network statistics is pretty heavy, which is why we're
throttling callers.  However, to keep CTS running fast, we provide a
way for tests to force a poll event, instead of making them wait for
the throttle timeout.

Bug: 77908520
Test: atest cts/tests/tests/app.usage/src/android/app/usage/cts/NetworkUsageStatsTest.java
Change-Id: Ia792f0cd495023366ff8c4839df54e7da2ae8331
2018-04-20 12:18:23 -06:00
Hall Liu
9a51f07117 Merge "Move RTT system setting to Settings.Secure" 2018-04-16 18:40:28 +00:00
Dan Gittik
26b030d829 Fixed power manager CTS test.
Added an annotation necessary to allow the power manager CTS test to
access the non-public method nap.

Test: adb install -r \
      out/host/linux-x86/cts/android-cts/testcases/CtsOsTestCases.apk
      adb shell am instrument -e class android.os.cts.PowerManagerTest \
      -w android.os.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ida939f074654bef351e2b8fd563c8463431ce9c6
Fixes: 77907164
2018-04-16 18:50:10 +01:00
Wale Ogunwale
3da5f3b2dd Finalizing P SDK
Bug: 77588754
Test: builds
Change-Id: Ic06cad790a3dc53d012a7c43dfac911fc6dc61e7
2018-04-12 15:26:31 -07:00
fionaxu
780b62b3b5 A test api to override carrier information
This API should only be used for testing purpose e.g., CTS/GTS/SL4A
By overriding carrier information, we could force a particular carrier id,
carrier's config, but also any country or carrier overlays to be loaded
when using a test SIM with a call box.

Bug: 72332597
Test: atest CtsTelephonyTestCases:CarrierIdentificationTest

Change-Id: Icd5804375ef9334c9f6c382cc6a774b9c9c15213
(cherry picked from commit 5b509b81a0d5b14148745368b153dc6b8d4482ac)
Merged-in: 5b509b81a0d5b14148745368b153dc6b8d4482ac
2018-04-12 22:19:15 +00:00
Hall Liu
bd6bf7cbe8 Merge "Make setServiceId a TestApi" 2018-04-12 20:41:44 +00:00
Hall Liu
60fd195a0a Move RTT system setting to Settings.Secure
Bug: 76449217
Test: manual
Change-Id: Id198aab697e9e37c941b0d99255e4c6a0e1f91a9
Merged-In: I85620d5b834aa7e04579212f3fd5cf6c0498b570
2018-04-12 13:39:58 -07:00
Jeff Sharkey
1df7ee5757 Remove poorly defined notification APIs.
They were rushed in at the last second, and feedback from stakeholders
reveals they're not ready for prime time.

Bug: 77851691
Test: builds, boots
Exempt-From-Owner-Approval: SDK finalization
Change-Id: I96f6c80610627878a29543b345419924774a60e0
2018-04-12 18:27:08 +00:00
Wale Ogunwale
fb10508cfa Merge "Clean up APIs before declaring API 28." into pi-dev 2018-04-12 12:19:56 +00:00
Phil Weaver
99a238adf1 Merge "Move accessibilityHeader from TextView to View" into pi-dev 2018-04-12 03:07:57 +00:00
Hall Liu
beb880f724 Make setServiceId a TestApi
Bug: 77152869
Test: CTS
Change-Id: I26f60b48865953971de02c50db48e0ff66f4e2a0
Merged-In: I26f60b48865953971de02c50db48e0ff66f4e2a0
2018-04-11 18:23:30 -07:00
TreeHugger Robot
ba6f173cb1 Merge "Add API to compute charge time remaining." into pi-dev 2018-04-12 00:27:53 +00:00
TreeHugger Robot
f0b9fbebc0 Merge "APIs to disable data usage notifications." into pi-dev 2018-04-11 23:05:03 +00:00
Michael Wright
928167e044 Add API to compute charge time remaining.
This is so unbundled applications (e.g. dreams) can present a charge
time indicator that is in sync with the rest of the system.

Bug: 77919650
Test: manual
Change-Id: I7d62dea4fd49eb173b4f052a0fc36f4e7ce5b6bb
2018-04-11 23:47:31 +01:00
Jeff Sharkey
0a5570d49d APIs to disable data usage notifications.
Certain carriers have requested the ability to disable the warning,
limit, and rapid data usage notifications shown by the OS, so give
them that ability on a per-subId basis.  (The notifications are still
enabled by default.)

Unhide NOT_CONGESTED to match setSubscriptionOverrideCongested().

Fix bug in getPrimarySubscriptionPlanLocked() to find the first
currently active plan; the first non-recurring plan may be no longer
active.  Fix bug in SubscriptionPlan which allowed invalid negative
or zero-length Period objects.

Bug: 77851691, 77506882, 77662747
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Test: atest android.telephony.cts.SubscriptionManagerTest
Exempt-From-Owner-Approval: SDK deadline, responding to API feedback
Change-Id: Ib6e6dbadd5022937c3f0661ab4b66aa617f0b5af
2018-04-11 22:07:40 +00:00
Hall Liu
d41e669fca Merge "Make setServiceId a TestApi" into pi-dev 2018-04-11 20:21:48 +00:00
Jeff Sharkey
3990ee1c9f Clean up APIs before declaring API 28.
As part of finalizing an SDK, we need to ensure that no new APIs are
marked @Deprecated, since they're typically cleanup that someone
forgot to finish.

Someone forgot to replace Slice.getTimestamp() with Slice.getLong().

Bug: 77588754
Test: builds, boots
Exempt-From-Owner-Approval: SDK finalization
Change-Id: Ic0ec91a43d161a69c1e840c42046ad500b7aeca0
2018-04-11 13:49:21 -06:00
Daniel Cashman
960a0c6c57 Merge "Add SigningInfo class to expose package signing details." into pi-dev 2018-04-11 19:21:07 +00:00
TreeHugger Robot
10fb6582eb Merge "DO NOT MERGE - Hide IWLAN system API" into pi-dev 2018-04-11 18:36:31 +00:00