Commit Graph

6331 Commits

Author SHA1 Message Date
Yi Jiang
2e533939d4 Adds smart autorotate setting to the system.
Also adds a config flag for the smart autorotate to indicate whether the
feature is enabled.

Test: make RunSettingsRoboTests
Bug: 172370409
Change-Id: I23ff3247827dca188e10d0bd8f00c37e2cd0b920
2021-02-03 03:02:08 +00:00
Jiashen Wang
4419835ff3 Merge "Change Settings to be able to receive timeout values from LPA" into sc-dev 2021-02-01 23:56:37 +00:00
Neil Fuller
5e8177bf78 Merge "Add a constant for system_time to DeviceConfig" into sc-dev 2021-02-01 13:15:06 +00:00
Bernardo Rufino
bf1903d277 Merge "Open IM.getMaximumObscuringOpacityForTouch() and update docs." into sc-dev 2021-02-01 09:55:38 +00:00
Jiashen Wang
f3bed30575 Change Settings to be able to receive timeout values from LPA
Bug: 171846124
Test: Tested manually
Change-Id: Ib13aa832e186ae964069d888c1c4b8321a0f7fc1
2021-02-01 00:31:06 -08:00
Hall Liu
a749abcead Add support for integrating call composer
* Minor bugfix in call log to handle USER_CURRENT
* add TelephonyLocalConnection that allows frameworks/opt/telephony to
call code (indirectly) in packages/services/Telephony

Bug: 177613111
Test: atest CallComposerTest

Merged-In: I602b51da6009c884364a026781ca3c160978fbd1
Change-Id: I61af7553b4b3d71fe87c86fca62941747d43ef55
2021-01-28 12:28:25 -08:00
Neil Fuller
dfea9c4ab9 Add a constant for system_time to DeviceConfig
Add a constant for "system_time" to DeviceConfig for server-push feature
flags. "system_time" has been added server-side under cl/353067789.

This change references the new namespace for device-side config code.

This change is following the go/android-flags-setup process. Flags will
be added in follow up changes.

Bug: 159121373
Bug: 178107773
Test: build only
Change-Id: If49365cddc5827382ea4c466322c9fc65777d564
2021-01-28 18:26:41 +00:00
Bernardo Rufino
03ec50d528 Open IM.getMaximumObscuringOpacityForTouch() and update docs.
Bug: 158002302
Test: atest WindowUntrustedTouchTest
Change-Id: I735169e0508678e07431704f184a938ffada53cc
Exempt-From-Owner-Approval: Approved on main branch
2021-01-28 15:30:54 +00:00
Christine Franks
e8f6e92fe0 Merge "Add configurable mapping between color modes" 2021-01-26 23:16:12 +00:00
TreeHugger Robot
3cb20493af Merge "Hide AOD/LS layout changes" 2021-01-26 21:02:24 +00:00
Christine Franks
b776313816 Add configurable mapping between color modes
There are two categories of color modes: the standard color modes, which
are defined and implemented in AOSP, and a reserved range of vendor color
modes, which are defined and implemented by the vendor. Currently, there
is no way to distinguish between two vendor's color modes that use the
same value within the reserved range. This will allow OEMs to specify a
hint as to which vendor's color mode definitions were used on the
original device. If the hint from the restored device matches the hint
on the new device, the color mode from the restored device can still be
considered valid for the new device if it is within the vendor reserved
range. If it does not match, the restored device's color mode value is
invalid on the new device, and must be replaced by the default on the
new device.

Bug: 167449433
Test: builds
Change-Id: Ie5ac0a2d783e1ea703e0342f5cdb41dca07d04d4
2021-01-26 12:12:32 -08:00
Kohsuke Yatoh
386dfed00c Merge "Set FOREGROUND thread priority to 'fonts' thread." 2021-01-26 18:39:54 +00:00
Matt Pietal
9bade6ba98 Hide AOD/LS layout changes
Add support for new sysui overlay in order to disable aod/ls layouts
from the preview builds.

Bug: 178471752
Test: atest KeyguardUpdateMonitorTest
Change-Id: Iaf1dd2ba73368a3c43efe81c10aa9df42df6fdbe
2021-01-26 13:14:24 -05:00
Jason Hsu
806e4e12a0 Merge "Add key ACCESSIBILITY_FLOATING_MENU_FADE_ENABLED" 2021-01-26 03:44:37 +00:00
Yi Jiang
7a0969c65d Merge "Introduces RotationResolverService to the system" 2021-01-26 00:09:12 +00:00
Yi Jiang
0127af73ed Introduces RotationResolverService to the system
Rotation Resolver Service provides the suggested screen rotation
to the system server.

