Commit Graph

11506 Commits

Author SHA1 Message Date
lucaslin
09bbb51d29 Replace the hidden API to public API or other alternatives
Some of connectivity related files are going to be a part of
mainline module, so the external callers cannot call its hidden
API.
Replace the hidden API to public API or other alternatives from
the callers side.

Bug: 182859030
Test: 1. Remove "framework-connectivity.impl"
      2. atest SettingsUnitTests:InternetUpdaterTest
      3. atest SettingsUnitTests:ProviderModelSliceHelperTest
      4. atest SettingsUnitTests:MobileNetworkUtilsTest
      5. make RunSettingsRoboTests \
         ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest
      6. make RunSettingsRoboTests \
         ROBOTEST_FILTER=TetherPreferenceControllerTest
      7. make RunSettingsRoboTests \
         ROBOTEST_FILTER=WifiDetailPreferenceController2Test
      8. make RunSettingsRoboTests \
         ROBOTEST_FILTER=ContextualWifiSliceTest
Change-Id: Idd1ca57d8f2790070e9c401936c5af2a05bcfe9d
2021-04-14 11:36:54 +00:00
lucaslin
4400038635 Remove the usage of hidden API and fix the test
- Network class will be inside mainline module, so the external
callers cannot call its hidden API. Remove the usage of hidden
API.
- The orignal test looks wrong because it shouldn't set the data
of intent, it should set the extra of intent instead. (Refer to
the design of ConnectivityService.java) Fix the test and remove
the @Ignore annotation.
- Add 2 new tests to cover the case of receiving unexpected network.

Bug: 182859030
Bug: 183920404
Test: 1. Remove "framework-connectivity.impl"
      2. make RunSettingsRoboTests \
         ROBOTEST_FILTER=WifiNoInternetDialogTest
Change-Id: Ie48a1651629ad9c067728f667cdd91f2f0bccd07
2021-04-14 09:07:54 +00:00
TreeHugger Robot
feb811053f Merge "Modify Wi-Fi network details settings to restricted style" into sc-dev 2021-04-12 02:15:52 +00:00
ykhung
bdaee1431f Send fake data if there is no battey consumption entry list
Sends fake data into SettingsIntelligence if there is no data in the
battery consumption list, otherwise we don't have battery level data to
draw into the chart graph. We should draw the battery levels if it is
full-charged without any BatteryEntry data.

Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I759e769256f4aa0ec152afff5c265ee3d04c03da
2021-04-11 22:54:27 +08:00
Wesley.CW Wang
f1ca264f69 Refine battery settings layout
- Add loading text to progress bar to prevent UI flaky
 - Setup enable/disable state for battery saver switch
 - Remove battery saver page divider

Bug: 177964551
Bug: 177964753
Bug: 184626649
Test: make SettingsRoboTests, visually
Change-Id: I8e05c0c0f02710729e1f59eff23fb3f425770de9
2021-04-10 17:39:14 +00:00
Suprabh Shukla
39086c24fd Merge "Changes to "Alarms and Reminders" permission" into sc-dev 2021-04-09 22:27:50 +00:00
Abel Tesfaye
473fffa318 Merge "Add warning message when camera privacy lock is enabled for screen attention settings" into sc-dev 2021-04-09 16:31:36 +00:00
Weng Su
688fa772b9 Modify Wi-Fi network details settings to restricted style
- Show restricted text in guest mode

- Screenshot:
  https://screenshot.googleplex.com/Q5tbzn67EJigpVJ

Bug: 177573895
Test: manual test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test

Change-Id: I64c8d82518d47c7f96802f505efa380c63b9e10c
2021-04-09 23:10:24 +08:00
ykhung
cdd73e7fec Add kill-switch to distinguish chart or non-chart design
Bug: 184807417
Bug: 180607918
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Iacbb012209d552b58b774f90f5b0aeb60ce6d33d
2021-04-09 07:21:06 +00:00
Wesley Wang
57f27f7a30 Merge "Support help message when battery is unavailable(1/2)" into sc-dev 2021-04-09 04:43:06 +00:00
Wesley.CW Wang
756028aadd Support help message when battery is unavailable(1/2)
- Present help preference when battery is unavailable

