Commit Graph

468813 Commits

Author SHA1 Message Date
Dave Mankoff
f7bfe4d33c Remove Dep.get(MAIN_HANDLER) from NotificationMediaManager
Bug: 144503618
Test: atest SystemUITests
Change-Id: I0cd715083a4db385735dac1436ff0429605c29a5
2020-02-19 11:28:46 -05:00
Roshan Pius
bd8dd47fde Merge changes from topics "ap_shutdown_timeout_flag", "scan_always_available_API"
* changes:
  WifiOemMigrationHook: Migrate Settings global values
  WifiManager: Add API for scan always available toggle
  SoftApConfiguration: Add shutdown enabled method
2020-02-19 16:28:43 +00:00
Anton Hansson
0e9166f15b Merge "Enable compat checking & lint for module_lib api" 2020-02-19 16:27:41 +00:00
Anton Hansson
1a63549314 Stop exposing generated AIDL from Tethering
We don't want new modules exposing stable aidl directly. APIs should
be defined as java @SystemApi. It also seems like nothing actually
depend on these interfaces, except one simple exception.

Bug: 147200698
Test: m
Change-Id: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16
Merged-In: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16
2020-02-19 16:26:05 +00:00
Winson
022e707f90 Split ParsedComponents
This creates individual files for each Parsed_ object.

Each also has a corresponding _Utils class for holding the
parsing logic for each object. This was done to keep the data
class as simple as possible.

This commit does not migrate existing usages of ComponentParseUtils
subclasses, so there will be duplicates of everything. A follow up
change will migrate all the parsing logic to use these new classes.

Bug: 135203078

Test: none, all testing for Parsed_ is to-be-merged and/or TBD
Change-Id: I7bea3b1742bc5d945d1ad287f406488d3bf46476
2020-02-19 08:23:01 -08:00
Winson
3dc4af4769 Add ParseResult infrastructure
ParseInput is passed into all parsing methods and simply acts as
a shared container which can hold a generic success or error value.
When it is transformed into a result value, it must be returned to
its parent immediately, who can decide what to do with it.

ParseResult is the type returned when a ParseInput is set to success
or error. It casts itself to a strong type representing the returned
value, and is used by specifying ParseResult<ResultType> instead of
just ResultType for the method return type.

ParseTypeImpl is just the implementation of the two above which handles
moving between them. It also adds some debug functionality in case
the error catching code is incorrect or insufficient and it would be
preferably to always have a stack trace.

It is important to use this infrastructure in a thread-local manner,
such that you don't re-use an input already in use and always bubble
up on any success or error.

A constrained example:

class Parser {

    val shared = ParseTypeImpl<>()

    fun parse(file: File): Pair<Output, Output> {
        // Reset the shared object
        val input = shared.reset()

        // Pass it to be used by the parsing method
        var result = parseOutput(input, file.read())

        // Verify the result
        if (result.isError()) {
            // Bubble up error if necessary
            throw Exception(result.errorMessage, result.exception)
        }

        // Save the result (as it will be lost when the input is reused)
        val one = result.result

        // Parse something else
        result = parseOutput(input, file.read())

        // Same verification
        if (result.isError()) {
            // Bubble up error if necessary
            throw Exception(result.errorMessage, result.exception)
        }

        val two = result.result
        return one to two
    }

    fun parseOutput(input: Input, read: Object): ParseResult<Output> {
        return if (read == null) {
            input.error("Something went wrong")
        } else {
            input.success(read)
        }
    }
}

Bug: 135203078

Change-Id: I532d0047e67f80fd925b481dac8823ab45ad0194
2020-02-19 08:23:01 -08:00
Winson
33eacc6c05 ParsingPackage/ParsedPackage test code migration
Part of the Parsing/ParsedPackage split into core/server.

Moves core tests that are should now be in services,
and cleans up/migrates test code. Import changes, moving
classes into the server, and general small cleanup.

This is the final commit in the Parsing/ParsedPackage split.

Bug: 135203078

Test: enumerated in first commit of change ID
		Ib4fe51d729a56bfb0ea1316e577358ba0dfceccf