Bug: 162359770
Bug: 172370409
Test: atest RotationResolverManagerPerUserServiceTest
Change-Id: Ia43dfdba8502e04768933ef46a4ac8a687d4936c
2021-01-25 20:58:14 +00:00
Todd Kennedy
7fd1ba73f4 Revert "[SettingsProvider] @Readable annotation to restrict acce..."
Revert "[cts] tests for settings readable fields"

Revert submission 13355582-settings_readable

Reason for revert: b/178340718 b/178329499 b/178234427
Reverted Changes:
Id1f133d52:[cts] tests for settings readable fields
I8a2733580:[SettingsProvider] @Readable annotation to restric...

Change-Id: Ia55e58106e49ba411603bbadd8d909e22516293e
2021-01-25 11:17:14 -08:00
jasonwshsu
85bdea9e4c Add key ACCESSIBILITY_FLOATING_MENU_FADE_ENABLED
This key handles the fade effect of the accessibility floating menu.

Bug: 173940865
Test: atest SettingsProviderTest
Change-Id: I9e6e02920e331cd326e1667d968a0397dde8d377
2021-01-25 22:39:29 +08:00
Edgar Wang
7adf2fbd75 Fix crash when enter Settings Developer options
Bug: 178365519
Change-Id: Ide1ce84c02317ab2529061a8a5f703f226dbcb33
Test: manual
2021-01-25 13:39:23 +00:00
SongFerng Wang
1581f4fc97 Merge "Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType" 2021-01-23 07:41:10 +00:00
SongFerngWang
7d95185d46 Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType
- Add more reasons of allowed network type
  - ALLOWED_NETWORK_TYPES_REASON_USER
  - ALLOWED_NETWORK_TYPES_REASON_CARRIER
- Add @systemApi for below
  - ALLOWED_NETWORK_TYPES_REASON_USER
  - ALLOWED_NETWORK_TYPES_REASON_POWER
  - ALLOWED_NETWORK_TYPES_REASON_CARRIER
  - setAllowedNetworkTypesForReason API
  - getAllowedNetworkTypesForReason API
  - getAllowedNetworkTypesBitmask API
- Add Public for below
  - CARRIER_NR_AVAILABILITY_NONE
  - CARRIER_NR_AVAILABILITY_NSA
  - CARRIER_NR_AVAILABILITY_SA
  - KEY_CARRIER_NR_AVAILABILITY_INT
- @Deprecated API
  - setPreferredNetworkTypeBitmask
  - getPreferredNetworkTypeBitmask
  - setAllowedNetworkType
  - getAllowedNetworkType
- Add a new way to notify allowedNetworkType at PhoneStateListener
- Replace KEY_NR_ENABLED_BOOL with KEY_CARRIER_NR_AVAILABILITY_INT

Bug: 161434786
Test: atest TelephonyManagerTest#testSetAllowedNetworkTypesForReason
(PASS)
atest TelephonyManagerTest#\
testSetAllowedNetworkTypesForReason_moreReason
(PASS)
atest PhoneStateListenerTest#\
testOnAllowedNetworkTypesChangedByRegisterPhoneStateListener
(PASS)

Change-Id: I3d0c119a0c2a30c56b0c127ba6525f8992b4e9dd
2021-01-23 06:51:05 +08:00
Chris Li
78dacf0c71 Allow non-resizable apps in split-screen (1/n)
1. Add a setting to enable this.
2. Allow non-resizable apps to be moved to split-screen when the setting
is on.

TODO:
1. Add a developer option for this
2. Fix SizeCompatMode when the non-resizable app is in split screen

Bug: 176061101
Test: adb shell settings put global enable_non_resizable_multi_window 1
Test: atest WmTests:ActivityRecordTests
Test: atest WmTests:WindowOrganizerTests
Test: atest WmTests:WindowManagerSettingsTests
Test: atest CtsWindowManagerDeviceTestCases:MultiWindowTests
Change-Id: Ife9e5e5848614f072efb3b23f71472561e00488c
2021-01-22 20:56:08 +00:00
Songchun Fan
8b444c2c01 Merge "[SettingsProvider] @Readable annotation to restrict access to hidden keys" 2021-01-22 18:07:31 +00:00
Kohsuke Yatoh
b18a57cbc1 Set FOREGROUND thread priority to 'fonts' thread.
'fonts' thread will block UI thread, so it should have a higher priority
than DEFAULT.

Bug: 178195682
Test: adb shell "ps -A -l -T" | grep fonts
Change-Id: I4fd67389abcfd7d1b78a3db3dc86422a7a837024
2021-01-22 17:01:53 +00:00
Linus Tufvesson
01088524cb Update Settings#canDrawOverlays
.. to consider if the caller is holding the permission
SYSTEM_APPLICATION_OVERLAY.

