Commit Graph

47118 Commits

Author SHA1 Message Date
hughchen
70758584dc Check the device is connected when receive onProfileConnectionStateChanged()
Use isFilterMatched() to decide the prefernce should be added
or removed when receive onProfileConnectionStateChanged()

Bug: 80161203
Test: make -j42 RunSettingsRoboTests
Change-Id: Icccdb9007b587d3f481a23856edd7b2f7c9b04e0
2018-07-31 16:49:12 +08:00
tmfang
4b5cbca5c8 Fix windows leaked in ZenModeScheduleRuleSettings
ZenModeScheduleRuleSettings creates an DaysDialog when user clicked
Days option.

If Activity was destroyed suddenly, WindowsManager throws a windows leaked exception.
And then DaysDialog try to do something(dismiss), settings app will crash.

So, we need to dismiss dialog when activity was destroyed.

Test: robo test, change code to recover symptom, manual test
Change-Id: I8d5370fe9673573581d613da91c7ab9be55d8199
Fixes: 111841375
2018-07-31 16:45:07 +08:00
TreeHugger Robot
d0898cd6a3 Merge "Unable to send files over Bluetooth OPP" 2018-07-31 07:37:13 +00:00
TreeHugger Robot
3cb78ef2fc Merge "Remove UsbModeChooserActivity in AndroidManifest" 2018-07-31 07:26:48 +00:00
tmfang
6f980feeba Unable to send files over Bluetooth OPP
DevicPickerActivity switches to an androidx fragment in layout of bluetooth_device_picker.
But android.app.Activity doesn't support androidx fragment.
So, let DevicePiackerActivity extend androidx FragmentActivity.

Change-Id: I5da98a5e2242b75d2205a786bf373b81dfe6f613
Fixes: 112010509
Test: manual test, robo test
2018-07-31 14:27:55 +08:00
TreeHugger Robot
1b47c056b2 Merge "Use BluetoothAdapter instead of LocalBluetoothAdapter" 2018-07-31 04:54:43 +00:00
hughchen
e94b02206e Use BluetoothAdapter instead of LocalBluetoothAdapter
LocalBluetoothAdapter only has a few APIs that is not supported
by BluetoothAdapter, and lots of LocalBluetoothAdapter function
pass parameter to BluetoothAdapter directly.
Do the refactor in Settings, use BluetoothAdapter instead of
LocalBluetoothAdapter.

Bug: 111769754
Test: make -j42 RunSettingsRoboTests
Change-Id: I88e5a8377b5d1106c7679e6a8c3fd1ca1a80ea6f
2018-07-31 11:35:36 +08:00
tmfang
0f828239d4 Remove UsbModeChooserActivity in AndroidManifest
UsbModeChooserActivity was removed since b/70848054,
So, we also removed it in AndroidManifest.xml.

Change-Id: I42a3330eec46ac957beeb384ef7d0c130f2f82e3
Fixes: 111968651
Test: robo
2018-07-31 11:21:37 +08:00
TreeHugger Robot
89d35f949c Merge "Add Hearing Aid UI into Settings-Accessibility App" 2018-07-31 02:53:01 +00:00
Dieter Hsu
ab45297ec2 Merge "Adding icon to color correction mode" 2018-07-31 00:57:33 +00:00
TreeHugger Robot
d22671aed1 Merge "Remove BluetoothFeatureProvider and impl" 2018-07-30 20:53:02 +00:00
TreeHugger Robot
25c9375b6a Merge "Fixed AutofillPreferenceCategory so it's UI is properly refreshed." 2018-07-30 18:27:40 +00:00
Fan Zhang
37f805a192 Remove BluetoothFeatureProvider and impl
It's not used by anything

Change-Id: I03a73461a391657b8efbce13670a0c92fc4e3565
Fixes: 111940586
Test: rebuild
2018-07-30 11:00:04 -07:00
Felipe Leme
a305b779e8 Fixed AutofillPreferenceCategory so it's UI is properly refreshed.
Test: manual verification
Test: runtest --path packages/apps/Settings/tests/unit/src/com/android/settings/core/PreferenceControllerContractTest.java
Bug: 65700540
Bug: 111838239

Change-Id: If4e80a47d65aea34b94271e43ac38612373f4fa2
2018-07-30 09:58:59 -07:00
TreeHugger Robot
791b34b303 Merge "Settings crashes on opening Wi-Fi Add network" 2018-07-30 16:18:12 +00:00
TreeHugger Robot
fbfca0428b Merge "Fix leaked windows exception in WifiDialogActivity" 2018-07-30 16:16:20 +00:00
Chienyuan
20002d0309 Remove obsolete parameter from addDevice
Bug: 111966655
Test: build pass
Change-Id: I2f9475ad6b7588946421e852f0724ae616b107ba
2018-07-30 20:22:40 +08:00
tmfang
656e94cc06 Fix leaked windows exception in WifiDialogActivity
WifiDialog was created by WifiDialogActivity.
If activity was destroyed suddenly, WifiDialog can't dismiss itself.

