Commit Graph

89200 Commits

Author SHA1 Message Date
Phil Weaver
1317162eb4 Notify a11y when view attached to parent
Bug: 73493821
Test: Verifying that vibration settings UI works
properly.

Change-Id: Id3c9e87fdd0ad5c49d8bd6e86b2c15977c9b09ca
2018-04-03 11:40:44 -07:00
Nathan Harold
80a2bba9a6 Merge "Add AppOps Checks for MANAGE_IPSEC_TUNNELS" into pi-dev 2018-04-03 18:24:31 +00:00
Nathan Harold
592dadbd43 Add AppOps Checks for MANAGE_IPSEC_TUNNELS
Adds support for a new AppOp to permit services to
use IpSec tunnel mode. The IpSecService now needs
a context so change the service mode to a cached
service rather than a static service.

Bug: 66955045
Test: runtest frameworks-net
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4
2018-04-03 18:23:11 +00:00
TreeHugger Robot
3275d9a004 Merge "Camera: sort getCameraIdList output" into pi-dev 2018-04-03 17:13:39 +00:00
Seigo Nonaka
3a2d4143ee Merge "Make getText hidden and getWidth/getBounds public" into pi-dev 2018-04-03 15:54:49 +00:00
TreeHugger Robot
7451945364 Merge "Camera: Update external camera orientation guidelines" into pi-dev 2018-04-03 12:57:19 +00:00
Sanry Huang
7a8aac8c6e Merge "android:ui crash on longpress of empty tile" into pi-dev 2018-04-03 02:22:48 +00:00
TreeHugger Robot
41d6d7c424 Merge "Revert "Throw invalid cert exception when deprecated initRecoveryService method"" into pi-dev 2018-04-03 01:55:30 +00:00
Bo Zhu
1364455fd7 Merge "Expose the JNI scrypt function in a standalone Java class so we can use it in RecoverableKeyStore as well" into pi-dev 2018-04-03 00:28:43 +00:00
Dmitry Dementyev
0f23660488 Revert "Throw invalid cert exception when deprecated initRecoveryService method"
This reverts commit 50bc7e42d7.

Reason for revert: API is still used by old binary

Change-Id: I3c8348211baa26245786abda6360a8df96e2d223
Bug: 77293264
2018-04-03 00:19:27 +00:00
Gil O'Neil
c610677258 Merge "Made a note that app names may not contain delimiter characters" into pi-dev 2018-04-02 23:42:01 +00:00
Remi NGUYEN VAN
cccd67b574 Merge "Fix network usage stats on 464xlat tethered." into pi-dev 2018-04-02 23:09:50 +00:00
TreeHugger Robot
4ccefebb78 Merge "Camera: fix errorFlag logic" into pi-dev 2018-04-02 23:04:42 +00:00
Bo Zhu
09856135e3 Expose the JNI scrypt function in a standalone Java class so we can
use it in RecoverableKeyStore as well

Bug: 77325751
Test: It builds. No caller code yet.

Change-Id: I6ff847cff2efbd023612e51fe35be980f27f162d
2018-04-02 15:47:08 -07:00
Mihai Popa
285797a45a Merge "[Magnifier-38] Avoid deadlock causing ANR" into pi-dev 2018-04-02 22:42:17 +00:00
Lorenzo Colitti
3cafea0701 Merge "Allow applications to query for foreground/background data usage." into pi-dev 2018-04-02 22:20:03 +00:00
TreeHugger Robot
0594af6dc3 Merge "Add ROLLBACK past signing cert capability." into pi-dev 2018-04-02 22:07:29 +00:00
Dianne Hackborn
886fc6aef0 Merge "Work on issue #74404949: Screen state usage API" into pi-dev 2018-04-02 20:48:51 +00:00
Daniel Cashman
629a5f9705 Add ROLLBACK past signing cert capability.
Add a new capability that may be granted to past signing certificates
after changing to a new signing certificate that will allow applications
to go back to a previous signing certificate.  This capability is
intended to not be granted, but may be added later in the event that
a signing certificate change caused undesirable behavior.

Bug: 73927694
Test: PkgInstallSignatureVerificationTest
Change-Id: I7453a2da00e740a55de45e7b144f308a9bc33772
(cherry picked from commit a1d0cf74f9)
2018-04-02 20:12:14 +00:00
TreeHugger Robot
3f6b7714a7 Merge "Don't use a copy of window params when showing a dialog." into pi-dev 2018-04-02 19:22:58 +00:00
Mihai Popa
5d983d2ba9 [Magnifier-38] Avoid deadlock causing ANR
A deadlock between the UI and render threads caused by magnifier is
currently making the running app to become not responding. The deadlock
could happen in the following scenario:
1. The UI thread sets a frame callback and asks mRenderer to sync and
draw the current frame. A draw task is enqueued by RenderProxy in the
C++ code
2. The UI thread starts an InternalPopupWindow#destroy() on the UI
thread and acquires mLock
3. mRenderer#destroy() is called on the UI thread, which enqueues a
destroy task in the C++ code. However, this is implemented
synchronously, so the UI thread will wait until the destroy task is
dequeued and executed
4. Since the draw task was enqueued before the destroy task, this will
be executed and the frame callback will be called on the render thread
5. The frame callback tries to acquire mLock. However, this is held by
the UI thread, so the render thread has to wait for it. At the same
time, the UI thread cannot progress either as it is waiting for its
destroy task to execute.