Bug: 179237551
Test: make SettingsRoboTests
Change-Id: If6e82210d831123cb1169d53a18d24cb2c576b10
2021-04-09 11:24:51 +08:00
ykhung
318cc18f25 Add getBatteryHistory method to query data from SettingsIntelligence
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Idd640f8f8b07311fafc76f7b61c96c453ae7b604
2021-04-09 01:31:32 +00:00
Abel Tesfaye
5d6438391f Add warning message when camera privacy lock is enabled for screen attention settings
Test: locally with flame, make RunSettingsRoboTests -j$(nproc)
ROBOTEST_FILTER=AdaptiveSleepCameraStatePreferenceControllerTest,
AdaptiveSleepPreferenceControllerTest

Bug: 177462182
Change-Id: I9880d6b82e9a5040534aceda4ff15275e0bcf72a
2021-04-08 19:40:58 +00:00
Oli Lan
b914ec91f1 Merge "Use DeviceConfig property for default value of clipboard access notification setting." into sc-dev 2021-04-08 11:31:12 +00:00
Wesley.CW Wang
d324393fac Update battery states text to support battery feature(1/2)
- Update progress bar bottom text when receiving battery feature callback

Bug: 183689347
Bug: 177407113
Test: make SettingsRoboTests
Change-Id: Ic8b24cbb149f7e470d28327a9a1dd84bbd5673f7
2021-04-08 06:39:22 +00:00
Wesley.CW Wang
11d74e7231 Update battery states text
- Update progress bar bottom text when battery states changed(charging,
 discharging, power saver and low battery)

Bug: 183689347
Bug: 177407113
Test: make SettingsRoboTests
Change-Id: I0397eb1dea7fcb14357750f84d1d5b1a7dc7d19a
2021-04-08 05:10:34 +00:00
Suprabh Shukla
202bd8581a Changes to "Alarms and Reminders" permission
Calling AlarmManager to know the state of the permission, which is now
the source of truth, as the logic deciding the state of the permission
may change.
Also killing the app when the permission changes to denied, this avoids
the app maintaining stale state about this permission.

Test: make -j RunSettingsRoboTests
atest SettingsUnitTests:AppStateAlarmsAndRemindersBridgeTest

Manually: Toggle the state of an app to "Not allowed" and check the logs
for activity manager kill messages.

Bug: 181152252
Bug: 183136253
Change-Id: I438782eaef4caae50fd76685c675a3e45ee28d9f
2021-04-07 16:06:09 -07:00
YUKAI HUNG
8477cf1892 Merge "Remove options menu from BatteryUsage to align material next" into sc-dev 2021-04-07 17:17:04 +00:00
Abel Tesfaye
28ad67dac2 Merge "Add warning message when camera privacy lock is enabled for smart auto rotate settings fragment" into sc-dev 2021-04-07 17:13:44 +00:00
ykhung
48dce3c0b7 Remove options menu from BatteryUsage to align material next
Bug: 180607918
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I846668283d8c210f3b30fcf8c0ba5949588310d3
2021-04-07 16:03:34 +00:00
ykhung
1599313caf Remove the current battery usage chart and replace it with new one
Bug: 183921876
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I06f0eb5c09d07a9db0d1a93cda751e8fad672c79
2021-04-07 11:52:16 +00:00
Wesley.CW Wang
50f314e45d Update StringUtil#formatElapsedTime method (2/3)
- Update the usage and the test case
 - Update discharging string to follow new string doc

