If the device owner has set DISALLOW_REMOVE_MANAGED_PROFILE,
and there is already a managed profile:
it should be allowed to provision a new managed profile by
deleting the old one.
Test: adb shell am instrument -e class
com.android.server.devicepolicy.DevicePolicyManagerTest
-w
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
BUG:34116228
Change-Id: I9e6f39924107aee40b57d22e638487a1ea3132de
Two of the tests were actually checking the same thing. Removed one.
Refactore another test to make it easier to read.
Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
BUG:32629873
Change-Id: Id4ca9bd8c113a858b016fb02d04bf4c76bbcb027
Make sure to fill the portions that are not covered by the
snapshot are filled with the task background color.
Also fix an issue where the starting window was removed across
configuration changes.
Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotSurfaceTest
Bug: 31339431
Change-Id: I2451be87aff79b337015ab4bba72cfa03c0d3582
This avoids sizing issues and allows us to be accurate within
a subset of the users, rather than less accurate over the entire
user base.
Bug: 34457425
Test: services instrumentation tests
Change-Id: Ic460a564a9ab9805c7739b4f40502e96bbfe7953
Cancel should always remove notifications, regardless of whether
they've been posted internally. Primarily accomplished by ensuring
all cancels happen on the same handler, and that they check the
enqueued list as well the main notifications list.
Also fixes snoozing for enqueued notifications, since it is
implemented via cancelling.
Test: runtest systemui-notification
Change-Id: If8295a38102f245013d29831a060fabd80716e4b
Introduce a retrieval cache that holds the last accessed
snapshots, in addition to the cache of the activities
that are the top most activtiy of a task that have a
running process.
Change everything to use an integer id instead of a Task object
to work around the issue that some tasks SystemUI might access
might not exist in WM yet (not yet restored from recents).
Don't put anything in the cache on the SystemUI side, but still
retrieve the thumbnails after a task changed event to make sure
the cache on the system_server side is fresh.
Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotCacheTest
Bug: 31339431
Change-Id: I8e56365459a677735320adaa169da8fb033ceab0
MultiProcess WebView will use a Service to start a separate process (the
renderer process). This Service can only be started if the WebView
package is enabled for the current user. To ensure that the current
WebView package is usable by all users on a single device we now only
use a WebView package as WebView implementation if that package is
enabled and installed for all user on the device. This also means that
the WebView-fallback mechanism will trigger when disabling the primary
WebView package for any user (not just the system user).
Also add multi-user unit tests to cover this new change.
Bug: 32894152
Test: run unit tests in WebViewUpdateServiceTest
Test: ensure the standalone WebView package becomes enabled (for all
device users) when disabling Chrome for a secondary user.
Test: load WebView (both using Monochrome, and using the standalone
WebView).
Change-Id: Iad3fc48aa50273062c2f29ae48a343c2dea38116
This change adds support for static shared libraries that
emulate static linking allowing apps that statically link
against the same library version to share a common
implementation. A library is hosed by a package in a standard
APK.
Static shared libraries have a name and a version declared
by a dedicated manifest tag. A client uses also a new tag
to refer to the static library it uses by specifying the
lib name, version, and the hash of the signing certificate.
This allows two apps to rely on two different library versions
and prevents impersonation of the shared library by a side-loaded
app with the same package name.
Internally apps providing static libs use synthetic package
name generated from the manifest package name and the library
version. This allows having different "versions" of the same
package installed at the same time.
An application cannot be installed if a static shared lib it
depends on is missing. A used shared library cannot be uninstalled.
Shared libraries can rotate certificates like normal apps. The
versions of these libs should be ordered similarly to the version
codes of the hosting package. Such libs cannot use shared user
id, cannot be ephemeral, cannot declare other libraries, cannot
rename their package, cannot declare child-packages. They must
target O SDK. Also they cannot be suspended or hidden or their
uninstall blocked. Generally, speaking policy regarding code in
static shared libs should be applied to the packages using the
library as it could have just statically linked the code.
We now have APIs to query information about the shared libraries
on the device in general. To clients static shared libraries are
presented as multiple versions of the same package which is how
they are declared and published. Therefore, one can have two
versions of the same package which means we need way to query
for and uninstall a specific version of a package. Also static
shared libs can depend on other static shared libs which are
versioned packages. To ease representation we add the concept
of a versioned package which should be used in the case of
static shared libs.
A client can see only the static shared libs it depends on and
more specifically only the versions it depends would be retrieved
by using the standard package manager APIs. There is a new
dedicated API to get info about all shared libraries which
would provide data about all static shared lib versions. Also
these libraries must use v2 signing scheme.
Test: CTS tests pass
bug:30974070
Change-Id: I4f3d537ee7a81f880950377b996e1d9d4813da5c
- System UIDs must be allowed to launch anything and everywhere.
- Display owner must be allowed to launch activities on it.
- Apps that are already on target display must be allowed to launch
there.
- All other apps mustn't be allowed to launch on private displays.
Bug: 34230873
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testPermissionLaunchFromSystem
Test: #testPermissionLaunchFromAppOnSecondary
Test: #testPermissionLaunchFromOwner
Test: #testPermissionLaunchFromDifferentApp
Change-Id: Ic98005649a6368370c512e822cba4e9decc18ae9
So they can be used again after rebooting or when the process gets
killed, but the snapshot is still used for recents.
Also implement TaskSnapshotLoader, to restore it from disk. The
infrastructure around restoring and caching snapshots for recents
will be implemented in the next CL.
Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotPersisterLoaderTest
Bug: 31339431
Change-Id: Iaec03c4cc92e04b6dd7e623bca755ddc92613bce
Removing accessibility gesture from power dialog.
Adding new accessibility shortcut activated by holding both volume
buttons down. This shortcut is configurable by OEMs and users to
work with any installed accessibility service.
Bug: 30160335
Test: Added automated testing for the EnableAccessibilityController.
Manually toggled various services on and off.
Change-Id: I546bd29a2ab1ba64a0cbfd11e2004cdf85ee6cfd
Expanding the API so it can accept the WiFi config of the currently
connected network (if any) and the set of connectable WiFi
configurations. Also renamed currentRecommendedWifiConfig to
defaultWifiConfig so the name was more representative of the
parameter's purpose and added more documentation throughout.
Test: adb shell am instrument -e class android.net.RecommendationRequestTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w com.android.networkrecommendation.tests/android.support.test.runner.AndroidJUnitRunner
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34387385
Change-Id: I1089b70303b0396def7e6bf3737fdc67e40c9dcd
as a result of Intent.ACTION_CREATE_SHORTCUT
> Adding API to allow launchers to query shortcut config activities in
managed profiles.
> Adding API to allow the default Launcher to start the shortcut config
activity in managed profiles.
> Updating the ACTION_CREATE_SHORTCUT documentation to represend changes
in the expected result.
Test: Manual tests and all the unit tests
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to test10
Change-Id: I785c4f2fba782b864cc401ac7905330ea4498289
To inform the user which apps were granted permissions by the admin,
the Settings app needs to access this information without being a DO/PO.
Bug: 32692748
Test: FrameworksServicesTests unit test
Change-Id: I3770ec6343b85be9c6f7655675ed6db5cb50612c
1) Started returning the default value for getLong() on SystemProperties mock
2) Added a test that the minimum timeout cannot be changed using a system
property on non-debuggable builds
3) Added new within range test for completeness.
4) Started using TimeUnit instead of ms constants.
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Bug: 34317979
Change-Id: I0409451ae39e74ec3d96a098042302291ec3408f