If the given precomputed text is not compatible with the TextView,
reject the text by throwing IllegalArgumentException.
Bug: 73091756
Test: atest CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
Change-Id: I4fbf89a5f1409e8eefdeb9f208f9a3758220fe1a
(cherry picked from commit 3a0787af5e)
restriction is on.
Check calling uid in isSettingRestrictedForUser(which is called by settingsprovider),
and only allow system_uid when certain user restriction is on, so that user won't be
able to change these settings with adb:
Settings.Secure.LOCATION_MODE,
Settings.Secure.PROVIDERS_ALLOWED,
Settings.System.SCREEN_BRIGHTNESS,
Settings.System.SCREEN_BRIGHTNESS_MODE,
Settings.System.SCREEN_OFF_TIMEOUT,
Settings.Global.AUTO_TIME,
Settings.Global.AUTO_TIME_ZONE.
This check also prevents 3rd party apps from modifying system settings value
when corresponding user restriction is on.
In addition, any attempt to change AUTO_TIME will also go through the check
for dpm.getAutoTimeRequired().
Test: manually by running the adb command with restriction set and not set
Bug: 72549013
Bug: 72548203
Bug: 72548533
Bug: 72686466
Bug: 72687105
Bug: 72940551
Bug: 72940562
Change-Id: I1d1fd20d9fa0f76f27905d62873f6a6e9af0224e
- Don't initialize a service wrapper with the cache lock held.
- Instead, use AtomicInteger to avoid instantiating the same service
multiple times.
Test: build, boot, presubmit
Bug: 71882178
Change-Id: Iea4207b855043addac4d24381778babf8eedd84d
We may get NPE if mCarrierIdentifier is null. + should convert it to
string by itself.
Test: test on phone
Merged-In: Ibd352d6d2a9b0cb33a494d108eb0d3a7c1dbc61b
Change-Id: Ibd352d6d2a9b0cb33a494d108eb0d3a7c1dbc61b
This config is used in aosp to auto restrict anomaly app.
Also add it to backup, dump and proto.
Bug: 73002171
Test: Build
Change-Id: I3d198e8856e2431f9ab7350a6dd897f1a6010002
Merged-In: I3d198e8856e2431f9ab7350a6dd897f1a6010002
(cherry picked from commit 1d9c0aa940)
- Added logic for streams to be muted by dnd (unassociated with ringer)
Test: runtest -x frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
Bug: 73362490
Change-Id: I1101e67282f7331497e91eb510d2bf4f1ea6b4b1
We want to catch potential exceptions that occur when restoring
NetworkPolicy settings. Here, a DateTimeException can be thrown when
we try to read the recurrence rule from the backup data and cannot
parse a timezone.
We also add GTS tests to validate that these catches persist and that
we don't crash when given unexpected backup data to restore.
Bug: 73942796
Test: gts-tradefed run gts -m GtsBackupHostTestCases -t com.google.android.gts.backup.NetworkPolicyRestoreHostSideTest
Change-Id: I6f6ea09d2fff60b8d704c6160234e6f032321103
(cherry picked from commit 853097ca2c)
Also include in system dump which packages are exempt from the api
restrictions.
This is a cherry-pick of 974290b032
from master.
Test: Verified that the device boots.
Bug: 64382372
Change-Id: Iaeca91478f53c8b4e9608246aab42bdb90f899bb
Addresses a long-standing TODO. Now, when calling IpClient's
startProvisioning(), the interface has to be available (i.e.
InterfaceParams#getByName() must return non-null).
Also:
- add a test
- refactor for testability
- delete some constructors no longer used
- properly handle passed-in null IpClient.Callback
- some more IpManager -> IpClient renaming
- permit recording metrics before starting a provisioning
attempt (logging immediate errors) without Log.wtf().
Test: as follows
- built
- flashed
- booted
- runtest frameworks/opt/net/wifi/tests/wifitests/runtests.sh passes
- runtest frameworks-net passes
- basic WiFi IpClient connections works fine
Bug: 62476366
Bug: 73487570
Merged-In: I68e5e24122dc31e730cdbe8d75e33847e6332da4
Merged-In: Ifd27f5d908947cd7b4e1b8d54f9fa87e43ebb11b
Merged-In: Ief3c8e1652f69af0276fe35946ae1bf6e6b1b57e
Change-Id: Ic83ad2a65637277dcb273feb27b2d1bb7a11eb2b
(cherry picked from commit b152cd0aa4)
Now requires permission if targeting P.
Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services. The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.
Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: I883c9515c307ed8e39f0bf888c4045944c8183ac
Bug: 36067387
Test: for C in {1..10}; do adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest$C \
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner; done
atest CtsDevicePolicyManagerTestCases:LauncherAppsSingleUserTest \
CtsDevicePolicyManagerTestCases:LauncherAppsProfileTest \
CtsDevicePolicyManagerTestCases:LauncherAppsMultiUserTest
atest CtsShortcutManagerTestCases
Change-Id: Ia4ddea58f66861ef760865b6d8831563584f85c9
Public WallpaperColors surface should not compute hints, malicious apps
might use theme inversion to slow down the system.
Change-Id: I9d14259e433b1047d2512b3d994524dca5e8531a
Fixes: 69532159
Test: set white wallpaper, black wallpaper, observe theme changing
Test: runtest -x services/tests/servicestests/src/com/android/server/wallpaper/WallpaperServiceTests.java