Commit Graph

1389 Commits

Author SHA1 Message Date
Treehugger Robot
e8cdcb7f6c Merge "Use ro.boot.qemu to check if the device is an emulator" am: 62d82e0b33 am: 4ba8fde9ba am: de535f6eb2 am: 83a6070d12
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625662

Change-Id: I8b388bc7f1881b8939b7ba04631466624439fece
2021-03-17 21:07:25 +00:00
Treehugger Robot
83a6070d12 Merge "Use ro.boot.qemu to check if the device is an emulator" am: 62d82e0b33 am: 4ba8fde9ba am: de535f6eb2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625662

Change-Id: Ia613c23fb779697882f9928b15684fb1ff97e9cd
2021-03-17 16:09:12 +00:00
Treehugger Robot
de535f6eb2 Merge "Use ro.boot.qemu to check if the device is an emulator" am: 62d82e0b33 am: 4ba8fde9ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625662

Change-Id: I039b17ca0bf956ee3d86c72edcbf81957938ae4b
2021-03-16 17:17:20 +00:00
Oli Lan
8b73f249e0 Merge "Add a setting to control whether clipboard access notifications are shown." into sc-dev am: 242c7c5f2c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13828879

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I75b1b57d80abe307d4f5e97a9e66980ea7113e10
2021-03-15 14:18:11 +00:00
Oli Lan
242c7c5f2c Merge "Add a setting to control whether clipboard access notifications are shown." into sc-dev 2021-03-15 14:09:48 +00:00
Jason Hsu
78ef98d132 Merge "Set default value of accessibility button mode" 2021-03-12 05:48:33 +00:00
jasonwshsu
a87f05d552 Set default value of accessibility button mode
Set floating menu mode by default, but if the user uses accessibility button in the navigation bar to trigger their accessibility features before migration, then set it to keep the navigation button mode.

Bug: 173940304
Test: 1. Push old version of db and apk
      2. Enable/Disable accessibility features in navigation bar
      3. Push new version of db and apk
Change-Id: I465eb2190f0e1ca9a6a6be928752a07d5e9576da
2021-03-12 13:45:28 +08:00
TreeHugger Robot
84d2232c28 Merge "[SettingsProvider] do not check @Readable for system/priv apps in the server" into sc-dev am: 7ddd1bd457
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13830194

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4c39897c99b21b21ea3108bb84a13325777a4ec9
2021-03-11 20:30:11 +00:00
TreeHugger Robot
7ddd1bd457 Merge "[SettingsProvider] do not check @Readable for system/priv apps in the server" into sc-dev 2021-03-11 20:17:56 +00:00
Oli Lan
dfeb99ae1a Add a setting to control whether clipboard access notifications are shown.
This adds a setting to turn on/off the toast notifications shown when
an app accesses clipboard.

Bug: 182349993
Test: atest SettingsProviderTest
Change-Id: I6922ed5a74fae17602a2ac20a199a7d6c03014b9
2021-03-11 18:11:41 +00:00
Beverly Tai
29bcf95db4 Merge "Add quickpickup gesture" into sc-dev am: 384db6dd05
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13676306

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I96f3a49414f9d881dd480f12570cda4177584b6f
2021-03-11 14:04:58 +00:00
Roman Kiryanov
d6a9f42566 Use ro.boot.qemu to check if the device is an emulator
`ro.kernel.qemu` is deprecated.

Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Id42d79af90b1fe7e182a96c53c84248e81a7c259
2021-03-10 23:41:31 -08:00
Songchun Fan
403d4ee851 [SettingsProvider] do not check @Readable for system/priv apps in the server
We already have this check on the client side. Copying it over to the
server side for cases when the server side is called directly.

BUG: 175024829
Test: atest com.android.devicehealthchecks.SystemAppCheck#system_app_crash
Change-Id: Ib540b9bdb29343eec79a2f31e0b26fe333117395
2021-03-11 00:31:16 +00:00
Beverly
c0ddb20d17 Add quickpickup gesture
Only registered when:
- udfps enrolled
- AOD is not enabled
- quickpick enabled:
    adb shell settings put secure doze_quick_pickup_gesture 1
Currently by default, quickpickup is not enabled

On gesture trigger, AOD screen will show for 5 seconds

Test: manual
Bug: 176550666
Change-Id: I804a2590c1d95acad62fbfbc85228ecfc8bfa3ed
2021-03-10 19:00:24 +00:00
Chris Li
e96dc69904 Merge "Allow non-resizable apps in split-screen (5/n)" into sc-dev am: 330f99f69b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13430927

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id765d09e33cd034cbcb51a2040ebe17ea0ec6b8c
2021-03-01 22:59:30 +00:00
Chris Li
df4a15b512 Allow non-resizable apps in split-screen (5/n)
Replace usages of DEVELOPMENT_ENABLE_SIZECOMPAT_FREEFORM with
DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW so that we can use one
setting to control all multi window mode

