Commit Graph

44 Commits

Author SHA1 Message Date
tom hsu
5281736004 [Panlingual] Add a description for per app language.
- This is to notify some app may not support to user.

Bug: 228415129
Test: local
Change-Id: I6205e0b5fdb3ee42a22ae4995c99e9d8dc5e0a2d
2022-04-14 06:47:13 +00:00
Jonathan Scott
e0d439472f Allow Device Management Role Holder to update Settings strings.
Test: manual
Bug: 188414370
Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
2022-01-25 19:03:24 +00:00
Mill Chen
efbcc69cc4 Fix inconsist color filling on collapsing toolbar
Some pages are updating the background color for action bar after action
bar is created, which will break the animation of collapsing toolbar. It
also causes the different color filled in the status bar and collapsing
toolbar area separately. Removing the styleActionbar method from
EntityHeaderController can fix this issue.

Fix: 187019164
Test: robotests && visual verified
1) Settings -> Apps -> See all apps -> pick up either app -> Mobile data
& Wi-Fi
2) Scrolling the content and see if the toolbar has the different color
between status bar and toolbar

Change-Id: Ic0842b9e6c48662872694534a3696c4b8900481f
2021-05-06 14:46:30 +08:00
Arc Wang
c6c4d036da [Wi-Fi] Add IMSI privacy protection warning summary
If a SIM based Wi-Fi network is not provided with IMSI
protection, Wi-Fi detail UI shows the warning summary if
the Wi-Fi network is connected.

Bug: 148283447
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiSecondSummaryController2Test
      make RunSettingsRoboTests ROBOTEST_FILTER=LinkifySummaryPreferenceTest

Change-Id: I689a75d2f0a2ae6196b2ed5985b8ff141fbac8b4
2020-04-23 14:50:18 +08:00
Dan Sandler
f9a8552f74 Support updated rendering of conversation icons.
Note that changes to channel settings now generate
onResume() for all available controllers to ensure they get
the updated drawable.

Bug: 149747760
Change-Id: I3f73c025b1d32194e3d5147d03cb781e370f2a1b
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.notification"
2020-02-26 11:09:38 -05:00
Tsung-Mao Fang
b4fc67ea24 Revert "Revert "Use system-api lib to get badged, shadowed icons(2/n)""
This reverts commit 94b8055f1c.

Reason for revert: Revert this cl and fix broken test cases.

Change-Id: I61a190b4beba8db2fe2faab45e5dd6921dc681ec
Fix: 149112222
Fix: 149090275
Test: Run all Setting robo tests
2020-02-10 15:01:43 +08:00
Bill Peckham
94b8055f1c Revert "Use system-api lib to get badged, shadowed icons(2/n)"
This reverts commit dbecbe6f61.

Reason for revert: b/149112222

Change-Id: I11981b2daacf8b07177fe906d88de05ca40810c1
2020-02-07 21:52:25 +00:00
Tsung-Mao Fang
dbecbe6f61 Use system-api lib to get badged, shadowed icons(2/n)
In order to prevent DoS attack from icon size, we're using
a system lib to help convert any loaded drawable into a flattened
bitmap with an appropriate size.

Test: Open recent app screen and then no crash
Bug: 33646131
Change-Id: Ib7eae56e19cd86667bd63b6061000c6a92deaf3b
2020-02-07 18:45:45 +08:00
Joel Galenson
6ecec01e7b Update call to use new method name.
Test: See correct shadow behavior when scrolling app info.
Change-Id: Ib6452f5caa42600330b934c50c30a42f303710ae
2019-01-31 08:19:21 -08:00
TreeHugger Robot
d47c73549b Merge "Use settingslib ActionBarShadowController" 2019-01-30 04:29:44 +00:00
Fan Zhang
1107d310f1 Use settingslib ActionBarShadowController
Change-Id: Ib70a0ca307bb98e576f2c3deb8f7aea88e59b10e
Fixes: 123311100
Test: robotests
2019-01-29 15:39:32 -08:00
Amin Shaikh
9391361438 Move SettingsLib icons to android.
Bug: 122263617
Test: make
Change-Id: Ia2ab06561824656951fbd0019e9c921442c714e1
2019-01-28 13:46:54 -05:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
tmfang
dce94bb237 Use SettingsLib's LayoutPreference
- Remove LayoutPreference in Settings source code.
- Remove unused style, layout
- Replace old imports to com.android.settingslib.widget.LayoutPreference
- Replace old XML tag to com.android.settingslib.widget.LayoutPreference

Test: robotest, manual test
Bug: 120005054
Change-Id: I9ae1ae14a16f443e11ac5d75b6038c7c5e253844
2018-11-27 13:12:53 +08:00
tmfang
dd7f99ba87 Fix action bar color in App info header
- Action bar color is same as status bar.

