Commit Graph

26 Commits

Author SHA1 Message Date
Kevin Chyn
0c34d259a0 Show biometric-specific dialog when appropriate
1) We need to pass a "restriction" string from settings to the dialog,
   otherwise the biometric dialog could be shown in non-biometric
   flows
2) Updates ActionDisabledByAdminDialogHelper to pass the restrition
   to be taken into consideration when creating the controller
3) Sets an optional onClickListener on the positive button.

Bug: 5788943
Test: atest ParentalControlsUtilsTest
Change-Id: Iedff7fef50e186b2779f061f37d3080c910d2179
2021-06-15 20:57:26 -07:00
TreeHugger Robot
9e1e5ddb72 Merge "Further refactoring on ActionDisabledByAdminDialog classes." into sc-dev 2021-06-01 20:13:24 +00:00
Felipe Leme
e89c2fd4b8 Further refactoring on ActionDisabledByAdminDialog classes.
Bug: 184107103
Bug: 188836559

Test: m -j RunSettingsRoboTests ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest
Test: atest ActionDisabledLearnMoreButtonLauncherImplTest
Test: adb shell am start -e android.app.extra.RESTRICTION no_install_unknown-sources -a android.settings.SHOW_ADMIN_SUPPORT_DETAILS
Test: manual verification with CtsVerifier

Change-Id: I3c4056d82834b5e2a4afbd958be7c9d0b9af543e
2021-05-27 11:27:33 -07:00
Edgar Wang
83507b5f33 Update Policy transparency dialog layout
- Update icon
- Fix color didn't apply dark theme.

Bug: 188756125
Bug: 189167991
Test: manual
Change-Id: Ie975c8999efe352fc9485d936a065d33e5ca76b1
2021-05-27 13:03:44 +08:00
Edgar Wang
de88f5244c Update Policy transparency dialog to new style
- Tweak layout
- Update app icon
- Update font Size

Bug: 188756125
Test: manual
Change-Id: I7ddd73c80ead95d57202d1753408b437611a76b4
2021-05-22 04:00:38 +08:00
arangelov
d79ab00524 Update ActionDisabledByAdminDialogHelper
- For managed devices, "Learn more" takes the user to a support
page
- Put back the "If you have questions, contact your IT admin"
dialog content text
- Update header to 'Blocked by your IT admin' for managed devices

Fixes: 184107103
Test: manual
Test: atest ActionDisabledByAdminDialogHelperTest
Test: atest ActionDisabledLearnMoreButtonLauncherImplTest
Change-Id: Ie5b8a21b9ba295435d5709f9b0374035141d319a
2021-05-18 15:40:46 +01:00
Rajeev Kumar
815558188f Merge "Undo making Image icon's visibility to GONE in Action Not Allowed Dialog for a financed device" into sc-dev 2021-03-16 16:50:02 +00:00
Salud Lemus
0e0247e5e4 Undo making Image icon's visibility to GONE in Action Not Allowed Dialog for a financed device
Bug: 182839352
Test: Used a test device that is registered via ZT
Test: m RunSettingsRoboTests ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest

Change-Id: I42bb9ce9a624fa20cd755af2d323b4c4f94048f7
2021-03-16 01:42:07 +00:00
Salud Lemus
52565ad5e9 Remove default admin support message for an Enterprise device
Bug: 182195172
Test: m RunSettingsRoboTests ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest

Change-Id: Ie844eee14ff0cc6a1c2f9dd0485c865f4e5e3e72
2021-03-09 16:16:33 +00:00
Salud Lemus
b45d87715a Update Action Not Allowed Dialog text for a financed device
Bug: 173826319
Bug: 158157476
Test: Used a test device that is registered via ZT
Test: m RunSettingsRoboTests ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest

