Commit Graph

299 Commits

Author SHA1 Message Date
Raff Tsai
4992919d95 Remove unused resources
Bug: 123794771
Test: rebuild, robolectric
Change-Id: I22f43220cc9ad4ec2074af425b0da75f59e470a4
2019-11-07 18:12:34 +08:00
Raff Tsai
1eccd55a70 Remove mobile network v1
Fixes: 142920912
Test: rebuild, robolectric
Change-Id: Ib365ba712af62729ca35abbc370aef087ce52a90
2019-11-05 17:54:54 +08:00
Raff Tsai
062baadf4e Merge "Add personal/work tab for ManageApplications" 2019-10-22 23:47:32 +00:00
Raff Tsai
c898775914 Hide search box if it is called in initial setup wizard
- Search box is hidden if user set intent extra isSetupFlow true

Fixes: 135717823
Test: search box is hidden in the following command
adb shell am start -a android.settings.SETTINGS --ez isSetupFlow true

Change-Id: Ia3d955c9390d6b0eef9391b9b35b6a483eb63d26
2019-10-18 02:08:38 +00:00
Raff Tsai
afd494d335 Add personal/work tab for ManageApplications
- Add ProfileSelectManageApplications containing tabLayout
- Modify StorageItemPreferenceController to display only personal
or work profile data
- Add getTargetFragment in Utils to handle fragment selection

Bug: 141601408
Test: manual
Change-Id: Ie4db1ce2e77f60a82018e5a3e1f2fccb812502dc
2019-10-16 17:08:31 +08:00
Sunny Shao
7e866b670e Use Builder to replace the Uitls.addFooterPreference
Fixes: 139163212
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accounts
Change-Id: I861434b81c07db785e6f1cfb3e34871ffba41e5f
2019-08-09 11:42:04 +08:00
Sunny Shao
660b36e061 Use FooterPreference in xml explicitly
- Removed the FooterPreferenceMixin from the BluetoothDetailsMacAddressController.
 - Added the common api addFooterPreference.

Fixes: 139104386
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth
Change-Id: Iab40fa4c5be674290b1dc6d372c84609ccc2ea49
2019-08-08 18:42:26 +08:00
Joel Galenson
2118f8a63f Revert "Remove Permissions Hub."
This reverts commit 1e7c172ad5.

Bug: 132292477
Test: None.
Change-Id: Icae2cd4edbb22e2f3ea72e20f0ebd818f1ac6629
2019-05-31 07:55:19 -07:00
Joel Galenson
1e7c172ad5 Remove Permissions Hub.
Bug: 132292477
Test: View all related screens.
Change-Id: Ic0e890e04f210f3be3eb80c95e398a40a8062001
2019-05-30 08:30:49 -07:00
Svet Ganov
864765f8b4 Update Settings to use the proper DeviceConfig API.
Exempt-From-Owner-Approval: carry over approval from ag/6908306

bug:124769181

Change-Id: If18d0dc5e55dabf82b7c7a2b6df240fb8b24f736
2019-04-07 22:37:02 -07:00
clownshen
24827d35b1 Enlarge wifi signal icon from 24dp to 32dp for header view
Bug: 129413562
Test: manual test
Change-Id: I50a27ac25e5ae42530736bb7c019485a51d707ba
2019-04-01 07:08:55 +00:00
tmfang
aed8f361fc Remove shadow from "Apps and Notifications"
- Also create a util method to reuse it in different class.

Test: visual
Fixes: 128437380
Change-Id: I0e136feed3aead8c37e381095daebded55ef298d
2019-03-22 11:08:15 +08:00
Antony Sargent
627f14bfd0 Disable the "SIM cards" tile in new Network & internet page
When settings_network_and_internet_v2 is enabled, don't show the old
"SIM cards" tile for managing multiple SIM cards on the Network &
internet page, since we now have new UI for this.

Bug: 116349402
Test: manual (put device into dual-sim dual-standby mode, and enable the
'settings_network_and_internet_v2' flag in the FeatureFlags section of
Developer options)

Change-Id: Icc0d723b634f15ad831e38b783ae226a7717f674
2019-03-04 16:12:51 -08:00
Ng Zhi An
b97bdc38da Disable system alert window permissions on low ram devices
Bug: 63697002
Bug: 117832554
Test: adb am start-activity -a
android.settings.action.MANAGE_OVERLAY_PERMISSION
Change-Id: I44c64001cd07fd4934cdc55f455384cebd5c9cfb
2019-02-26 17:58:43 -08:00
Doris Ling
c5a1b4f666 Remove all reference to settings_side_margin.
- since the overlay of the value for bigger screen has been removed,
the side margin is now always 0dp. Remove this dimen value and all
reference to it.

Fixes: 124526984
Test: rebuild and visual
Change-Id: I68ff42513a379111042cab9b34594822544e246e
2019-02-21 10:18:00 -08:00
Jason Chiu
c78c54a9c6 Add a util method of creating Icon with Drawable
- Add a util method to help create Icon with Drawable so that
users don't need to handle bitmaps
- Add support for creating with ColorDrawable