Test: visual
Fixes: 119893936
Change-Id: I8806295f9f42b27d14eb7f3521907a3a234b9593
2018-11-22 11:15:17 +08:00
tmfang
012b089a91 Allow below divider for all EntityHeader
- Create an method in LayoutPreference let other class can
  set divider status.
- EntityHeaderController will allow to have a below divider
  by default.

Test: visual, robotest
Bug: 116346008
Change-Id: Ic041b8fef8d22ce1b7ea48eedfbe97c708c41ce7
2018-11-20 11:52:29 +08:00
Fan Zhang
ff47b303c4 Remove call to actionWithSource.
Switch to generic action logging call.

Bug: 117860032
Test: robotests
Change-Id: Ibd7c59ac0ec8a9fa1b368b40f0453a1b42071377
2018-11-12 05:32:13 +00: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
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
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Fan Zhang
71c402b152 Misc GAR fixes
- Use colorPrimary for EntityHeader background.
- Update data usage header text to be 87% black.

Change-Id: Ic361155d7cd36a2f1cca96e918af0e3855fb8ced
Fixes: 79773433
Test: robotests
Test: visual
2018-05-21 15:37:43 -07:00
Fan Zhang
1d04fa9197 Merge "Don't use cached app icon in app info page." into pi-dev am: 7312f55549
am: 9b8684fd12

Change-Id: I99e6bf942928fe64595c1eba03c3099910fc0545
2018-05-18 16:10:25 -07:00
Fan Zhang
fcbf155b47 Don't use cached app icon in app info page.
The cache in ApplicationsState is causing a lot of damage because AS
object is not smart enough to invalidate the cache in all conditions. So
we end up having bugs like stale app label or icon in weird cases.

This change stops using the cache when loading app icon in entity
headres. This is only a stop gap solution to fix most visible (and most
frequently complained) parts of the page. We still need to address the
cache in ApplicationsState eventually.

Change-Id: Iea88ad99d4069d678d09943cfb0b0e5c94eb3326
Fixes: 79881693
Test: robotests
2018-05-18 14:31:48 -07:00
Fan Zhang
cac18e12ac Move app setting link from Entity header to pref controller
Change-Id: I13a27486a9c9b4c4fb358715d678473e63c1b624
Merged-In: I13a27486a9c9b4c4fb358715d678473e63c1b624
Fixes: 79688822
Test: robotest
2018-05-16 19:56:33 +00:00
Fan Zhang
e2346643c7 Move app setting link from Entity header to pref controller
Change-Id: I13a27486a9c9b4c4fb358715d678473e63c1b624
Fixes: 79688822
Test: robotest
2018-05-16 10:51:31 -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
HJ ChangLiao
f3be34e01b Move device detail edit button from menu to header
Move the edit button on Bluetooth device detail,
From action bar menu to header.
Use EntityHeaderController to add and control,
Rename those method because we use them on
more than one place now.

Change-Id: I3afad6baeab80895c109603e2ab13428582a4dd8
Fixes: 76206922
Test: make RunSettingsRoboTests
2018-04-17 12:33:01 +08:00
Isha Bobra
ea72074ed7 Merge "Show only 1 entry for hearing aid devices without killing the activity." into pi-dev am: d87acaf3cf
am: 595cda2d14

Change-Id: I49973a65a31f5f79722c4e4841f2dcda34128edb
2018-04-16 10:03:34 -07:00
Isha Bobra
35e217f91f Show only 1 entry for hearing aid devices without killing the activity.
This CL tries to detect Bluetooth hearing aid devices and tries to
combine the entry of the hearing aids with the same HiSyncIds and
show only 1 entry for each pair in the connected devices list.

This CL also shows 2 battery status in the device details page.

This change shows the combined entry after a user returns to the
settings activity after pressing the back button or somehow
without killing it. It also combines the entries just after pairing.

Test: RunSettingsRoboTests
Bug: 74204427

Change-Id: I47fb0bdd96b1cc972d88a4aef85d0113985d63bb
2018-04-13 22:51:58 +00:00
Jason Chang
c44097d345 [SettingsLib] Update Utils APIs usage
Update Utils.getColorAttr and similar methods in Utils to return a ColorStateList instead of a color

Bug: 74872054
Test: Force to display different color items then manually test
Change-Id: If002f9a578558e6254220c36ef556e8378d4522a
2018-04-10 21:09:39 +08:00
Shaotang Li
aab7756f08 Use colorPrimary for EntityHeader's background.
Bug: 76219670
Test: check color from screen manually.
Change-Id: If13d5cbd2bd7db1c6d9c9f840281601ab78ba267
2018-03-31 11:09:30 +08:00
Doris Ling
ce55d7c6a1 Remove app info page v1 related codes.
- change to use AppInfoDashboardFragment completely
- remove InstalledAppDetails and the corresponding tests

