Commit Graph

14574 Commits

Author SHA1 Message Date
TreeHugger Robot
490f35034e Merge "Remove references to system-user-whitelisted-app" 2020-07-24 16:37:04 +00:00
Soonil Nagarkar
e76bbe2da2 Merge "Assorted cleanup and refactoring" 2020-07-24 03:34:19 +00:00
Soonil Nagarkar
afec5ccf72 Assorted cleanup and refactoring
Will minimize future changes:
-Never return null GpsStatus to avoid breaking legacy clients
-Allow null location callback complete callbacks
-Return void from sendExtraCommand
-Combine appops and permissions checks into a single helper
-Allow passive provider to remember last locations even when there is
no active passive request.
-Add a couple new injectable helpers to support future changes along
with fakes for testing.

Test: presubmits + manual
Change-Id: If22bee787c5ab5c8c09d20e4742a8b5d1b7f0b59
2020-07-23 13:50:15 -07:00
Jiyong Park
5a63c65998 Merge "Introduce uses-native-library tag" 2020-07-23 08:56:41 +00:00
TreeHugger Robot
dd349767cb Merge changes from topic "privacy_chip_master"
* changes:
  Restricts notified app ops based on flags
  Add back privacy chip
2020-07-22 20:03:10 +00:00
Fabian Kozynski
882116eea1 Add back privacy chip
This adds back the privacy chip classes (Controller and view).

Change to using Executors and DeviceConfigProxy, also fix tests that
were flaky before.

Test: SystemUITests
Test: enabled hub and see chip appear (after re-opening QS)
Bug: 160966908
Change-Id: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
2020-07-22 10:34:17 -04:00
Sergey Nikolaienkov
9c9fb8870f Merge "Wire test API to reset the state of AppErrors" 2020-07-22 12:14:40 +00:00
Adam Bookatz
dc33904acb Remove references to system-user-whitelisted-app
The two SysConfig xml tags
system-user-whitelisted-app
system-user-blacklisted-app
are deprecated and were never used.

Bug: 139547572
Bug: 137101239
Test: compiles
Change-Id: I0a5a8cb9b178a3742ddc1fe70b9ee1e2737abdba
2020-07-21 23:35:04 +00:00
Jiyong Park
6a5b8b1f6d Introduce uses-native-library tag
Since Android 7.0, partners were able to export some of their native
shared libraries to apps. So far, the native libraries were provided to
all apps regardless of whether they are actually needed or not. Even
worse, it was impossible to prevent the installation of an app to the
device where the some (or all) of the required native libs don't exist;
the apps had to manually handle the case, which sometimes impossible
when the dependency is so fundamental.

This change introduces a new tag <uses-native-library> to the app
manifest. Similary to the existing <uses-library> tag which is for
(java) shared libraries, the new tag is used to describe the depedencies
to the native shared libraries.

Apps targeting Android S or higher are required to use the tag to import
the native shared libraries. Libraries that are not depended on won't be
available to the app even if the libraries are listed in the
public.libraries*.txt files. Furthermore, when the dependency can't be
satisfied for an app, the package manager refejects installing the app.

The dependency can be optional using the `android:required` attribute.
When it is set to true, the absence of the lib on the device doesn't
prevent the app from being installed. However, the app has to gracefully
deal with the absence.

The changed behavior only affects apps targeting S or higher. Existing
apps are unaffected; they still get all the public native libraries
regardless of whether they have <uses-native-library> tags or not; the
tags are simply ignored.

This is the first version of the implementation and therefore needs
further refinements. The followings are two major TODOs.

1) The native shared lib dependencies of the java shared libraries
are not enforced. For example, if an app depends on a java shared
library foo and foo depends on some native shared libraries, the
classloader where code from foo is loaded still gets all native shared
libraries. This should be fixed.

2) New APIs should be added. SharedLibraryInfo should be extended to
represent native shared libraries. The meaning of
ApplicationInfo.sharedLibraryFiles should be revised. Finally, the new
tag should be made public.

