Commit Graph

775 Commits

Author SHA1 Message Date
SongFerngWang
1ffba4af4e [Testcase] To migration DisabledSubscriptionControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment
   to get context
3. Change Copy Right
4. remove the mock of PreferenceScreen

Bug: 173003522
Test: atest DisabledSubscriptionControllerTest.java
Change-Id: Ia99a4cf4618fcb32162485e7da5e48e3b313ce67
Merged-In: Ia99a4cf4618fcb32162485e7da5e48e3b313ce67
2021-03-04 09:41:56 +00:00
SongFerng Wang
cbc2c4f102 Merge changes I89162011,I110727b6,I1778832b
* changes:
  Settings JUnit test for PreferredNetworkModeContentObserverTest
  [Testing] Use AndroidJUnit4 instead in telephony/cdma/ test files
  [Testing] Use AndroidJUnit4 instead in MobileNetworkUtilsTest
2021-03-04 06:17:31 +00:00
Trevor David Black
d0d796c90b Add Extra App Info into Settings App UI.
Bug: b/174956516
Test: Settings -> Apps -> APP -> Extra App Info
Change-Id: Id978fb3569579f54b8399156d52c2ddeceb9bb91
2021-03-03 19:52:15 +00:00
Jeremy Goldman
3611c3e22f Settings JUnit test for PreferredNetworkModeContentObserverTest
Biggest difference here: the use of a MockContentProvider

Bug: 175389659
Test: atest -c PreferredNetworkModeContentObserverTest
Change-Id: I891620118f7e84aa1c7f9e0ccdaeb21a225dc31a
Merged-In: I891620118f7e84aa1c7f9e0ccdaeb21a225dc31a
2021-03-03 23:39:07 +08:00
changbetty
fbb61ba4d0 [Testing] Use AndroidJUnit4 instead in telephony/cdma/ test files
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. To get the original value and add @After to restore the data

Bug:
Test: atest -c CdmaListPreferenceTest
      atest -c CdmaSubscriptionPreferenceControllerTest
      atest -c CdmaSystemSelectPreferenceControllerTest
Change-Id: I110727b643a6755ee888708bd1fb2a39cf524a2d
Merged-In: I110727b643a6755ee888708bd1fb2a39cf524a2d
2021-03-03 23:35:43 +08:00
changbetty
2e763e52cf [Testing] Use AndroidJUnit4 instead in MobileNetworkUtilsTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change the Copy Right
4. Create the real object for PhoneAccountHandle and ComponentName

Bug: 164989754
Test: atest -c MobileNetworkUtilsTest
Change-Id: I1778832b0602062adb24928343c0c1d0e525942d
Merged-In: I1778832b0602062adb24928343c0c1d0e525942d
2021-03-03 23:33:00 +08:00
Zoey Chen
ea29704e40 [Telephony] Use TelephonyCallback instead of PhoneStateListener part5
Since the redesign of PhoneStateListener, use TelephonyCallback to get the callback of EVENT_*

Bug: 167684594
Test: make and atest NetworkProviderWorkerTest
Change-Id: I52af54045872bbf13e64d5d94c8b027ec702abb9
2021-03-03 16:23:52 +08:00
Sally Yuen
4d5a03da7e Merge "Call into ColorDisplayManager for RBC slider range" into sc-dev 2021-03-02 17:38:30 +00:00
TreeHugger Robot
9531fb8ffb Merge "[Provider Model] Show connected networks in APM/APM networks" into sc-dev 2021-03-02 01:53:04 +00:00
Weng Su
f1489b51a3 [Provider Model] Show connected networks in APM/APM networks
- Separate APM and APM network types from other Internet types because
they can coexist at the same time.

- Show no internet icon in airplane-mode networks.

- Show connected non-carrier(Wi-Fi) network in airplane-mode networks.

- Show connected Ethernet network when airplane mode on.

- Screenshot:
  https://screenshot.googleplex.com/cr3eWNLMEuJ8zvP
  https://screenshot.googleplex.com/6DiMqKBBnBoxxhN

Bug: 180778141
Bug: 180778839
Bug: 179106406
Test: manual test
atest -c ConnectedEthernetNetworkControllerTest \
         InternetConnectivityPanelTest \
         InternetPreferenceControllerTest \
         InternetUpdaterTest