Test: robotest
Fixes: 124407373
Change-Id: I1897256821cc804a5e599d967feb84a3bcd689a9
2019-02-19 15:51:38 +08:00
Fan Zhang
a725c13d65 Merge "Remove sub-text from the lines of AP list in Wi-Fi Slice" 2019-02-12 17:59:05 +00:00
Jason Chiu
1217bbec70 Remove sub-text from the lines of AP list in Wi-Fi Slice
- Remove sub-text from the lines of AP list
- Add colors to the AP names to indicate the connection status of each AP

Fixes: 120685004
Bug: 120786304
Test: make RunSettingsRoboTests -j
Change-Id: I7b879248528a293d14d959994bb054275f0d69a1
2019-02-12 16:10:06 +08:00
markchien
1dd1d79d90 Support entitlement check in DSDS
Get resource from preferred SIM's subId.

Bug: 122108346
Bug: 120069528
Test: atest TetherServiceTest
Change-Id: Ia4279a418dfa6cd14942b7f4d2a313156066381b
2019-02-04 18:55:16 +08:00
Fan Zhang
c3fd289969 Remove dead code.
Bug: n/a
Test: rebuild
Change-Id: I71f8d9d99bbff1186e8df518ec8d27db3447ffbe
2019-01-29 16:27:31 -08:00
Raff Tsai
2928cd4c72 Fix Settings crash after disabling Settings Suggestion
- Settings Suggestion App is responsible for searching, we can not
prevent user disable it. Hide search feature if user disable it.

Fixes: 118805907
Fixes: 117921464
Test: manual
Change-Id: I61c47c52265a6efd79ef2fa60272bf6513e678b1
2018-11-07 14:11:23 +08: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
Aarthi Balachander
d0f835981c Use the migrated injected setting code in settingslib.
Manual merge to master from pi-car-dev
Bug: 68198078
Test: Tested on device
Change-Id: Iff767cd6bf7408b45ce9594628d3fd0a71744e9f
2018-07-18 13:34:25 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Kevin Chyn
4882e875ae 1/n Start adding Face settings (base, intro)
This change refactors common biometric settings code as well to minimize
duplicated code in areas such as:
    Preference Controller
    EnrollBase
    EnrollIntro

This change also updates ChooseLock to have Face + Pin/Pattern/Pass

Bug: 110589286

Test: Fingerprint settings/enrollment still works
Test: make -j56 RunSettingsRoboTests
Change-Id: Ie35406a01b85617423beece42683ac086e9bc4a7
2018-06-29 18:19:34 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -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
Fan Zhang
aab36de0d6 Remove wrapper for device policy manager
Bug: 76167422
Test: robotests
Change-Id: I69dc7341cf1ff408bc24c2a062586cef25b7b918
2018-03-30 20:44:20 -07:00
Fan Zhang
1b9b1a2311 Remove FingerprintManagerWrapper
No longer needed after robolectric migration

Bug: 76167422
Test: robotests
Change-Id: I922cde8ac3667081a512cf899af86f68b24485a6
2018-03-30 16:30:31 -07:00
Tony Mak
4e29281b99 Fix user id is not used correctly when fetching app info
FIXES: 73994288
Test: m -j RunSettingsRoboTest
Test: Install an app in work profile, set it to be restricted,
      observe that the app is rendered properly in restricted app list

Change-Id: Ic8a79eb3d0a675f9d1cae3125e8006739e492966
2018-03-19 20:31:17 +00:00
Phil Weaver
5a3e02dd38 Don't pre-scale vector drawables in settings
The idea of scaling down icons to prevent the system from
dealing with large images seems to be catching some
VectorDrawables and rescaling them. I don't think
VectorDrawables are likely to create a memory issue,
and the protection code seemed to be added to protect
against large pngs, not vector graphics.

Bug: 70562945
Test: Visually verified that all icons in the Accessibility
Shortcut list are now the same size with maximum display
and font sizes.

Change-Id: I9f177d11a614c122d333d4625bf6fa756d1bf4af
2018-03-08 17:38:46 -08:00
TreeHugger Robot
c26ea56fe4 Merge "Get rid of direct usage of Utils.onBuildStartFragmentIntent" 2018-02-20 21:03:04 +00:00
Fan Zhang
e5b8a5b24f Merge changes I34732bdb,Ieafd3be6
* changes:
  Remove some unused code
  Remove unused slice metadata