Change-Id: I694da372feda070815e05b450807a18d71ec9b9d
2020-02-19 08:22:50 -08:00
Youngjun Kwak
5a846ed237 Merge "Add vertical type check to prevent non-Automotive Androids from force displaying system bars." into qt-qpr1-dev 2020-02-19 16:19:48 +00:00
Automerger Merge Worker
3f638d9a3f Merge "Key revocation check is permissive when device is unlocked" am: a9384cdc9b
Change-Id: I9e4cb8a722e6ae67882a6e37447dd924518eebc2
2020-02-19 16:17:16 +00:00
TreeHugger Robot
b4358fdfd5 Merge "Add READ_CONTACTS permission to NoManSerTest shell" 2020-02-19 16:15:01 +00:00
Treehugger Robot
a9384cdc9b Merge "Key revocation check is permissive when device is unlocked" 2020-02-19 16:03:50 +00:00
Julia Reynolds
ceba44649f Merge "Sort VICs to the top of the conversation section" 2020-02-19 15:56:38 +00:00
Anton Hansson
7ede3dd2b3 Remove obsolete subdirs and optional_subdirs
I was looking for documentation of what these mean, but discovered
that these attributes have been obsolete for years.

Test: m
Change-Id: Ifcf47e99d22b1546780968d1030f835173612a27
Merged-In: Ifcf47e99d22b1546780968d1030f835173612a27
2020-02-19 15:27:58 +00:00
Lee Shombert
d29b4c5208 Merge "Binder cache for Bluetooth getBondState()" 2020-02-19 15:27:30 +00:00
Santiago Seifert
970c72882c Consolidate API naming to use Parser everywhere
Bug: 132153067
Test: CTS.
Change-Id: Ie274518683ffabff207dd845f3107e3313a5dfd7
2020-02-19 15:26:41 +00:00
Anton Hansson
0decfb1f8a Enable compat checking & lint for system_services api
These were previously turned off as there were no previous
releases to compare it to. Check in empty files as comparison.

Whitelist current lint problems for now (filed bugs to follow-up).

Bug: 149818061
Bug: 149818284
Bug: 147559833
Test: m checkapi
Change-Id: Ib4cbc84ac9a826f7b947c951c94f8f5578f4554d
Merged-In: Ib4cbc84ac9a826f7b947c951c94f8f5578f4554d
(cherry picked from commit daa9d88444)
2020-02-19 15:20:14 +00:00
Katsiaryna Naliuka
e2c0b5fe4b Handle the case of null intent type when obtaining target intent filter.
Currently the method swallows the exception but that pollutes the logs.
This change preserves the behavior while getting rid of distracting
errors in the logs.

Test: atest IntentTest; atest ChooserActivityTest

Change-Id: I2b02dc4ae0343fa1fd58a112455e426d8a6d3f34
2020-02-19 16:08:40 +01:00
Martijn Coenen
fd12f36fb9 Switch to new project ID constants.
These are used on devices without sdcardfs.

Bug: 146419093
Test: lsattr -pR
Change-Id: I87c900d409c90770fb3eaa595324dab385458c6c
2020-02-19 16:04:02 +01:00
Arthur Hung
5d0197890b Allow unbuffered MotionEvent dispatch for View (1/2)
MotionEvents sent from InputDispather would be buffered and dispatched
align the vsync by default. And it would provides many of benifits.

But for a high quality gaming experience, low latency input is critical
when we use analogs inputs (e.g mouse or joystick, etc.). So It's
important for gaming applications to process these input events in a
raw way, without them being coalesced on each frame.

- Add new api View.requestUnbufferedDispatch(source) to control which
  input source classes could be unbuffered while handled by the view.

Bug: 135740001
Bug: 136277595
Test: atest ViewUnbufferedTest
Change-Id: If65ed1906f59947dcd1e5062519b643a17d0e8e5
2020-02-19 15:01:13 +00:00
Felka Chang
1c4d4b511c Fix wrong svg test data
Correct the svg path locates in bottom right corner without execeed
the display boundary.

Fixes: 149675352
Test: atest FrameworksCoreTests:android.view.CutoutSpecificationTest
Change-Id: I32eed816fc4fe774724bac7b58a2351fa52dcf4e
2020-02-19 23:01:02 +08:00
Anton Hansson
626afea1bd Enable compat checking & lint for module_lib api
These were previously turned off as there were no previous
releases to compare it to. Check in empty files as comparison.