Change-Id: I861d5ce879facbb61dfdc5b7be943662d55bdcca
2021-03-02 02:59:11 +08:00
Julia Reynolds
dc79f1ba99 Updates to NLS notif type filtering
- Allow an app to tell us they will never bridge a notification
type. We will then not let a user select that type
- Checkboxes everywhere.

Test: Settings unit
Bug: 181125165
Bug: 181124973
Change-Id: I73939d3d0e99016456e009b2f104cdded98411c6
2021-02-26 19:27:25 +00:00
sallyyuen
ade7bd8627 Call into ColorDisplayManager for RBC slider range
Test: atest ReduceBrightColorsIntensityPreferenceControllerTest
Bug: b/179805222
Change-Id: I0927f41fad27e6b9b54c374e2c6a7cc6e0c5240d
2021-02-25 10:34:16 -08:00
Suprabh Shukla
c8b9240535 Adding alarms and reminders activity
Adding a settings screen to control the permission SCHEDULE_EXACT_ALARM.
Apps can start this by starting a newly introduced API intent
REQUEST_SCHEDULE_EXACT_ALARM.

Test: make -j RunSettingsRoboTests
Manually by UI inspection:
Settings -> Apps -> Special App access -> Alarms and Reminders
or by running:
adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM

Bug: 171306433
Bug: 171305516
Change-Id: I1293d38fc50a22b2af46f80ab24f676ed632f964
2021-02-23 22:32:24 -08:00
Treehugger Robot
e5313e42cc Merge "Adding notification team members to notification directory" am: f290b00125 am: 1d7e8ae790 am: dbf857e2c7
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1600634

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If6306474d5ac4eb50686da75fc85aa15418be03f
2021-02-24 05:54:51 +00:00
Treehugger Robot
1d7e8ae790 Merge "Adding notification team members to notification directory" am: f290b00125
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1600634

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba4fb1061bbc4036b3166f8ddc3d9836f10078a1
2021-02-24 04:26:10 +00:00
Treehugger Robot
aff1b740fb Merge "Owners updates" am: 395caa5fa6 am: c309ada683 am: 9aa1396e61
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1597956

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia171da64408594c083538b047ee509dfe7d8fb20
2021-02-24 02:48:45 +00:00
Treehugger Robot
c309ada683 Merge "Owners updates" am: 395caa5fa6
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1597956

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4e1aff62b059325bf4069f4bbca35b074dabe976
2021-02-24 01:22:19 +00:00
Julia Reynolds
f2a444328c Adding notification team members to notification directory
Change-Id: Ie51b4b4ac69843b3a68957e03462d1b226abbdc0
2021-02-23 18:54:59 +00:00
Manish Singh
4b0a19f44e Merge "Introduce controller for transcode notifications" into sc-dev 2021-02-22 17:39:43 +00:00
Thiebaud Weksteen
10ebd252e0 Merge "Add onPreferenceChange_update tests" into sc-dev 2021-02-22 08:10:10 +00:00
Tom Hsu
a2b98fe18a Merge "[Provider model] Show a string on internet picker when mobile data off" into sc-dev 2021-02-22 06:46:36 +00:00
Manish Singh
cbbe9da1ad Introduce controller for transcode notifications
This is to provider users with control over whether to show transcoding
notifications or not.

By default we show the notifications.

The controller resides within the Media transcoding settings under
Developer Options.