So, we need to dismiss dialog, when activity was destroyed.

Test: robo and manual test
Bug: 111841375
Change-Id: I8aaf1c78e72144bf7c9cbc2392bce30e715d86e9
2018-07-30 18:52:02 +08:00
timhypeng
53a12ee7b8 Add Hearing Aid UI into Settings-Accessibility App
- dynamically show/hide preference by HearingAid profile is supported or not
- add AccessibilityHearingAidPreferenceController to handle hearingAid preference
- add HearingAidDialogFragment to handle dialog behavior

Bug: 109948484
Test: make -j50 RunSettingsRoboTests

Change-Id: Ic55dde475dc40311f7e652f4a86d342597f09f0e
2018-07-30 16:48:39 +08:00
tmfang
5ade2f1976 Fix some crash cases when we launch AlertDialog
AlertDialog needs to use App.Compat theme.

Change-Id: Icef2f5b5cf2d614f98fd1d793e88c6a7349b1380
Fixes: 111888332
Test: robo
2018-07-30 16:38:49 +08:00
TreeHugger Robot
64771b5382 Merge "Clean up task affinity." 2018-07-28 02:09:48 +00:00
Fan Zhang
f732c3a0e3 Clean up task affinity.
If activity is launched through external intent, back button should just
go back to previous screen.

Change-Id: I5b2e57d2751f5ed7c17140d3eb8d54736b78053c
Fixes: 111864355
Test: manual
2018-07-27 17:44:46 -07:00
Alexey Kuzmin
ee2f899a8b Add a reason field to vibrator service
Test: Run vibration test, see reason written to log and trace
Bug: 109654229
Change-Id: I5dbe9a5ff666535f02b5606f18438255ec8a50e8
2018-07-27 20:34:22 +01:00
Felipe Leme
0de040cef8 Merge "Added autofill options on Developer Options screen." 2018-07-27 16:02:34 +00:00
TreeHugger Robot
7fa8953b60 Merge "Fix Wifi off state UI" 2018-07-27 16:00:22 +00:00
Dieter Hsu
0c995a254e Adding icon to color correction mode
Adding icon image with red and green so users can see the
effects of changing the color correction.

Bug: 38103344
Test: Visually saw the icon appear in Settings->Accessibility->Color
Correction

Change-Id: I922b6ef2ee0f3a8e8d6ac80a14e46cd66da15195
2018-07-27 15:49:56 +08:00
tmfang
9d4a806f28 Settings crashes on opening Wi-Fi Add network
Since Theme_Settings_NoActionBar extends from Theme.DeviceDefault.Settings,
so it carshed when AppCompatDelegateImpl tried to get AppCompat theme from WifiDialog.

Test: visual inspection, robo
Change-Id: I751b771fdfa9ad2261baa5a06274f6bb0a70d677
Fixes: 111804691
2018-07-27 13:49:29 +08:00
TreeHugger Robot
59ac6e70e7 Merge "IME auto popup fail when tap on wifi access point" 2018-07-27 05:25:14 +00:00
tmfang
831ae7ad5a IME auto popup fail when tap on wifi access point
Since we migrated AlertDialog to AndroidX version,
we use App.Compat theme for AndroidX AlertDialog.

Test: visual inspection, robo
Change-Id: I7911ab7f5c6338559f4568c8e8bb52357ca2edd3
Fixes: 111731279
2018-07-27 11:47:52 +08:00
Mill Chen
de2184a67d Fix Wifi off state UI
- Apply footerPreferenceStyle to reduce the text size and text color
- Add "info" icon

Bug: 80087791
Test: visual, RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.wifi

Change-Id: I19d4f67c5a9f2fc2b542f40e051c1469ab40e7db
2018-07-27 11:10:15 +08:00
Lei Yu
5a9ff423f2 Merge changes I77a53f70,I853d3611
* changes:
  Add functions for table action.
  Create table to store user action.
2018-07-27 01:34:25 +00:00
TreeHugger Robot
143bd993ab Merge "Update AppCheckBoxPreference to show summary" 2018-07-27 00:37:43 +00:00
TreeHugger Robot
f9341c4c0b Merge "When wallpaper colors not ready set sys ui flags when ready" 2018-07-26 23:21:36 +00:00
jackqdyulei
6b09f54e06 Add functions for table action.
1. Insert/Update/Query/Delete
2. Update the action when app been restricted
3. Display restriction time in RestrictedAppDetails

Bug: 111366678
Test: RunSettingsRoboTests
Change-Id: I77a53f70e1ce4b612aabe28b7a1bb5df8f3ec9d5
2018-07-26 16:19:25 -07:00
Matthew Ng
932b20272a When wallpaper colors not ready set sys ui flags when ready
Uses a listener on wallpaper manager to get the wallpaper colors for
fallback home. When the colors are ready it can correctly set the system
ui flags.