Change-Id: Iefeb0b653764952e409dfd862d9cc54c4f5e7fc9
2021-03-08 19:06:13 +00:00
Irina Dumitrescu
e69f336850 Disable "Learn more" button for unknown apps disabled by admin on secondary profiles.
Test: packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ExternalSourcesDetailsTest.java
Test: packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ActionDisabledByAdminDialogHelperTest.java
Fixes:118881180
Change-Id: I8f6dbd9decba331fbe0a3495a2989f570f2afa67
2019-03-29 13:18:53 +00:00
Philip P. Moltmann
6bd48be1dd Do not tint app-icon of admin
Only if no app-icon is used a tint should be applied to the ic_info
icon.

Change-Id: I92332110f99d14e86dc01700fa00b189c1d7d8ad
Fixes: 118879012
Test: Looked at dialog with default icon and with app-icon
2018-11-08 10:23:41 -08:00
Neil Fuller
cf61df33b0 Remove dependency on libcore internal annotation
Remove dependency on libcore internal annotation -
the standard Android one should do.

Bug: 113148576
Test: build only
Change-Id: I067679b042d0698a4cc4afddc469dbcf68fce143
2018-10-16 15:51:21 +01:00
Philip P. Moltmann
098d3a79fd Fix ActionDisabledByAdminDialogHelperTest
- Revert user handling in setAdminSupportDetails to before my changes.
- Implement getUserProfiles in Settings-shadows as the the
  Settings-shadows do not forwarded to profiles the robolectric-default
  shadows

Test: make RunSettingsRoboTests
Change-Id: Idfd4722fe55a17c57d336db943904eb1aeb6e7ce
2018-10-15 14:30:34 -07:00
Philip P. Moltmann
035ea3b0d1 Use new RestrictedLockUtils API
This is made necessary by changes to the SystemAPI the lib relies on.

Test: RunSettingsRoboTests
Bug: 116798569
Change-Id: I2812ce9e58e3fb15a5579ddc10cd0edf33d0ed44
2018-10-09 12:39:19 -07:00
Lenka Trochtova
2f4558d3fc Revert the mandatory backups feature.
Bug: 79736299
Test: make RunSettingsGoogleRoboTests
Test: make RunSettingsRoboTests

Change-Id: Ie9702664c0fb4daccdee74eac6080c959fe1b608
2018-09-12 11:52:11 +02:00
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
tmfang
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
This CL only changed AlertDialog imports.
So, reviewer can review it easily.

Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
2018-07-20 11:32:13 +08:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Fan Zhang
ca6d86c5ab Move device admin viewer/adder to specialaccess package.
Bug: 110207366
Test: robo
Change-Id: I51552dcc5ec6525040cfde17087b7f3f6b21b581
2018-06-15 08:56:14 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Tony Mak
42b83a604f Badge the icon properly in policy transparency dialog
Following the pattern used within the Settings app to badge the icon.

For location setting, the dialog is shown in work profile user.
Thus ai.loadIcon badged the icon for the first time and
getUserBadgedIcon baged the second time.

Fixes: 77844928
Test: adb shell wm density 560 -> suspend an app -> launch the app ->
      observe the dialog. Repeat the test with original density.

Change-Id: Ie79c3d9aa7b1a155edc74816850b1349fbd2d606
2018-04-11 13:55:57 +00:00
arangelov
cf1e59a960 Change "More details" to "Learn more" in policy transparency dialog.
Screenshot: https://screenshot.googleplex.com/5xrwW3g29qa.png

Bug: 77618738
Test: none
Change-Id: I464f492cd6b1468b85b5a691c29ae7a982ecebff
2018-04-06 14:31:32 +01:00
Tony Mak
cbc3a6a1de We should show custom title for suspend app dialog
BUG: 77523074

Test: Suspend an app, observe the new title.
Test: m -j RunSettingsRoboTest

Change-Id: Ide0329422e68b5ed6418365f2d0b0e0d11f0dec7
2018-04-03 17:54:13 +00:00
arangelov
e35badd9d5 Make "Action not allowed" dialog compliant with Material Spec and replace full screen activities with the dialog.
Bug: 64893948
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogTest -j40 RunSettingsRoboTests
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest -j40 RunSettingsRoboTests
Change-Id: I9308d8d86a3789b8f2c92b9f4f20cf00cce71d14
2018-03-05 20:27:51 +00:00