Bug: 171177581
Test: Manually verified using wellbeing app
Change-Id: I58907de33015d7441818110e94612ec3d29d07ad
2021-01-22 15:07:04 +00:00
Songchun Fan
2af6e521ee [SettingsProvider] @Readable annotation to restrict access to hidden keys
Adding a new annotation that can be fetched at runtime.

The settings keys annotated with the new annotation can be accessed via
the get* methods, even if they are marked as @hide. Access to a value
that is not annotated with @Readable will end up with an
IllegalArgumentException.

Notice that if a caller tries to call get* method with a value that is
not defined in the Settings.Secure, Settings.System or Settings.Global
classes, this access is still regarded as valid. We only reject accesses
where the value is defined in one of the three classes, but is marked as
@hide and does not have @Readable annotation.

This CL adds @Readable to all existing hidden keys and public keys.

A follow up CL will remove the @Readable annotation for the hidden keys
added in S. The end result would be that all the keys (hidden or public)
can be accessed if they were added before S. From S and beyond, only
public keys can be accessed.

+ also fixed some formatting issues

BUG: 175024829
Test: atest android.appsecurity.cts.ReadableSettingsFieldsTest
Change-Id: I8a2733580ff9c9d01cbdb0f14ad56c2062a2f956
2021-01-21 14:20:14 -08:00
Hall Liu
6b7885f153 Add new columns in CallLog
Add new column definitions in the call log db to support storing the new
call composer elements in the call log. Also refactor addCall to use a
builder pattern, and add READ_VOICEMAIL for shell in order to support
new CTS tests

Test: atest CallLogTest
Bug: 174798736
Change-Id: I00e127510c382d9ff0ffc70f4c5ad7179ac7319a
2021-01-19 16:06:13 -08:00
Peter Wang
c77d2826b4 Merge "Add an API for LPA (SIM Manager) to bring up pages related to managing SIM profiles." 2021-01-15 18:36:46 +00:00
TreeHugger Robot
b4e8c32677 Merge "Revert "Create setting key for emergency gesture call number override"" 2021-01-15 03:50:25 +00:00
Peter Wang
74f0d22468 Add an API for LPA (SIM Manager) to bring up pages related to managing SIM profiles.
Bug: 170507492
Test: Build
Change-Id: I8a2c4e86cb3ffd6ef0dac03ec2e4968839202e7d
2021-01-14 17:27:03 -08:00
Fan Zhang
02bd0389e3 Revert "Create setting key for emergency gesture call number override"
This reverts commit 8e089728c7.

Reason for revert: It turns out we don't need this feature

Change-Id: Ibc042e451d66a1b87ed416bed41461df52f70a66
2021-01-14 22:55:48 +00:00
Hall Liu
6b4ce33480 Merge "Add API for uploading call composer pictures" 2021-01-13 02:31:34 +00:00
Hall Liu
963b83ced9 Merge "Add multiuser and shadow support for call composer" 2021-01-12 18:54:09 +00:00
Hall Liu
9df4a2db81 Add API for uploading call composer pictures
Bug: 175435766
Test: atest CallComposerTest
Change-Id: Ieff0e87ca22162aac42f8ebe705ef6167b1edb33
2021-01-11 16:48:35 -08:00
Hall Liu
5cab473874 Add multiuser and shadow support for call composer
Add code to support copying call composer pictures between users and the
shadow call log when booting into the DE state.

Bug: 174798736
Test: atest ShadowCallLogTest
Change-Id: Ic70f7b74362e797617d66796407a082c19e0c4f4
2021-01-11 16:21:56 -08:00
Jeff DeCew
b1e9252d65 Merge changes from topic "decorate_custom_notifs"
* changes:
  Improve RemoteViews to simplify notification view hierarchy.
  Fully custom view notifications now receive minimal decoration when targeting S.
2021-01-11 21:48:22 +00:00
Kevin Han
68b31b017e Add feature flag for app hibernation.
Add feature flag for app hibernation so that we can begin implementing
behind a feature flag.

We use DeviceConfig as per instructions at go/android-flags-setup so
that we may eventually roll this out to dogfood devices using P/H and
Mendel.

This is the downstream merge of http://aosp/1542244

Bug: 175829330
Test: Builds
Change-Id: I27b4bdd9b6ed25b06fc685183f0dc872094f1b5c
2021-01-08 15:23:01 -08:00
Jeff DeCew
d9e18369bf Fully custom view notifications now receive minimal decoration when targeting S.
* The level of decoration for fully custom notifications can be customized with FULLY_CUSTOM_VIEW_NOTIF_DECORATION
* The level of decoration for decorated notifications can be customized with DECORATED_CUSTOM_VIEW_NOTIF_DECORATION
* Adds some helpful logic when "backporting" S logic so that we can see what UNDO notifications will really look like.