Bug: 142191088
Test: atest CtsUsesNativeLibraryTest
Change-Id: Iceb038aa86872d23e9faf582ae91b1fdcaf5c64c
2020-07-21 08:42:00 +09:00
Zhen Zhang
b658122b70 Merge "Scroll the hiding page to top on tab changed in sharesheet" into rvc-qpr-dev am: cfeb7627b7 am: f0bcb15f2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12159211

Change-Id: I5583f0cbd80a08deb073caabc76db918ab869bd8
2020-07-20 20:02:31 +00:00
Zhen Zhang
f0bcb15f2b Merge "Scroll the hiding page to top on tab changed in sharesheet" into rvc-qpr-dev am: cfeb7627b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12159211

Change-Id: I7e24275da391682facfdbb14b09bb6051ea1b09f
2020-07-20 19:44:30 +00:00
Zhen Zhang
cfeb7627b7 Merge "Scroll the hiding page to top on tab changed in sharesheet" into rvc-qpr-dev 2020-07-20 19:29:20 +00:00
Michael Wright
54ae0a7ce9 Merge "Fix color mismatch of pointers" am: e1c169c983 am: 23ff2399a1 am: 6cddd8d6b7 am: 45a25dc11b am: bb3eec1b51
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362517

Change-Id: Iad6662ed4026f10ee3cf13c2e92cb84e007a6cbb
2020-07-20 19:23:25 +00:00
Michael Wright
bb3eec1b51 Merge "Fix color mismatch of pointers" am: e1c169c983 am: 23ff2399a1 am: 6cddd8d6b7 am: 45a25dc11b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362517

Change-Id: I55b3072811a9f11ab88c886b48707217d688fc70
2020-07-20 19:00:26 +00:00
Michael Wright
6cddd8d6b7 Merge "Fix color mismatch of pointers" am: e1c169c983 am: 23ff2399a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362517

Change-Id: I52a57b66d2651b8fed6f80740b3463feb0a5c928
2020-07-20 18:06:50 +00:00
Michael Wright
e1c169c983 Merge "Fix color mismatch of pointers" 2020-07-20 17:28:16 +00:00
Adrian Roos
0c3233eb59 Merge "Fix hiding keyboard animation stuck while dialog dismissing." into rvc-dev am: dac09ee7fe am: 0a49dd38a2 am: 869a1892db am: 35fc2fdf6c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12174530

Change-Id: Ieaaeaaba7f061b4c651f7c0726332292872dcb99
2020-07-17 22:12:44 +00:00
Adrian Roos
35fc2fdf6c Merge "Fix hiding keyboard animation stuck while dialog dismissing." into rvc-dev am: dac09ee7fe am: 0a49dd38a2 am: 869a1892db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12174530

Change-Id: Iac68c18c16c10c794e1f462ccaedeed656fc6a5b
2020-07-17 21:51:58 +00:00
Adrian Roos
f9ea2989dd Merge "Fix hiding keyboard animation stuck while dialog dismissing." into rvc-dev am: dac09ee7fe am: 7df40a82f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12174530

Change-Id: I252e2c0b62cf955c7ce2c7fafde18e0b51a9743e
2020-07-17 21:40:18 +00:00
Adrian Roos
0a49dd38a2 Merge "Fix hiding keyboard animation stuck while dialog dismissing." into rvc-dev am: dac09ee7fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12174530

Change-Id: Ifb04b0fd9c555d79d5c1b1ad7e348cf1532bd5b5
2020-07-17 21:24:56 +00:00
Adrian Roos
a24622cfcd Fix hiding keyboard animation stuck while dialog dismissing.
When dismissing a dialog with EditText focused and keyboard shown,
the keyboard does not get correctly dismissed.

This happens because after CL[1] landed, returning to the  activity won't start
new input connection, and the activity will thus not regain control over
the IME.

This fix restores the previous behavior, where  IMM will start a fake input
connection even without an editor.

[1]: I1ef3d341af9d473d94d52fd1890deafbae2bc9e1