Bug: 183689347
Test: make RunSettingsRoboTests
Change-Id: I1e14e7da8cb02755d8cf6e12626a0d94fad87121
2021-04-07 10:19:10 +00:00
TreeHugger Robot
acacad4cdf Merge "Refine the summary of "Open by default" in "App info" page" into sc-dev 2021-04-07 09:26:24 +00:00
ykhung
b350c66d97 Move the battery components from SettingsGoogle to Settings
Bug: 183921876
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I47cbba1cbfd6cb17745e7aaaf56b22e3c9dcd30e
2021-04-07 12:09:54 +08:00
Abel Tesfaye
b7a66b3068 Add warning message when camera privacy lock is enabled for
smart auto rotate settings fragment

Test: locally with flame, make RunSettingsRoboTests -j$(nproc)
ROBOTEST_FILTER=SmartAutoRotateCameraStateControllerTest,SmartAutoRotateControllerTest

Bug: 177462182
Change-Id: If443bd2456f3fbe76876777be912b204a50f4088
2021-04-06 19:49:04 +00:00
Kholoud Mohamed
0a848989f2 Merge "Ignore failing test" into sc-dev 2021-04-06 13:37:12 +00:00
kholoud mohamed
f89306dace Ignore failing test
Temporarily ignore the following failing presubmit test until the culprit
change is found
InteractAcrossProfilesDetailsTest#getPreferenceSummary_appOpNotAllowed_returnsNotAllowed

Test: atest InteractAcrossProfilesDetailsTest
Bug: 184238335
Change-Id: Ia6aa957bc0928e3a82465f35eda99938d34f19c4
2021-04-06 14:36:05 +01:00
Sunny Shao
41db38c0af Refine the summary of "Open by default" in "App info" page
Fixes: 184597364
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.applications.appinfo
Change-Id: I9e453c719e5d06570ab1093ffe5510c3e9c7567b
2021-04-06 17:35:57 +08:00
Sally Yuen
9aff855052 Merge "[Reduce Bright Colors] Use a switch preference" into sc-dev 2021-04-05 16:15:31 +00:00
sallyyuen
166c89890e [Reduce Bright Colors] Use a switch preference
Test: atest ReduceBrightColorsPreferenceControllerTest, manual
Bug: 128465252
Change-Id: I824af24e545d38bad74613147328cf51108a9127
2021-04-05 16:14:59 +00:00
Edward Cunningham
aacf7bd6f0 Merge "Improve installer attribution in App Info." into sc-dev 2021-04-02 16:44:03 +00:00
Edward Cunningham
faf44124ba Improve installer attribution in App Info.
When an app is installed by the Package Installer app on behalf of
another app (eg. a browser, file manager or app store that opens an APK
via an activity start), it is preferable to attribute the install to the
originating app rather than the 'Package Installer' itself.

Since Android R, package manager keeps track of the necessary install
source information which enables this more precise attribution. If an
originating package is recorded and was set by a system app, we use this
as the user-visible 'installer'.

Bug: 182365285
Test: make RunSettingsRoboTests
Change-Id: Ibb329d6fe8f0fa2ad51d3530a219b2d8b8d6c17b
2021-04-02 12:45:43 +01:00
TreeHugger Robot
a0ada5af53 Merge "Fix BatteryInfo test fail" into sc-dev 2021-04-02 03:25:07 +00:00
Jason Hsu
4e95be4aa2 Merge "Remove unused code" into sc-dev 2021-04-01 15:27:21 +00:00
Wesley.CW Wang
7366d71702 Fix BatteryInfo test fail
- rollback part of ag/14063746

Bug: 183689347
Test: make RunSettingsRoboTests
Change-Id: I11129713dac2584c54890f65af53ce76b0672b8d
2021-04-01 14:31:14 +00:00
tim peng
6f96226f45 Merge "[Rohan]The battery level show up "-1%", not sync with Rohan." into sc-dev 2021-04-01 13:25:31 +00:00
Wesley Wang
e949d0f870 Merge "Fix testing fail for BatteryInfoTest and HighUsageTipTest" into sc-dev 2021-04-01 11:30:22 +00:00
Wesley.CW Wang
d7e0fa959b Fix testing fail for BatteryInfoTest and HighUsageTipTest
- Fix the test fail from ag/14048547

