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
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
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
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
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
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
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
- 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
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
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