Note: this patch now includes code that used to be in separate reviews: I700472b9c8fba2563b447f570cab7dd60a0a3984 and I55e12843a3edc6e9a78e5b8c848400a8f9228d1c

Test: Manual
Bug: 173522761
Change-Id: I7aba1aec2ba3023857735754c000977c4491b774
2021-01-08 17:01:11 -05:00
Andrei-Valentin Onea
04f02686b8 Merge changes from topic "preinstall-overrides" am: 29ed176b46 am: d1ebbf5086 am: dd1d1cbacc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520701

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifbdca1201aa118e59b45f7dd89441a210fc2fa9c
2021-01-07 17:52:57 +00:00
Andrei-Valentin Onea
dd1d1cbacc Merge changes from topic "preinstall-overrides" am: 29ed176b46 am: d1ebbf5086
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520701

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94c9aca60ff8d5eec190434a2a22338cb04d5922
2021-01-07 17:35:17 +00:00
Jason Hsu
4cd499cad1 Merge "Add accessibility floating menu settings key" 2021-01-07 05:18:42 +00:00
jasonwshsu
d6d96c74c4 Add accessibility floating menu settings key
* ACCESSIBILITY_FLOATING_MENU_SIZE: control different size
* ACCESSIBILITY_FLOATING_MENU_ICON_TYPE: control icon type
* ACCESSIBILITY_FLOATING_MENU_OPACITY: control the opacity value for fade out effect

Bug: 173940865
Test: atest SettingsProviderTest
Change-Id: I0399366b6ea05268e3d3ad1f24962fffde8d686a
2021-01-07 13:00:33 +08:00
Varun Shah
3e81038837 DO NOT MERGE: Disable StrictMode VM Policy check. am: f20d333ada
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13286399

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7276ffe8b50b5668cf21166a9ff9fad725d6fc6a
2021-01-05 23:06:16 +00:00
Varun Shah
f20d333ada DO NOT MERGE: Disable StrictMode VM Policy check.
Disable the VM policy violation for intents that contain a content URI
but don't have FLAG_GRANT_URI_PERMISSION when scheduling alarms.

Fixes: 160426113
Test: atest CalendarProvider2Test
Change-Id: If6e4a03609fc3d03dde66bcaa3136b23662ccaeb
(cherry picked from commit 224822ecaf)
2021-01-05 21:27:13 +00:00
TreeHugger Robot
b26f201709 Merge "Disable StrictMode VM Policy check." 2021-01-05 16:42:13 +00:00
TreeHugger Robot
b93cb1be81 Merge "Update Column value types for BaseColumn." 2021-01-05 15:34:47 +00:00
Andrei Onea
46111c8ea0 Add force_non_debuggable_final_build_for_compat
This flag forces the compat framework to assume we're on a
non-debuggable build, and use stricter rules for enforcing
the change id override policy.
On a non-debuggable build, this flag has no effect.

Test: atest OverrideValidatorImplTest
Bug: 158696818
Change-Id: I3b13f1898e7ff00580140debe2ced9f8074502ea
2020-12-30 14:52:51 +00:00
Varun Shah
224822ecaf Disable StrictMode VM Policy check.
Disable the VM policy violation for intents that contain a content URI
but don't have FLAG_GRANT_URI_PERMISSION when scheduling alarms.

Fixes: 160426113
Test: atest CalendarProvider2Test
Change-Id: If6e4a03609fc3d03dde66bcaa3136b23662ccaeb
2020-12-29 15:24:43 -08:00
TreeHugger Robot
6e158b5a1f Merge "Add Restricted Mode handling to NetworkPolicyManager" 2020-12-28 19:39:29 +00:00
Patrick Rohr
5197d1bd33 Add Restricted Mode handling to NetworkPolicyManager
Adds Restricted Mode functionality to NetworkPolicyManager. When this
mode is turned on (via setting), only apps with
android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS will be able to
use the network. For all other apps, the network will be blocked by the
firewall. This is controlled by a new allowlist firewall chain
fw_restricted_mode.

As a first step, this implementation still requires a reboot after the
enabling / disabling the mode to take effect. I will provide the dynamic
configuration in the next CL.

Test: atest CtsHostsideNetworkTests && atest
NetworkPolicyManagerServiceTest
Bug: 170322816
Bug: 157505406
Bug: 170322455
Bug: 175281879

Change-Id: I0731fa842c69683953baaf9ec3a9a03454f4c607
2020-12-28 18:01:34 +01:00