The new tethering APIs fail lint -- I have filed a release
blocking bug to get these cleaned up.

Bug: 149430003
Bug: 147559833
Test: m module-lib-api-api-lint
Test: m module-lib-api-check-last-released-api (with+without incompatibilities)
Change-Id: I2b171dc836ca121502fb345d8dd512a05c566a49
Merged-In: I2b171dc836ca121502fb345d8dd512a05c566a49
(cherry picked from commit 79e35c3beb)
2020-02-19 14:58:44 +00:00
Anton Hansson
79977dcc02 Merge "Enable compat checking & lint for system_services api" 2020-02-19 14:56:31 +00:00
TreeHugger Robot
9d0c343e1b Merge "Add HDMI hotplug events to dumpsys hdmi_control" 2020-02-19 14:56:12 +00:00
TreeHugger Robot
78c2b7a44f Merge "DeviceProductInfo API." 2020-02-19 14:52:48 +00:00
Beverly
24d103b16a Add READ_CONTACTS permission to NoManSerTest shell
Test: atest SystemUITests
Fixes: 149740458
Change-Id: I1ed768ee07dd13bdf6a8b1c8564618606b856ee8
2020-02-19 14:36:23 +00:00
Shawn Lin
10cab9d8df Merge "Fixed too much padding in QQS with top corner cutout" 2020-02-19 14:25:25 +00:00
TreeHugger Robot
2ae81c3c0f Merge "Update GraphicsStats proto definition" 2020-02-19 14:23:20 +00:00
Fiona Campbell
39ff0382e2 Set default float brightness constraint to invalid
The default setting is now invalid, so that if there is an overlay, it
is used and if not, the default int value is used.

Bug: b/149665432

Test: manual testing - ensure that the brightness value in
Settings>Display>Brightness Level can go the full range from 0% to 100%
(on a device without a float value in the overlay).

Change-Id: I52f3a66e33914bb91e05a6ae90f75d26dc002046
2020-02-19 14:22:07 +00:00
Fabian Kozynski
8698901a76 Merge "Properly check for changes in CellSignalState" 2020-02-19 14:16:40 +00:00
TreeHugger Robot
9b01e486fd Merge "Log more cross-profile metrics" 2020-02-19 14:14:07 +00:00
Automerger Merge Worker
2353495350 Merge "Tethering offload: add/remove IPv6 forwarding rules on ND events." am: 0568756e6e am: 8d78f124e7
Change-Id: Id5b10da43e6220bd75e2f61ce71a409cc97de2bc
2020-02-19 14:12:46 +00:00
Automerger Merge Worker
954d0c274f Merge "Minimal support for IPv6 upstreams in IpServer tests." am: fc7d7b5f0f am: 21d63cba5b
Change-Id: I416ec5fe9817a2ef63624622f1bc424eb4f3d350
2020-02-19 14:12:33 +00:00
Chalard Jean
d68b7e75f2 Merge changes I56109847,I7d815f87,Ic9a3d336
* changes:
  [NS D07] Use the unmodified legacy score
  [NS D06] Implement more policies
  [NS D05] Rework how to tear down networks
2020-02-19 14:07:09 +00:00
Martijn Coenen
961709fbab Merge "Fixup OBB directories correctly after package install." 2020-02-19 14:02:25 +00:00
Alex Kershaw
3e3f4964a6 Enforce the cross-profile intent check.
DocumentsUI currently hard-codes the IntentForwarderActivity class name.
It uses this to determine whether to show a 'switch to personal profile'
button. Essentially, it wants to know if the intent it received is a
cross-profile intent, so it asks package manager which intents can
resolve it and checks whether one of them is IntentForwarderActivity.

This is not CTS-enforced, so this CL ensures that it is. OEMs can remove
or rename IntentForwarderActivity as long as they update this API and
keep the corresponding CTS test passing.