Change-Id: I8cbdf71cadc8b5743929abbafe91185e5e39b6b2
Fixes: 69384089
Test: make RunSettingsRoboTests
2018-01-29 17:14:32 -08:00
Beverly
738b400ea0 Zen automatic rule page ui changes
- Can change rule name from header
- Text for turning on/off rule is now "Use rule" instead of on/off

Test: make ROBOTEST_FILTER=EntityHeaderControllerTest RunSettingsRoboTests -j40
Test: manual (Settings > Sound > Do Not Disturb > Turn On Automatically)
Bug: 63077372
Change-Id: Id55b02de0509f168c2470a4f875e84140eb840fa
2018-01-18 18:31:03 -05:00
Fan Zhang
9de4999015 Move styleActionBar to onStart()
Change-Id: I002c266acc0e1095269e92eb7988b1ab505e48ff
Fixes: 72097389
Test: robotest
2018-01-17 17:29:33 -08:00
Doris Ling
a0006d93bd Move AppInfoDashboardFragment into appinfo package.
- update all references to AppInfoDashboardFragment
- removed PackageUtil inner class and change the corresponding function
to be a simple method.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: Ief067e25a303ef16db20b2ca1d8840cb06eff5f9
2017-12-12 16:58:17 -08:00
Doris Ling
529e207986 Create version 2 of InstalledAppDetails
- this is the first step for converting InstalledAppDetails into
DashboardFragment
- add a feature flag to determine whether to show the new installed app
detail page.
- decouple the fragment from AppInfoBase: extends from
SettingsPreferenceFragment directly and copy all codes from
AppInfoBase.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: If1ab5b216620eaba1d6bde20e65e7a602931fd94
2017-11-17 15:37:34 -08:00
Doris Ling
a7b40995de Set drawable for the entity header app preference button.
In the entity header layout, the action buttons resource is set to null by
default. When we bind the button with the app preference action, we
should also set the drawable to the settings icon as well.

Change-Id: Ic259b4c538f529671ca5a9c67664ef32fbbb25ae
Fixes: 64826061
Test: make RunSettingsRoboTests
2017-09-01 14:52:30 -07:00
Fan Zhang
6d479d99a9 Misc fixes for settings
- Set device credential's Window flag to be SECURE. This prevents
  showing any pattern/pin in recent list.
- Disable tap sound on entity header

Fixes: 64339515
Fixes: 64413598
Test: visual
Test: runtest --path \
      tests/app/src/com/android/settings/password/ChooseLockGenericTest.java
2017-08-08 10:34:03 -07:00
Fan Zhang
75bee9bf98 App header cleanup
- Refactor the entity header layout to use LinearLayout and add id to
  content area
- Remove now unused AppHeader class
- Make entire icon+text area clickable and link to app info page
  Refactor the binding logic from bindButton to its own method.
- Remove unused MultiLinePreference

Fix: 62705377
Test: make RunSettingsRoboTests

Change-Id: I6db554695410e71b669f6fdba29d98fedc3364b9
2017-07-06 13:23:38 -07:00
Fan Zhang
a74337c627 Add logging when entity header buttons are clicked
Change-Id: I673e5b4a6c5f8736bbec72e259a82acb3f514828
Fix: 62709062
Test: make RunSettingsRoboTests
2017-06-20 16:53:14 +00:00
Antony Sargent
ff8e3e7bde Add setIconContentDescription to EntityHeaderController
This lets us set a contentDescription on the icon in entity headers
for accessibility.

Bug: 62068874
Test: make RunSettingsRoboTests
Change-Id: I1af7aad34aa65b616cf4edb8b144f315040a9fdd
2017-05-24 17:21:58 -07:00
Fan Zhang
841d1d5aab Show shadow when entity header starts scrolling.
- Add a controller to manage add/remove onScrollChangedListener to
  recyclerviews.
- When recyclerview on each screen is scrolled to top, set actionbar
  elevation to 0, otherwise set it to non-zero.
- When screen is moved to background, detach the listener.
- Use the controller in entity header.

Change-Id: Iecf194d885098c98c392810f62893ae9189f3936
Fix: 37670670
Test: make RunSettingsRoboTests
2017-05-22 17:16:24 -07:00
Fan Zhang
98289a887b Use entity header on AccountDetailDashboardFragment
Bug: 37669238
Test: make RunSettingsRoboTests
Change-Id: Iaf92730e8c6b5c44cb8eca4525fc931487ce9630
2017-05-18 16:36:32 -07:00
Fan Zhang
d7414259d0 Move entity header controller out of application package.
Bug: 37669238
Test: rerun robotests
Change-Id: I54eb30f28fa0a88a6f0b97b53f9f1408320b5ce0
2017-05-18 16:36:32 -07:00