The CL adds a new lock which is used by the UI thread to mark its
intention to #destroy(), such that the render thread will know about
this before trying to acquire mLock and starving.

Bug: 75276625
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Iedf2948350fcf8dd9c819c085b31b7ccaf2db7c5
2018-04-02 18:18:55 +00:00
Andrii Kulian
38af02e75b Merge "Don't finish activity on duplicate resume request" into pi-dev 2018-04-02 17:58:42 +00:00
Sudheer Shanka
8303baf4d0 Merge "Update uid state used for bucketizing data in fg vs bg states." into pi-dev 2018-04-02 17:34:16 +00:00
Felipe Leme
15d403dd6a Don't use a copy of window params when showing a dialog.
When a Dialog's show() method is called, it makes a copy (l) of its window param
and change the copy's softInputMode before calling wm.addView(). This call ends
up calling WindowManagerGlobal.addView(view, l, display, parentWindow),
which in turn sets the application token from the parentWindow into l and stores
l on its mParams map.

Later, when the dialog layout is changed (for example, if it's resized), the
original params ends up passed to WindowManagerGlobal.updateViewLayout(),
which in turn updates it's internal mParams with it, hence losing the
application token (as the token was set in the copy).

Then, when Autofill (and possibly Assist) is triggered to that activity, the
Dialog's view hierarchy is ignored because WindowManagerGlobal.getRootViews()
ignores views whose params do not have an application token.

This CL fixes this issue by passing the original dialog's param to the wm
method and resetting the softInputMode that was changed, rather than making a
copy.

Test: atest DialogLauncherActivityTest
Test: manual verification with Twitch

Fixes: 68816440

Change-Id: I55f510ab7a44030bc368221b7db1a221bc2e09c8
2018-04-02 10:07:40 -07:00
Seigo Nonaka
151108a2c6 Make getText hidden and getWidth/getBounds public
This is from advice from API review.
- make getText() hidden
- make getWidth()/getBounds() public.

Bug: 76448719
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: Ic22a266a932cda60de6d8b37b8bbf5704291b953
2018-04-02 09:58:47 -07:00
TreeHugger Robot
7f5670fdcd Merge "Make addUnwantedCapability method public" into pi-dev 2018-04-02 15:07:25 +00:00
TreeHugger Robot
ffe1c2a266 Merge "Restore saveLayer APIs back into the public API." into pi-dev 2018-04-02 14:28:48 +00:00
Remi NGUYEN VAN
75525b39f4 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Merged-In: Ieb25c41c651499fdd01225ae5ac21d95e3d823f5
Merged-In: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
(cherry-pick of aosp I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda)

Change-Id: Id41cf22a0f9a63cb1832e9375bfb045861f08e52
2018-04-02 13:30:02 +00:00
Lorenzo Colitti
84b317cecf Allow applications to query for foreground/background data usage.
Currently the NetworkStatsManager APIs allow applications to
query for their own data usage by UID and tag, but do not allow
applications to query by foreground/background state.

This is causing popular apps to resort to parsing xt_qtaguid
stats files directly. Because this is no longer allowed for apps
targeting P and above, provide replacement functionality.

This API allows apps to query for data usage for a given state,
but not to receive data usage broken down by state. This is
consistent with how the current UID and tag APIs work. It is also
not an undue burden on apps: there are currently only two states
of interest (FOREGROUND and everything else), and even if we add
states in the future, unmodified apps can still obtain total
traffic using STATE_ALL.

Bug: 72977484
Test: New CTS test added in other change in this topic.
Change-Id: Ic8c9194569ffd599b49e4a8197c5c2ea0ec3f7f7
2018-04-02 19:58:24 +09:00
TreeHugger Robot
bf9dfb16be Merge "TextClassifier API updates." into pi-dev 2018-04-02 09:08:52 +00:00
Remi NGUYEN VAN
6f5a8db2e9 Merge "Add method to NetworkStatsService for UID stats." into pi-dev 2018-04-02 05:40:04 +00:00
TreeHugger Robot
138148425c Merge "Fills font metrics before passing to ReplacementSpan" into pi-dev 2018-04-02 03:50:26 +00:00
Dianne Hackborn
21306849e6 Merge "Fix issue #77230164: Add app op to control foreground services" into pi-dev 2018-04-01 22:26:18 +00:00
TreeHugger Robot
4ab18af48a Merge "[Magnifier-36] Fix content clamping inside view" into pi-dev 2018-04-01 20:31:28 +00:00
Dmitry Dementyev
bf08774704 Merge "Throw invalid cert exception when deprecated initRecoveryService method is used." into pi-dev 2018-04-01 19:34:31 +00:00
Abodunrinwa Toki
080c8542b6 TextClassifier API updates.
1. Wraps TC queries in Request objects
2. Adds create/destroyTextClassificationSession system APIs
3. Adds the session Ids to system API calls
4. Change setSignature() to setId() on result objects
5. Plumbing to make the API updates work as things currently work
6. Hide Linkify.addLinksAsync APIs

Bug: 74461129

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Change-Id: I933ada8b37ef9893331a265e3b4fc08e043f1029
2018-04-01 20:04:47 +01:00
Mihai Popa
6e44808890 [Magnifier-36] Fix content clamping inside view
We try to never display in the magnifier content that does not belong to
the magnified view. If the magnified view has one or more scrollable
containers, these have to be considered in order to find out the visible
portion of the view which is not masked by scrollable containers.

The previous logic for computing the visible region was wrong when one
of the containers was a ViewPager, whose getScrollX() returns the scroll
relative to all pages, rather than the currently visible one as the
logic was expecting. This CL replaces the old logic with a
View#getGlobalVisibleRect().

Bug: 74359490
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Ib6b63a35436aa691f29c13a0789688f23bfca9f1
2018-04-01 18:59:37 +00:00
Bo Zhu
0b8c82e660 Throw an exception if the given root alias is unknown
Bug: 76433465
Test: runtest frameworks-services -p
com.android.server.locksettings.recoverablekeystore

Change-Id: I3a213ab0cd3b0e9c002bc44d4ce929977e119e81
2018-03-31 21:35:28 -07:00
TreeHugger Robot
e1059d9f5e Merge "Renamed KeyFallbackEvent to UnhandledKeyEvent and exposed dispatch" into pi-dev 2018-03-31 17:39:18 +00:00
Dmitry Dementyev
50bc7e42d7 Throw invalid cert exception when deprecated initRecoveryService method
is used.

Throw unsupported operation exception when older version of RecoveryController is used.

Bug: 77293264
Test: atest RecoveryControllerHostTest
Change-Id: I0003104a4305444fac0092f4f6929545cf7c9413
2018-03-31 00:49:23 -07:00
TreeHugger Robot
703f31db63 Merge "Add subtype for layout direction to Slice" into pi-dev 2018-03-31 04:16:35 +00:00
sanryhuang
296ca9e933 android:ui crash on longpress of empty tile
null pointer check because of resolveInfoForPosition is nullable

Test: manual
Bug: 62441400
Change-Id: I0a720f30f9e76d9bedf6175a6ba951bcf1707c47
2018-03-31 11:34:34 +08:00
TreeHugger Robot
374f6a26f9 Merge "Fingerprint user canceled message should not be delayed" into pi-dev 2018-03-31 01:52:37 +00:00
TreeHugger Robot
8b60ebc6a6 Merge "Expose e.getMessage() from the exceptions in RecoverableKeyStore" into pi-dev 2018-03-31 00:56:22 +00:00
Dianne Hackborn
3378aa9f88 Work on issue #74404949: Screen state usage API
Add events for the keyguard being shown and hidden.

Bug: 74404949
Test: atest CtsUsageStatsTestCases:UsageStatsTest\#testInteractiveEvents
Change-Id: I038e03cf4ba80669d7d17c3d66b98ee81050abc8
2018-03-30 17:43:49 -07:00
TreeHugger Robot
a6d6a5aa79 Merge "Adding LauncherApps apis for suspended packages" into pi-dev 2018-03-31 00:39:52 +00:00
TreeHugger Robot
35201a6af2 Merge "Add some methods to manage slice permissios" into pi-dev 2018-03-31 00:26:06 +00:00
TreeHugger Robot
d05c00fbb6 Merge "Require signing cert history certs to be unique." into pi-dev 2018-03-30 23:35:54 +00:00
Kevin Chyn
c50aded51d Fingerprint user canceled message should not be delayed
The user canceled message is different than the other fingerprint errors
since it is caused by the user explicitly tapping on the UI at which
point the dialog will be already dismissing/dismissed. So the error
should be sent immediately to the application.

Test: manual test with FingerprintDialog, modified to show when the
      error messages are received

Change-Id: Ia2a3b0a7ac9c8cfcbd6055045a95fc06aa02c61a
Fixes: 77337939
2018-03-30 15:31:18 -07:00
Benedict Wong
35147b2dae Merge "Disallow Reserved SPI Allocation" into pi-dev 2018-03-30 22:29:26 +00:00