Bug: 149568382
Bug: 136249261
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.ManagedProfileCrossProfileTest#testCrossProfileIntentFilters
Change-Id: I51916c13320420068987925ac979e59bef3b660d
2020-02-19 14:01:23 +00:00
Automerger Merge Worker
8d78f124e7 Merge "Tethering offload: add/remove IPv6 forwarding rules on ND events." am: 0568756e6e
Change-Id: I7bdccf56e576757c1fd9e1f39767b86ac59fd328
2020-02-19 13:51:15 +00:00
Automerger Merge Worker
21d63cba5b Merge "Minimal support for IPv6 upstreams in IpServer tests." am: fc7d7b5f0f
Change-Id: If0f89231a74da9f38fc1ba19f914a7d4e359f9e3
2020-02-19 13:50:22 +00:00
Alan Stokes
7e5c966482 Merge "Don't destroy ART profiles after package move." 2020-02-19 13:45:27 +00:00
Peter_Liang
81332eff4a Revise the modifier and naming of public APIs for allow rich content.
Change "int getAnimatedImageRes()" to "Drawable loadAnimatedImage(PackageManager packageManager)"

Bug: 142532186
Test: atest AccessibilityShortcutInfoTest & manual test
Change-Id: I2583a5c2427449bca68af29a0a40215dd0cb9085
2020-02-19 21:41:10 +08:00
Lorenzo Colitti
0568756e6e Merge "Tethering offload: add/remove IPv6 forwarding rules on ND events." 2020-02-19 13:41:10 +00:00
Lorenzo Colitti
fc7d7b5f0f Merge "Minimal support for IPv6 upstreams in IpServer tests." 2020-02-19 13:38:00 +00:00
Anton Hansson
646cc67c49 Remove unused filegroup
Test: m
Change-Id: Ia83b310abdd9fb2a1343fe899758584510c5d421
2020-02-19 13:33:36 +00:00
TreeHugger Robot
f348b9f3bf Merge "Increase granularity of gesture dispatch to 60fps" 2020-02-19 13:21:46 +00:00
Chalard Jean
ff83b0e467 [NS D07] Use the unmodified legacy score
Ranking used to make use of the various adjustments in
ConnectivityService. These are now implemented in policy.

Test: ConnectivityServiceTest

Change-Id: I56109847678ea5cda1752511123ba652c0f4fe36
2020-02-19 22:17:13 +09:00
Chalard Jean
e9fd5a7229 [NS D06] Implement more policies
Namely :
• Explicitly selected policy
• VPN policy
• Validated policy

These go together to avoid breaking any test, because multiple
tests rely on all of these working.

Test: ConnectivityServiceTest

Change-Id: I7d815f87320c2becbfc93a60a3c54346ff4f47c9
2020-02-19 22:17:12 +09:00
TreeHugger Robot
d0f257ebb6 Merge "Show a line below the tabs in tabbed view to align with UX mocks." 2020-02-19 13:01:27 +00:00
TreeHugger Robot
69ae2cc335 Merge "Fix NPE happened in the constructor of SystemMediaRoute2Provider" 2020-02-19 13:00:34 +00:00
Anton Hansson
147ab024ae Build statsd framework jar against module_current
Clean up the aidl src glob.

Bug: 145796956
Test: m
Change-Id: I5f476dd87f625d33bf21196f9bfcb7789e0b4d06
2020-02-19 12:49:30 +00:00
Pavel Grafov
4513e24323 Add "Forgot my password" to start profile in locked state.
Feature is disabled on non-FBE devices since the profile user will
end up in RUNNING_UNLOCKED state.

Bug: 143516540
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: manual
Change-Id: Ib87492577b4e5153a8108036af89c547e4bb76ee
2020-02-19 12:44:12 +00:00
Alan Stokes
858ca2424b Don't kill a new process for the sins of an old process.
I have a test which instruments com.android.vending, which contains
some content providers.  Each test case starts the app and then fairly
quickly kills it. I doubt it ever gets to the stage where the content
providers are working.

When the test runs slowly enough, a new instance of the app gets
killed 10s after an old instance was started, which breaks
things. That seems like the wrong behavior in general, although it
should be rare.

This change attempts to prevent that happening by cleaning up any old
timeout messages for the app when we restart it.

Bug: 149150665
Test: atest FrameworksCoreTests:android.content.ContentResolverTest
Change-Id: I1b04eab6b0fd3d24c0a2ee315818d58de4c5915d
2020-02-19 12:37:56 +00:00