Bug: 176061101
Test: pass existing
Change-Id: I873b4902f3995815721401b30236919ffdbc6a82
2021-02-26 20:29:00 -08:00
Andriy Naborskyy
43c818ceb6 Default resource for cell_on
Enable device-specific overlay to change cellular default state.

Bug: 138338109

Change-Id: I34899560d8859a6817d8150b662b64458c8c7877
(cherry picked from commit 76c609ebc2aad0c6acdc0b0880c4bab228dc0de8)
2021-02-27 01:48:35 +00:00
Jamie Garside
072bedcef8 Android config updates for one handed bouncer.
This is the changes in Settings (to store the current screen side) for
the one-handed keyguard. This also checks in symbols.xml to expose the
platform config to SysUI (the lines in symbols.xml are currently in
config.xml; I'm assuming that a previous revert didn't remove them).

Bug: 170858298
Test: included.
Change-Id: I9d91a9360c821562634e83295f5e2e340f6de1d5
2021-02-25 11:54:39 +00:00
Jamie Garside
0f53fd20d5 Revert "Update the bouncer to be able to move to either side of a wide screen."
This reverts commit 868e770b82.

Reason for revert: Breaks password entry - b/180993584

Change-Id: I9a1771b795c90b1cfe6c2457d390ac53235c6c94
2021-02-23 19:24:29 +00:00
Jamie Garside
868e770b82 Update the bouncer to be able to move to either side of a wide screen.
I'd like to test other things (like tap makes the IME move), but to do
that means replacing the mock with a proper fake. That can come later,
but this at least tests that the flagging works correctly.

The changes between this and
commit cae34b8e22 is the bouncer height is
now measured using wrap_content, so the placement can be controlled
properly by the outer View (as the position of the bouncer changes
depending on the size of the screen).

This reverts commit cae34b8e22.

Test: Included
Bug: 170858298
Change-Id: I18428a6df9abf0e8e37c1c179be6843e4eee793c
2021-02-22 15:35:56 +00:00
Minche Li
966a1b152f Merge "Adjusts the default magnification settings for config_magnification_area" into sc-dev 2021-02-19 05:17:45 +00:00
TreeHugger Robot
45e4016bb1 Merge "Don't backup/restore sim-settings if Telephony not present." into sc-dev 2021-02-16 19:06:18 +00:00
Jack Nudelman
55fba4d55f Don't backup/restore sim-settings if Telephony not present.
Bug: 180023868
Bug: 179947838
Test: make, cts test that caught this issue no pass.
Change-Id: Id898d135ed64a704cc4707dcb796664d9b08264b
2021-02-16 09:09:04 -08:00
Songchun Fan
25f6a9222c Revert^2 "[SettingsProvider] @Readable annotation to restrict access to hidden keys"
New in this revert:
+ Added missing annotations.
+ Added check for system apps.

BUG: 175024829
Test: atest android.appsecurity.cts.ReadableSettingsFieldsTest
Test: atest android.app.cts.NotificationTemplateTest
Test: atest com.android.systemui.statusbar.notification.row.ExpandableNotificationRowTest

1ca518c1ec75b8307126991ae2d253911b2be10c
Change-Id: I3f270831692b5ba0841e85b84902d0b101ff1095

Change-Id: I4cab132c1ef10f4319b570e8e9e15dcde6d909f8
2021-02-08 22:42:32 +00:00
Daniel Chapin
cae34b8e22 Revert "Update the bouncer to be able to move to either side of a wide screen."
This reverts commit 6c5bfcb40f.

Reason for revert: Bug: 179493042

Test: Manually verified
Change-Id: Iebcaa9e92a2f83419c07936aa5aa3c81970da34a
2021-02-08 11:36:04 +00:00
mincheli
2e3f08b1e8 Adjusts the default magnification settings for config_magnification_area
Cnfig flag, config_magnification_area, determines if the device
supports magnification area or not.
If OEM doesn't support magnification area, we should adjust the
magnification capability setting and window magnification prompt
setting.

Bug: 177371954
Test: atest SettingsBackupTest
Change-Id: I67947285eb6a73b8e0e21d1db866c426a0ea49d7
(cherry picked from commit f9d7150a5c)
Merged-In: I67947285eb6a73b8e0e21d1db866c426a0ea49d7
2021-02-05 07:43:41 +00:00
Jack Nudelman
e2ea428d95 Call TelephonyProvider apis for backup/restore per-sim settings.
Bug: 172244913
Test: make, atest TelephonyProviderTest