BUG: 170973510
Test: manual. unit test added.
Change-Id: I7172f583ce4c1a53e5d5ccc07625f201852db43a
2021-02-21 18:31:06 +00:00
Xin Li
ad3fa60e26 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I35fe00aeeb112d5d9971985619e3ec5095dcdb7b
Change-Id: I07d008e38827280c9e9c6b7fa31393309f9de8a3
2021-02-21 09:25:11 -08:00
Bob Badour
0e73d05c74 [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  protos/Android.bp
  tests/anomaly-tester/Android.bp
  tests/perftests/Android.bp
  tests/robotests/Android.bp
  tests/uitests/Android.bp
  tests/unit/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: I81f11a66b5977cb5096e262819084706af5fa54c
Merged-in: I81f11a66b5977cb5096e262819084706af5fa54c
2021-02-21 08:50:16 -08:00
Weng Su
880e2ab494 Owners updates
- Add wengsu to network path for provider model feature implementation

- Add wifi/OWNERS to tests/unit/src/com/android/settings/wifi/OWNERS

Bug: 180778022
Test: N/A, just owners update
Change-Id: I9255fb4980dbbe163850be2459528a3380c15d76
2021-02-20 12:58:25 +00:00
tom hsu
00798a5902 [Provider model] Show a string on internet picker when mobile data off
- https://screenshot.googleplex.com/6JE9ma6UZmGCNFQ

Bug: 178680922
Test: Manual test passed
Test: atest passed
Change-Id: Id276e3f97b4380f648eb9e35ca7780a0ba32bdb2
2021-02-20 15:03:47 +08:00
SongFerng Wang
851a2f8557 Merge "Can't show 5GE at summary" into sc-dev 2021-02-19 09:24:12 +00:00
Thiébaud Weksteen
203b5203d9 Add onPreferenceChange_update tests
Bug: 180688212
Test: atest -c Enable2gPreferenceControllerTest
Change-Id: Ie7bc7a49f2ce4d5e8b8d75914fa46b613569566f
2021-02-19 09:24:02 +00:00
SongFerngWang
35b4725975 Can't show 5GE at summary
The 5GE has HTML tag, so it should do transformation by Html.fromHtml.

Bug: 180053606
Test: atest ProviderModelSliceHelperTest.java
Change-Id: I32ac255d50c52ce853f686ac22572fa1cb44e9cd
2021-02-19 15:57:19 +08:00
TreeHugger Robot
c9197ec51b Merge "Stop using ConnectivityManager for VPNs." into sc-dev 2021-02-18 10:28:19 +00:00
Lorenzo Colitti
5c9a042370 Stop using ConnectivityManager for VPNs.
These methods have all moved to VpnManager.

Bug: 173331190
Test: atest SettingsRoboTests
Change-Id: I1dd57fa2213b1785a94ec9d6ab4cce3a5d2684ff
2021-02-18 16:02:08 +09:00
Yomna Nasser
6d65cb995b Adds Enable2gPreferenceController and unit tests.
Adds (1) Enable2gPreferenceController, the controller for the
"Enable 2G" toggle, and (2) Enable2gPreferenceControllerTest,
the corresponding unit tests.

Test: manul & atest -c Enable2gPreferenceControllerTest
Bug: b/163168917
Change-Id: Ib827cfcfd96fdea77b586c92ae0ec5b2bd5818c3
2021-02-17 20:08:41 +00:00
Bob Badour
6695ff84d9 [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  protos/Android.bp
  tests/anomaly-tester/Android.bp
  tests/perftests/Android.bp
  tests/robotests/Android.bp
  tests/uitests/Android.bp
  tests/unit/Android.bp
  tests/unit/InstrumentedEntitlementApp/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I81f11a66b5977cb5096e262819084706af5fa54c
2021-02-12 17:08:01 -08:00
Julia Reynolds
776919fc0a Merge "Add package filtering to NLSes" into sc-dev 2021-02-12 02:16:52 +00:00
Julia Reynolds
20814ed5c7 Add package filtering to NLSes
Now users can prevent a given notification listener from seeing
notifications from particular apps.

Test: settings unit tests
Bug: 173052211
Change-Id: Ia868d6dc2da1ae7f75c0dca47034e28910584acd
2021-02-11 19:00:57 +00:00
TreeHugger Robot
f2d710cfd1 Merge "[Provider Model] Update Wi-Fi SSID in APM networks type" into sc-dev 2021-02-09 03:37:58 +00:00
TreeHugger Robot
033923a0d2 Merge "[Provider Model] 1. Use the original string for Calls & SMS 2. Set preferred status in Call & SMS" into sc-dev 2021-02-09 01:09:11 +00:00
Zoey Chen
35dcb7c7f1 [Provider Model] 1. Use the original string for Calls & SMS 2. Set preferred status in Call & SMS
1.
UX modify the string in document

Dual SIMs:
    Calls & SMS
    Google Fi (preferred), AT&T

    Calls & SMS
    Google Fi (preferred for calls), AT&T (preferred for SMS)

    Calls & SMS
    Google Fi (Temporarily unavailable), AT&T

Single SIM:
    Calls & SMS
    Temporarily unavailable

2.
UX: https://screenshot.googleplex.com/B9BETTwRoa4mfds.png
Implementation: https://screenshot.googleplex.com/4vxMLBynwdTvhEs.png

Bug: 178916743
Test: make
Change-Id: I444eb0e3361707764dae18b9fa942c7f7a80a2c6
2021-02-09 01:41:09 +08:00
Weng Su
babcd4b5c0 [Provider Model] Update Wi-Fi SSID in APM networks type
- Check Wi-Fi connected then update the SSID to summary

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

Bug: 178915286
Test: manual test
- atest InternetPreferenceControllerTest

Change-Id: I9efc2f62b7b241a4a63d0514158c8e76f0d6acc2
2021-02-08 11:33:00 +08:00
TreeHugger Robot
c30cd79f35 Merge "[Provider Model] Airplane mode slice design change" into sc-dev 2021-02-05 09:56:46 +00:00
Weng Su
6a5c02a5bb [Provider Model] Airplane mode slice design change
- Change title text:
  WiFi enabled: Turn off networks
  WiFi disabled: Turn on networks

- Add end icon with colorAccent

- The title text color changed is not included this CL.

- Screenshot
  https://screenshot.googleplex.com/44yYKphdem87UnU

Bug: 178719303
Test: manual test
atest -c AirplaneSafeNetworksSliceTest

Change-Id: I27ec111c3c9d4e228010b1495a9d0c7956ba5d74
2021-02-05 16:45:30 +08:00
Weng Su
7a62ab1fff [Provider Model] Internet Panel - Airplane mode is on
- Add "Airplane mode is on" to sub-title
  - Set the header layout to CENTER_HORIZONTAL if it's no icon

- Hide "Settings" button

- Screenshot
  https://screenshot.googleplex.com/6m5dFVZu7ar4nKW

Bug: 178717651
Test: manual test
atest InternetConnectivityPanelTest \
      PanelFragmentTest \
      ProviderModelSliceTest

Change-Id: I899a817fd99415e9cad608aa4deac1e45365696a
2021-02-04 18:48:34 +08:00
Jeremy Goldman
9e949b1920 Unique display name util uses available, rather than active, subscriptions.
Test: atest -c SettingsUnitTest
Bug: 178560175
Change-Id: Ief035cf3de3ac03fe348095f36bfb78a41f93d2c
(cherry picked from commit c14e3b3115)
Merged-In: Ief035cf3de3ac03fe348095f36bfb78a41f93d2c
2021-02-04 03:15:41 +00:00
Hall Liu
3717d5feda Merge "Rename setMobileDataPolicyEnabledStatus" into sc-dev 2021-02-03 19:54:14 +00:00
TreeHugger Robot
aa172787de Merge "WifiCallingPreferenceControllerTest migrated to junit" into sc-dev 2021-02-03 15:47:31 +00:00
SongFerngWang
6ac2e7e04b WifiCallingPreferenceControllerTest migrated to junit
Bug: 179246773
Test: atest -c WifiCallingPreferenceControllerTest
Change-Id: I9a097db77f71b31d8c92d5596ecf1794fe61a042
2021-02-03 22:11:56 +08:00
Hall Liu
68931a6911 Rename setMobileDataPolicyEnabledStatus
Rename to setMobileDataPolicyEnabled per API council comments

Fixes: 171804465
Test: atest TelephonyManagerTest
Change-Id: Ib9ff4ee01e2af4d3fd368afffa36226100f11e2d
2021-02-02 12:36:14 -08:00
TreeHugger Robot
b40e5dc89d Merge "[Provider Model] Fix InternetPreferenceControllerTest failed issue." into sc-dev 2021-02-01 17:00:04 +00:00
Weng Su
5cf4cf2660 [Provider Model] Fix InternetPreferenceControllerTest failed issue.
- Bypass system resource

Bug: 179016907
Test: manual test
- atest InternetPreferenceControllerTest
Change-Id: I860eb3173f112a7d3f820701afb1a96a06d4a296
2021-02-01 14:37:38 +00:00
Jeremy Goldman
ba8f1ad06f Merge "SubscriptionUtil checks that SubscriptionInfo is null before accessing." into sc-dev 2021-02-01 08:16:42 +00:00