Fix: 161273049
Test: atest CtsInputMethodTestCases
Test: manual as follows
     0) Have some files downloaded in the device
     1) Launch Files app > Browse > Click Internal Storage
     2) Long press on any file > From menu, click "Rename"
     3) Enter some name with soft keyboard and click "OK"
     4) Expect Keyboard should hide

Change-Id: I022ad658844142ff4a4cf3b91953013f2bfbb58a
2020-07-17 18:09:13 +02:00
Aaron Huang
d07f2fc343 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: d8b9f9fc07 am: 251d68487e am: ef48aef3ac am: 6350508edd am: 64bb3e63f7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1146757

Change-Id: I7965efe61d17ad96d1ff409b57c126e3c8f7fc78
2020-07-17 06:49:40 +00:00
Aaron Huang
64bb3e63f7 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: d8b9f9fc07 am: 251d68487e am: ef48aef3ac am: 6350508edd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1146757

Change-Id: Ifd73e18235961e33b61331753193bbdc2646b7a4
2020-07-17 06:30:55 +00:00
Aaron Huang
ef48aef3ac Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: d8b9f9fc07 am: 251d68487e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1146757

Change-Id: If60a348768c507153c1a9038953b2f6c29fc8f03
2020-07-17 06:05:38 +00:00
Aaron Huang
d8b9f9fc07 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" 2020-07-17 05:40:31 +00:00
Philip P. Moltmann
22187fa9a0 Merge "Carry attributionTag for DropBoxManager" 2020-07-16 23:23:13 +00:00
Songchun Fan
69131f8965 Merge "[resolver] only keep one preferred activity if selected with always=true" 2020-07-16 22:42:03 +00:00
Zhen Zhang
068ddf7b06 Scroll the hiding page to top on tab changed in sharesheet
After the tab changed, ResolverDrawerLayout will lose reference of the
hidden page which can cause the page not able to scoll back to top.
Automatically scroll on tab changed to avoid that situation.

Bug: 160886554
Test: manually test; atest ChooserActivityTest; atest
ResolverActivityTest

Change-Id: I1a8ba72f6b1dcb9bca19262b97983788001d715b
2020-07-16 14:06:35 -07:00
Songchun Fan
201c064d3b [resolver] only keep one preferred activity if selected with always=true
With this change, if user selects a preferred activity with "Always"
checked, there will only be one mAlways=true intent filter
for a given action.

BUG: 161394369
Test: manual
Test: atest FrameworksServicesTests
Change-Id: I3d5ee0130f6f07530bb53f9c1509d5121a46a34a
2020-07-16 13:15:31 -07:00
Philip P. Moltmann
1cb4c72c3a Carry attributionTag for DropBoxManager
- Use PermissionChecker instead of manully implement permission check
- Need to keep old @UnsupportedUsage method

Fixes: 161443379
Test: atest CtsAppOpsTestCases:android.app.appops.cts.AppOpsLoggingTest#getNextDropBoxEntry
Change-Id: I5c3290c23312e8009a9345e8a58a6f734885f928
2020-07-16 13:09:56 -07:00
TreeHugger Robot
f2ee5d9309 Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev am: f65210f9ca am: eecfa86e8c am: 92418bd4b4 am: a0ed2f3880
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142032

Change-Id: I0bd28cdd5f65e664505483e59ee49bdb3bc5c5f9
2020-07-15 00:11:14 +00:00
TreeHugger Robot
a0ed2f3880 Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev am: f65210f9ca am: eecfa86e8c am: 92418bd4b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142032

Change-Id: Idc0ed32fcfadef86a5539ccb43718ef6f2e83ae1
2020-07-14 23:49:03 +00:00
TreeHugger Robot
83d9908e54 Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev am: f65210f9ca am: eecfa86e8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142032

Change-Id: I70c1072749ecd64c755a2f3e9f0fea95a6ab9bcd
2020-07-14 23:32:27 +00:00
TreeHugger Robot
92418bd4b4 Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev am: f65210f9ca am: eecfa86e8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142032

Change-Id: I38f4051f1f7735f89ef293063b6fd9d325d9d41b
2020-07-14 23:32:13 +00:00
TreeHugger Robot
382bbcdf4a Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev am: f65210f9ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142032