Change-Id: I7119c0f035245539cb69bec1ccccecef64d3aff5
Fixes: 79776583
Test: reboot phone, unlock with pin/pattern with light them wallpaper
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FallbackHomeActivityTest
2018-07-26 15:22:41 -07:00
jackqdyulei
db0b4f49c9 Update AppCheckBoxPreference to show summary
The summary is invisible by default if we use preference_app.xml,
this CL turn it on if summary is not empty.

Bug: 111366678
Test: RunSettingsRoboTests
Change-Id: I3fe5827a5e80a8e21309b163dbbaa1070f5ee61e
2018-07-26 15:06:45 -07:00
TreeHugger Robot
44a8768fb1 Merge "Pass in context when loading icons from Tile" 2018-07-26 21:58:49 +00:00
jackqdyulei
ea8f2187d5 Create table to store user action.
For example, it will store when user restrict an app.

Bug: 111366678
Test: Build
Change-Id: I853d3611f260436d1f97ee7b0a40c52a8bde0678
2018-07-26 13:56:12 -07:00
Beverly
b00cef308e Use Settings.Secure values, not Global values
The following Settings are being moved to Settings.Secure
from Settings.Global since they are settings that exist
per user
 - CHARGING_SOUNDS_ENABLED
 - CHARGING_VIBRATION_ENABLED
 - ZEN_DURATION
 - SHOW_ZEN_UPGRADE_NOTIFICATION
 - SHOW_ZEN_SETTINGS_SUGGESTION
 - ZEN_SETTINGS_UPDATE
 - ZEN_SETTINGS_SUGGESTION_VIEWED

Bug: 110926544
Test: make ROBOTEST_FILTER=ZenModeDurationPreferenceControllerTest RunSettingsRoboTests
Change-Id: I3e3d6f6653b81a121fbda7d2f9f1b75651f536b7
2018-07-26 16:46:06 -04:00
TreeHugger Robot
02e4a027c9 Merge "PowerUsageSummary: move controllers to xml" 2018-07-26 20:13:44 +00:00
Fan Zhang
1c61a58f0d Pass in context when loading icons from Tile
Bug: 111860183
Test: robotests
Change-Id: I836ad66eb420f4e0bd0bbded541f4dfe947c9b18
2018-07-26 13:09:25 -07:00
Ben Lin
bc4b584446 Add a boolean flag to show or hide Private DNS in Network & internet.
The following boolean flag is added:
config_show_private_dns_settings

When set to false, Private DNS will not be shown in Network & internet.

Bug: 111398942
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest
Change-Id: I62911930680355b7fc109b295d8526bdb7eac0b3
2018-07-26 12:12:25 -07:00
jackqdyulei
076b674764 PowerUsageSummary: move controllers to xml
Also change the following controllers to have standard constructor
1. BatteryHeaderPreferenceController
2. BatteryTipPreferenceController

Change-Id: I2e68082295eb8ef18de9fef9483a10b070c77a47
Fixes: 111131567
Test: robotest
2018-07-26 11:40:28 -07:00
Felipe Leme
9bf591b832 Added autofill options on Developer Options screen.
Test: manual verification
Test: atest AutofillResetOptionsPreferenceControllerTest\
            AutofillLoggingLevelPreferenceControllerTest
Test: runtest --path packages/apps/Settings/tests/unit/src/com/android/settings/core/PreferenceControllerContractTest.java
Fixes: 65700540

Change-Id: I6b35fbf549529f4d97df164ce3fb6d641ee37650
2018-07-26 09:53:11 -07:00
Prabir Pradhan
ee8bf5d463 Merge "Add a boolean flag to show or hide the device name in About device." 2018-07-26 05:24:49 +00:00
TreeHugger Robot
c793e454ec Merge "Fix the empty preference after clicking gear icon" 2018-07-26 03:34:36 +00:00
felkachang
c2b6764057 Fix the empty preference after clicking gear icon
Because there is no other options for 'None' or 'Swipe, there is no
necessary for showing the gear icon to show options.

'Lock screen message' could be found in
Settings > Display > Lock screen display.

Add testcase to verify the ChangeScreenLockPreferenceController's
behavior.

Test: make ROBOTEST_FILTER=ChangeScreenLockPreferenceControllerTest \
      RunSettingsRoboTests -j40
Change-Id: Icdcd672261749d106162053d6f5228cee420a810
Fixes: 110848852
2018-07-26 10:16:12 +08:00
TreeHugger Robot
9d3773880d Merge "Restore the up time preference." 2018-07-26 00:50:31 +00:00
Prabir Pradhan
7758fcc6dd Add a boolean flag to show or hide the device name in About device.
The following boolean flag is added:
config_show_device_name

When set to false, the device name will not be shown in System > About
Device.

Bug: 111653180
Test: Updated robotests
Change-Id: Id9610e2009604c9d9693428adff01adc7d606565
2018-07-25 17:06:21 -07:00
TreeHugger Robot
21c8cde8a3 Merge "Clean up unused deps" 2018-07-25 23:48:14 +00:00