2018-02-20 20:02:29 +00:00
Fan Zhang
deec75fa9d Remove some unused code
Bug: n/a
Test: rebuild
Change-Id: I34732bdbf59d8380bef50f9a5da8b974375ea345
2018-02-20 10:18:54 -08:00
Fan Zhang
1f6d24a991 Get rid of direct usage of Utils.onBuildStartFragmentIntent
Change-Id: I87eb97d6da4cd4f99be5bcdb1e3e245eb1c7bd1c
Fixes: 73250851
Test: robotests
2018-02-20 09:42:31 -08:00
Fan Zhang
47854c2945 Migrate more places to subsetting launcher
Bug: 73250851
Test: robotests
Change-Id: Iaf29df45ddb42fd58f181cb01e10998a97cb7c34
2018-02-19 14:21:05 -08:00
Fan Zhang
3fff7bc35f Move some subsetting launch to SubSettingLauncher
Bug: 73250851
Test: robotests
Change-Id: I1c3620d335eaf99bb110bcbb3e33ff3b2a05f84e
2018-02-15 16:40:06 -08:00
Fan Zhang
615563db0c Migrate more subsetting launching to SubSettingLauncher
Bug: 73250851
Test: robotests
Change-Id: Ic0bf23f6ac6f717bdd3d477fdb84af68badae8e6
2018-02-15 15:39:56 -08:00
Fan Zhang
2ecef333e9 Refactor Utils.startWithFragment to SubSettingLauncher
- Use the new launcher in AccountTypePrefernce for now. Will migrate the
  rest in follow up CLs.

Change-Id: I67aa49f54b39ecea4ecfdc32ccbd827d21fc79b8
Bug: 73250851
Test: robotest
2018-02-15 15:04:04 -08:00
Salvador Martinez
408dc41228 Update copy for battery estimate related features
Many features are using the enhanced estimates but the copy for them
has gotten out of sync. This CL moves shared strings between Settings
and SysUI to SettingsLib and also updates features that use the
strings to have consistent behavior/text.

Test: Robotests
Bug: 65656091
Bug: 66909350
Bug: 67469159
Change-Id: Ie5ef1ed65429ca9805cff374f1439e5d61eb6591
2018-02-07 10:55:15 -08:00
Leif Hendrik Wilden
28dee1f086 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: I70a6e76cc8440547746ecc008c32bd06a7de8161
2018-01-24 12:30:39 -08:00
TreeHugger Robot
e3f187a4a9 Merge "Revert "Migrate to use instrumentation classes from settingslib."" 2018-01-23 01:58:18 +00:00
Fan Zhang
b7270a5aeb conditionally add FLAG_ACTIVITY_NEW_TASK when starting page
Subsettings must be started from Activity context, apparently.

Add a flag when it's not started from Activity context. This might not
be catching all cases but should at lesat cover most of them.

Change-Id: I8157ec0cb3d032bb44a0e7dec36637906fc8f1a0
Fixes: 72314527
Test: monkey
2018-01-22 14:07:52 -08:00
Leif Wilden
cab0ee611d Revert "Migrate to use instrumentation classes from settingslib."
This reverts commit 1546cca529.

Reason for revert: Broke fingerprint setup flow. b/72267201

Change-Id: I8321265ae64732c526325882ddea51080decddf5
2018-01-22 20:57:36 +00:00
Leif Hendrik Wilden
1546cca529 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: Ie5515bb0fe3e621fc7723a9b04ba23e4bfa9c401
2018-01-18 11:13:24 -08:00
jackqdyulei
fde637ff60 Add BatteryTipDialogFragment.
This DialogFragment handles all the tip related dialogs. This cl makes:
1. All the tips parcelable.
2. Add dialog for HighUsageTip. It also need adapter to populate app
list in dialog.
3. Add and update tests

Bug: 70570352
Test: RunSettingsRoboTests
Change-Id: Ie4c986172cfc73d8746abc7457d966c8600c6145
2018-01-09 17:33:19 -08:00
Fan Zhang
cf97f0b643 Add tests for some security setting controllers
Bug: 32953042
Test: robotests
Change-Id: Ieab4e6434bbb80313f6d1b25ff1cdea5713038f0
2018-01-05 15:45:53 -08:00
Jeff Sharkey
219ec91e1a Unlock all users before moving or migrating.
When moving apps or shared storage between storage media on FBE
devices, we need all users to be unlocked to successfully move
the data.  This change asks the user to enter the credentials for
any locked users as part of the moving/migration wizard flows.

To do this we relax Utils.enforceSameOwner() to let us prompt for the
credentials of unrelated users, but we carefully only extend this
capability to callers interacting with the "internal" activities,
which require the MANAGE_USERS permission.

Test: builds, boots, users are unlocked before moving
Bug: 29923055, 25861755
Change-Id: Ifaeb2557c4f8c4354e1d380eaa0e413768ee239f
2017-12-19 15:07:05 -07:00
Fan Zhang
5c1e686d3f Merge "Update app icon for ManageDomainUrls setting" 2017-11-09 20:52:57 +00:00
Fan Zhang
4e540db06d Update app icon for ManageDomainUrls setting
Change-Id: I6c26a055983ea72049d1633336d6da8736a78fa0
Fixes: 69057114
Test: robotests
2017-11-09 11:02:23 -08:00