Change-Id: I382fb6432282027e0042bc7d63b5eafc9bd86a24
2020-07-14 23:15:32 +00:00
TreeHugger Robot
f65210f9ca Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev 2020-07-14 23:02:42 +00:00
xuejianbao
cdff2db6be Fix color mismatch of pointers
When drawing a point, it should be used the same index for coordinates and state.

Test: make
Signed-off-by: xuejianbao <xuejianbao@xiaomi.com>
Change-Id: I6d66e52b029d7b08663f62ab46125230b7f9a7c5
2020-07-14 18:42:41 +08:00
Adam He
4a1935d990 Updated docs for IInlineSuggestionsRequestCallback.aidl.
Fixes: 160729678
Test: atest android.autofillservice.cts.inline
Change-Id: Ie49267a594524651f0965296c164f7d1e0628cee
2020-07-13 15:28:28 -07:00
Kalesh Singh
566cc2f29d Merge "Don't cache suspend_control service" am: 1371e73894 am: da3a84e731 am: cc42fcbbc8 am: afe17a7045 am: 54b17ddbe6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360077

Change-Id: I361e4477463384ed2567a07645269ff7212091cb
2020-07-13 18:49:01 +00:00
Kalesh Singh
54b17ddbe6 Merge "Don't cache suspend_control service" am: 1371e73894 am: da3a84e731 am: cc42fcbbc8 am: afe17a7045
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360077

Change-Id: I7ffd281376232b4ca71699dbc3f0f0d9c8367599
2020-07-13 18:38:18 +00:00
Kalesh Singh
cc42fcbbc8 Merge "Don't cache suspend_control service" am: 1371e73894 am: da3a84e731
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360077

Change-Id: I18605eee1565df6476ea53990eaecf726335c6c0
2020-07-13 18:09:39 +00:00
Kalesh Singh
1371e73894 Merge "Don't cache suspend_control service" 2020-07-13 17:39:22 +00:00
Kalesh Singh
d781ff68f1 Don't cache suspend_control service
Caching a reference to the service can lead to a DeadObject if
if the service was restarted. Additially we attempt to wait for
the service if it is not immediately available.

Bug: 160741383
Test: atest FrameworksCoreTests:KernelWakelockReaderTest

Change-Id: If54d644a66bed8a0da6a2f5b34168cad8f954187
2020-07-13 14:58:00 +00:00
TreeHugger Robot
27c69329ab Merge "Don't update height if recycler view was scrolled" into rvc-qpr-dev am: a7f7189c11 am: f6d59d47f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12065946

Change-Id: Ic0099dc368438f4c453b4e05f73b764121efdc5d
2020-07-13 13:36:50 +00:00
Antoan Angelov
edccecc983 Merge "Add bottom offset to the intial padding rather than accumulating it." into rvc-qpr-dev am: f3c9998a48 am: 43e48bab7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12105703

Change-Id: Ib8e8cf61878f57e838c39e40fa0f6928a36b9a14
2020-07-13 13:36:29 +00:00
TreeHugger Robot
f6d59d47f0 Merge "Don't update height if recycler view was scrolled" into rvc-qpr-dev am: a7f7189c11
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12065946

Change-Id: I6c985b4cfab343e1adef1db586ca4357752f57b4
2020-07-13 13:25:50 +00:00
Antoan Angelov
43e48bab7d Merge "Add bottom offset to the intial padding rather than accumulating it." into rvc-qpr-dev am: f3c9998a48
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12105703

Change-Id: I1c4b37c1b980809351fea66ef4f66baff0931aab
2020-07-13 13:24:33 +00:00
TreeHugger Robot
a7f7189c11 Merge "Don't update height if recycler view was scrolled" into rvc-qpr-dev 2020-07-13 13:22:08 +00:00
Antoan Angelov
f3c9998a48 Merge "Add bottom offset to the intial padding rather than accumulating it." into rvc-qpr-dev 2020-07-13 13:14:32 +00:00
Alison Cichowlas
e2f6051eb8 Merge "Call toString instead of casting." 2020-07-13 13:09:41 +00:00