Change-Id: I1652172f003e2fd5ab08dfdbf63dadc64e034406
2021-02-04 20:54:39 +00:00
Bill Yi
46b48bcc66 Merge RQ1A.210205.004 to aosp-master - DO NOT MERGE
Merged-In: Icbc3c9f8e1ac8064e2e006587b4d4870d74cee2d
Merged-In: I2cb57c40fd5679dbd710396f3c69deafbac9d1c3
Change-Id: Ibfd6d85bda975aaa274be9e98e197de048d178ac
2021-02-03 17:01:38 -08:00
Jamie Garside
6c5bfcb40f Update the bouncer to be able to move to either side of a wide screen.
This is currently enabled by settings
persist.sysui.keyguard.one_handed_keyguard_enabled to true. If enabled,
this will cause "one-handed able" security modes to be measured with
half of the width of the SecurityViewContainer. Tapping either side of
the screen will then move the keyguard by changing the margins.

There's some flaws here, but it's a start. There's a frame of the
bouncer being on the wrong side of the screen if the keyguard is on the
right, and it doesn't respond to opening/closing the device properly yet.

Bug: b/170858298
Change-Id: Ib997b9b3cb4ca7a069c805c7a8f3a79434eebd4c
Test: Incoming :)
2021-02-03 12:29:00 +00:00
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
TreeHugger Robot
1acb247f60 Merge "[SettingsProvider] extend font size scale range" into rvc-qpr-dev am: 06c81b12f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13370390

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I663571a4c501aa172faa4c4c035774cddbe9b944
2021-02-02 23:06:51 +00:00
Tomasz Wasilczyk
fa9c4d1b3b Merge "Fix initialization of USER_ROTATION setting." am: 13466883b0 am: 9768739095 am: 12824746c7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554929

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I46f427425d871b8dc44a792ca6bc9ed395ca2faf
2021-01-30 02:33:40 +00:00
Tomasz Wasilczyk
12824746c7 Merge "Fix initialization of USER_ROTATION setting." am: 13466883b0 am: 9768739095
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554929

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc56ca2a3d933b34b125719a6492477e05695694
2021-01-30 02:31:28 +00:00
Chris Li
7ac5c26f92 Default value for DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW
Provide default value in SettingsProvider

Bug: 176061101
Test: manual
Change-Id: I1a683f2a22d316cdbd8468e5daf38d0a93e7a993
2021-01-27 05:03:20 +00:00
Christine Franks
e8f6e92fe0 Merge "Add configurable mapping between color modes" 2021-01-26 23:16:12 +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
Jason Hsu
806e4e12a0 Merge "Add key ACCESSIBILITY_FLOATING_MENU_FADE_ENABLED" 2021-01-26 03:44:37 +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
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
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
Songchun Fan
bd6fc820a6 [SettingsProvider] extend font size scale range
As per requested in b/176940932#comment3 and b/156260178#comment32,
extending the valid font size scale range to [0.25, 5].

Existing CTS tests still pass.

BUG: 156260178
Test: atest android.provider.cts.settings.Settings_SystemTest
Test: atest android.app.cts.ApplicationTest
Change-Id: Icff82d727d63da4353342b0f9a5ca3c2ae1671c1
(cherry picked from commit df8852a0b5)
Merged-In: Icff82d727d63da4353342b0f9a5ca3c2ae1671c1
2021-01-20 21:52:50 +00:00
Tomasz Wasilczyk
1e036b6d35 Fix initialization of USER_ROTATION setting.
Until now, def_user_rotation was effectively a dead default:
- added missing def_user_rotation -> USER_ROTATION first-run initialization
- corrected the setting type when upgrading database

Bug: 178000973
Test: set def_user_rotation to 1 in default.xml and flash Pixel 3a
Change-Id: If2aa9665a0167f696f6b16a16be48ac473271631
2021-01-20 11:58:56 -08:00
Songchun Fan
df8852a0b5 [SettingsProvider] extend font size scale range
As per requested in b/176940932#comment3 and b/156260178#comment32,
extending the valid font size scale range to [0.25, 5].

Existing CTS tests still pass.

BUG: 156260178
Test: atest android.provider.cts.settings.Settings_SystemTest
Test: atest android.app.cts.ApplicationTest
Change-Id: Icff82d727d63da4353342b0f9a5ca3c2ae1671c1
2021-01-19 23:06:38 +00:00
TreeHugger Robot
b4e8c32677 Merge "Revert "Create setting key for emergency gesture call number override"" 2021-01-15 03:50:25 +00: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
Patrick Rohr
c4ad204556 Merge changes I0731fa84,Id31a60ad am: 1ab1849ab2 am: 6e05084c6a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1545865

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I081abc916ae5ec6333cfda1d8a6e5ee20560be85
2021-01-12 20:47:46 +00:00
Patrick Rohr
048bc5ea80 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

Exempt-From-Owner-Approval: Change already merged on internal gerrit.
Change-Id: I0731fa842c69683953baaf9ec3a9a03454f4c607
Merged-In: I0731fa842c69683953baaf9ec3a9a03454f4c607
2021-01-12 11:59:17 +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
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