Bug: 183689347
Test: make RunSettingsRoboTests
Change-Id: Ia7a0d0fa567b1826a42b304a04e627e3b0e5f896
2021-04-01 18:28:14 +08:00
jasonwshsu
6e33293fa3 Remove unused code
* isColorTransformAccelerated() already moved to ColorDisplayManager
* TurnScreenDarker fragment already moved to top level accessibility settings or TextAndDisplay fragment

Bug: 174829936
Test: manual test
Change-Id: I34ec6947129a5042d573e94eabe3c24c2fe761b5
2021-04-01 09:41:11 +00:00
Tim Peng
7246a4f842 [Rohan]The battery level show up "-1%", not sync with Rohan.
-Hide battery information when it is unknown

Bug: 184017556
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedBluetoothDetailsHeaderControllerTest
Change-Id: I5f94ccae364f1420e04af21ba425c29ac6a11dd2
2021-04-01 15:40:54 +08:00
YUKAI HUNG
971dc476c3 Merge "Fix testing fail for BatteryEntryTest from patch ag/14008232" into sc-dev 2021-04-01 07:10:22 +00:00
Wesley.CW Wang
6d836d2d51 Update low battery tips string
- Screenshot: https://screenshot.googleplex.com/33zJkqsTex8r49W.png

Bug: 183689347
Test: make RunSettingsRoboTests
Change-Id: I864c555c3e500bf4ae5364db8dd6c86be564b883
2021-04-01 06:30:08 +00:00
Hugh Chen
cf2dc5107b Merge "Revert "Fix bluetooth settings will broadcast to anywhere when some cases"" into sc-dev 2021-04-01 05:40:21 +00:00
ykhung
1b8a100c7a Fix testing fail for BatteryEntryTest from patch ag/14008232
Bug: 184138623
Test: make RunSettingsRoboTests
Test: make RunSettingsGoogleRoboTests
Change-Id: Ic770b09cc303a9f213e31174f279940c2aa1f87d
2021-04-01 13:40:11 +08:00
Hugh Chen
802cb176d0 Revert "Fix bluetooth settings will broadcast to anywhere when some cases"
This reverts commit 9d00364da4.

Reason for revert: This fix have a regression, for not blocking b/183344112 revert it.

Change-Id: Ic4366b51e07b43c8d64d2e145563d8a30cb0fc60
2021-04-01 02:24:51 +00:00
Bill Lin
e3e3fc915a Merge "2/ Make One handed mode support multiple user switch" into sc-dev 2021-04-01 02:02:39 +00:00
Wesley.CW Wang
fdfda5e589 Update battery progress bar
- Setup state text to bottom text view
 - Remove battery state icon
 Screenshot: https://screenshot.googleplex.com/At9tAVDgnoQBtNS.png

Bug: 177407113
Test: make RunSettingsRoboTests
Change-Id: I86cfe83982da70b8fc49386f388c1a068295e205
2021-03-31 17:04:24 +00:00
Jernej Virag
512419a454 Fix error in PowerMenuSettingsControllerTest
"allUnavailable" should actually mean long press on power menu unavailable as well.

Bug: 184138823
Test: make RunSettingsRoboTests
Change-Id: Idee6b0a665941d5840166331f76e571e2539bd2e
2021-03-31 13:53:27 +00:00
Bill Lin
49ba85dc8a 2/ Make One handed mode support multiple user switch
Previously OHM did not support for multile user switch.
We get current user id in settings and get/put settings value
with currentUserId.

Test: manual switch user and check Settings > System > Gesture > One-Handed
Test: make RunSettingsRoboTests -j40

Bug: 182278800
Change-Id: I12dcc7b634ae19375358733357dc95197e81067c
2021-03-31 17:48:23 +08:00
Yanting Yang
6ef0b34a32 Merge "Make work profile sounds section as its own entry" into sc-dev 2021-03-31 08:08:41 +00:00