Commit Graph

6838 Commits

Author SHA1 Message Date
TreeHugger Robot
346063dd5c Merge "Dynamically showing "driving mode"" into pi-dev 2018-05-22 02:48:34 +00:00
timhypeng
78eb5a81ba Make device discoverable in Connected Devices settings page
* Set preference title by bluetooth state
* Enable bluetooth discoverable mode in Connected device page
* Add more test cases for DiscoverableFooterPreferenceController

Bug: 79294219
Test: make -j50 RunSettingsRoboTests
Change-Id: I6d4f8ec3870c43bf48e9666eabd60068aa8950bb
Merged-In: I6d4f8ec3870c43bf48e9666eabd60068aa8950bb
2018-05-22 02:15:12 +00:00
timhypeng
4f636b90b8 Add bluetooth discoverable footer preference in connected devices page
* Dynamicly add preference in controller
* Add test cases for DiscoverableFooterPreferenceController

Bug: 79294219
Test: make -j50 RunSettingsRoboTests
Change-Id: Id4c1e86c9a0a0cd69d8106a18f2cf4a0fa31782b
Merged-In: Id4c1e86c9a0a0cd69d8106a18f2cf4a0fa31782b
2018-05-22 02:14:38 +00:00
Lei Yu
d06d1165eb When restrict, use uid inside AppInfo
Before this CL, we use packageManager to get uid for battery
restriction. However it may not be correct all the time.

For example, RestrictedAppDetails will be opened as main user
however inside we also show work profile apps, in this case
we can't get correct uid by only using normal API in PackageManager.

This CL change it to use uid from AppInfo, which is correct all
the time.

Bug: 79992590
Test: RunSettingsRoboTests
Change-Id: Id33a5f6409d6bace0d756e5ac06432acb8b2cf65
2018-05-22 02:02:06 +00:00
Erik Kline
aee4396874 Factor in PRIVATE_DNS_MODE_DEFAULTSETTING value
This setting can be used to change the in-code default.

Test: as follows
    - built, flashed, booted
    - make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest passes
    - make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest passes
Bug: 79719289
Change-Id: I27e5fb9cc66dde1df72395c22179bca3f62ef782
2018-05-22 10:52:55 +09:00
hughchen
a47e64829d Dynamically showing "driving mode"
Dynamically showing "driving mode" in "Connection preferences" summary.
In cl/196700988, when driving mode is available/not available will using
Settings.System to set flag.
Example :
driving mode is available : Settings.System.putInt(mContentResolver,
DRIVING_MODE_SETTINGS_ENABLED, 1)
driving mode is not available : Settings.System.putInt(mContentResolver,
DRIVING_MODE_SETTINGS_ENABLED, 0);

This CL using Settings.System to get driving mode state that used to dynamically
showing "driving mode"

Bug: 79299421
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedConnectedDeviceControllerTest
Change-Id: I702fa4fbc752c7b470184cf58f2e604f9f28c057
Merged-In: I702fa4fbc752c7b470184cf58f2e604f9f28c057
2018-05-22 01:48:19 +00:00
TreeHugger Robot
8075586a2e Merge "Add action log in "Restrict app page"." into pi-dev 2018-05-22 01:32:14 +00:00
tim peng
2de77f893b Merge changes from topic "BT_Discoverable_in_Connected_Devices"
* changes:
  Make device discoverable in Connected Devices settings page
  Add bluetooth discoverable footer preference in connected devices page
2018-05-22 01:23:34 +00:00
Lei Yu
95d067760b Add action log in "Restrict app page".
This CL adds confirmation dialog in "Restrict app page". By go through
BatteryTipDialogFragment, it will find the correct action, in which
we already have log:
1. RestrictAppAction
2. UnRestrictAppAction

Bug: 79992590
Test: RunSettingsRoboTests
Change-Id: I179fbd17a012528fdfacf42e4a93943eaefff23d
Merged-In: I179fbd17a012528fdfacf42e4a93943eaefff23d
2018-05-22 00:35:12 +00:00
TreeHugger Robot
e0e8d122fa Merge "Add action log in "Restrict app page"." 2018-05-22 00:34:35 +00:00
TreeHugger Robot
b084c97ef7 Merge "Misc GAR fixes" 2018-05-21 23:40:29 +00:00
Lei Yu
38ea79d024 Add action log in "Restrict app page".
This CL adds confirmation dialog in "Restrict app page". By go through
BatteryTipDialogFragment, it will find the correct action, in which
we already have log:
1. RestrictAppAction
2. UnRestrictAppAction

Bug: 79992590
Test: RunSettingsRoboTests
Change-Id: I179fbd17a012528fdfacf42e4a93943eaefff23d
2018-05-21 15:42:08 -07:00
Matthew Fritze
f59a77ca23 Fix availability status for AOD gestures
Double tap screen to wake and lift to check phone
are dependent on AOD - and should return DISABLED DEPENDENT
SETTING when AOD is turned on.

Test: robotests
Change-Id: Ib246070ee853185459628b2584ddbae72e15a2f8
2018-05-21 15:41:39 -07:00
Fan Zhang
3ab53bbd7b Misc GAR fixes
- Use colorPrimary for EntityHeader background.
- Update data usage header text to be 87% black.

Change-Id: Ic361155d7cd36a2f1cca96e918af0e3855fb8ced
Merged-In: Ic361155d7cd36a2f1cca96e918af0e3855fb8ced
Fixes: 79773433
Test: robotests
Test: visual
2018-05-21 22:38:24 +00: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
TreeHugger Robot
f703d1cb3b Merge "Set click listeners on displayPreference" 2018-05-21 22:18:53 +00:00
Matthew Fritze
46f40517be Fix availability status for AOD gestures
Double tap screen to wake and lift to check phone
are dependent on AOD - and should return DISABLED DEPENDENT
SETTING when AOD is turned on.

Test: robotests
Change-Id: Ib3f40c38bb210d0f512736746dc45a1b844c6bee
Merged-In: Ib246070ee853185459628b2584ddbae72e15a2f8
Fixes: 79779562
2018-05-21 15:13:20 -07:00
TreeHugger Robot
df5a331270 Merge "Dynamically showing "driving mode"" 2018-05-21 17:38:18 +00:00
Beverly
14a6856d37 Set click listeners on displayPreference
Cherry-picked from pi-dev
Test: manual (tap options multiple times with talkback on)
Test: ZenModeVisEffectsCustomPreferenceControllerTest, robotests
Change-Id: Iffa701fb486bd9eeda7d2c4c46cb30392a09a5df
Fixes: 79728671
2018-05-21 11:19:13 -04:00
timhypeng
444d490e7f Make device discoverable in Connected Devices settings page
* For fix the TreeHugger error in pi-dev, cherry pick the ag/4042235 in
  master and fix TreeHugger error. Change android.support.v7.* to androidx.*
* Set preference title by bluetooth state
* Enable bluetooth discoverable mode in Connected device page
* Add more test cases for DiscoverableFooterPreferenceController

Bug: 79294219
Test: make -j50 RunSettingsRoboTests
Change-Id: I6d4f8ec3870c43bf48e9666eabd60068aa8950bb
2018-05-21 10:42:36 +00:00
timhypeng
dd2d5c192f Add bluetooth discoverable footer preference in connected devices page
* For fix the TreeHugger error in pi-dev, cherry pick the ag/4042014 in
  master and fix TreeHugger error. Change android.support.v7.* to androidx.*
* Dynamicly add preference in controller
* Add test cases for DiscoverableFooterPreferenceController

Bug: 79294219
Test: make -j50 RunSettingsRoboTests
Change-Id: Id4c1e86c9a0a0cd69d8106a18f2cf4a0fa31782b
2018-05-21 10:41:54 +00:00
Jason Chang
a76797e756 [SettingsLib] Update Utils.getColorAccent() and Utils.getColorError() to return ColorStateLists instead of colors.
Update Utils.getColorAccent() and Utils.getColorError() to return ColorStateLists instead of colors and change every callers entry.

Bug: 78215054
Test: manually test for UI
Change-Id: Ie201aee439bd9e8337eca989b4cdc836a6e8e917
2018-05-21 17:23:41 +08:00
hughchen
29c96ed090 Dynamically showing "driving mode"
* For fix the TreeHugger error in pi-dev, cherry pick the ag/4062037 in
  master and fix TreeHugger "Automatic merge failed" error
* Dynamically showing "driving mode" in "Connection preferences" summary.
  In cl/196700988, when driving mode is available/not available will using Settings.System to set flag.
  Example :
  driving mode is available : Settings.System.putInt(mContentResolver, DRIVING_MODE_SETTINGS_ENABLED, 1)
  driving mode is not available : Settings.System.putInt(mContentResolver, DRIVING_MODE_SETTINGS_ENABLED, 0);

  This CL using Settings.System to get driving mode state that used to dynamically showing "driving mode"

Bug: 79299421
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedConnectedDeviceControllerTest
Change-Id: I702fa4fbc752c7b470184cf58f2e604f9f28c057
2018-05-21 16:30:46 +08:00
hughchen
5a8b5dd431 Using static method to get summary resource id am: 7f1345c3cd
am: 6a4174a079

Change-Id: I91b805e89e9f3d5a3259f10401a9963d25cb32e1
2018-05-21 00:12:18 -07:00
hughchen
7f1345c3cd Using static method to get summary resource id
* Using getConnectedDevicesSummaryResourceId() to get the resource id to shown the summary.

Bug: 79299421
Test: make -j50 RunSettingsRoboTests
Change-Id: I268de4d989fe01eff463a5ec1c0a174e094e56c0
2018-05-21 04:08:46 +00:00
Gilbert Lee
0b4722f088 delete DeviceInfoSettings and activity, pref xml
Fixes: 78653510
Test: Manual

Change-Id: I13379f3f7812ceedffc0e9647db15e6358a3dc17
2018-05-20 16:17:43 +08:00
Chienyuan
c96606500f Add developer options toggle for Bluetooth A2DP hardware offload
Bug: 63932139
Bug: 79568680
Test: robotests
Change-Id: I54943cb591be1bfed0cdfe7eebf90bad64ce13c7
Merged-In: I54943cb591be1bfed0cdfe7eebf90bad64ce13c7
2018-05-18 23:40:22 -07:00
Chienyuan
ea14ef88ee Add developer options toggle for Bluetooth A2DP hardware offload
Bug: 63932139
Bug: 79568680
Test: robotests
Change-Id: I54943cb591be1bfed0cdfe7eebf90bad64ce13c7
2018-05-18 23:12:28 -07:00
TreeHugger Robot
0e721c598e Merge "Make user explicitly set security type for tether network" into pi-dev 2018-05-19 03:17:17 +00:00
Salvador Martinez
d9bae5a15e Make user explicitly set security type for tether network
This was made implicit which is confusing for the user so this CL
adds a preference to make the user manually choose their security
type.

Test: robotests
Fixes: 79435112
Change-Id: Ie78806e8952b52e1b7cd21f0b87c9d064acaff64
Merged-In: Ie78806e8952b52e1b7cd21f0b87c9d064acaff64
2018-05-19 02:14:18 +00:00
Lei Yu
dc6634fd4a Merge "Refine update process for restrict tip." into pi-dev am: 018548b320
am: 0e0bf4672b

Change-Id: I55e46cc96c6fd6be9e726e08bd3ac00f22ba4c5a
2018-05-18 19:13:57 -07:00
TreeHugger Robot
2835348b72 Merge "Make user explicitly set security type for tether network" 2018-05-19 02:05:20 +00:00
TreeHugger Robot
018548b320 Merge "Refine update process for restrict tip." into pi-dev 2018-05-19 01:55:05 +00:00
TreeHugger Robot
871d93a564 Merge "Settings: Add logical camera default switch" into pi-dev 2018-05-19 01:27:11 +00:00
TreeHugger Robot
863b27270d Merge "Add controller to show the summary" into pi-dev 2018-05-19 01:26:12 +00: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
Shuzhen Wang
a9578a2b8a Settings: Add logical camera default switch
Add a switch to make logical camera as default camera (with smaller
camera id) for 3rd party app.

Test: Manually using Settings app, RunSettingsRoboTests
Bug: 77600932
Change-Id: I86c7f3b9830fb376b324621feb31cdfac59faee5
Merged-In: I86c7f3b9830fb376b324621feb31cdfac59faee5
2018-05-18 23:01:03 +00:00
TreeHugger Robot
f5e52c421b Merge "Settings: Add logical camera default switch" 2018-05-18 22:58:35 +00:00
TreeHugger Robot
7312f55549 Merge "Don't use cached app icon in app info page." into pi-dev 2018-05-18 22:43:35 +00:00
Salvador Martinez
f3d532f43d Make user explicitly set security type for tether network
This was made implicit which is confusing for the user so this CL
adds a preference to make the user manually choose their security
type.

Test: robotests
Bug: 79435112
Change-Id: Ie78806e8952b52e1b7cd21f0b87c9d064acaff64
2018-05-18 15:21:07 -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
Beverly
2f2a4d97e7 DO NOT MERGE Set click listeners on displayPreference
Test: manual (tap options multiple times with talkback on)
Test: ZenModeVisEffectsCustomPreferenceControllerTest, robotests
Change-Id: Iffa701fb486bd9eeda7d2c4c46cb30392a09a5df
Bug: 79728671
2018-05-18 21:24:37 +00:00
Shuzhen Wang
5aab8d9ee1 Settings: Add logical camera default switch
Add a switch to make logical camera as default camera (with smaller
camera id) for 3rd party app.

Test: Manually using Settings app, RunSettingsRoboTests
Bug: 77600932
Change-Id: I86c7f3b9830fb376b324621feb31cdfac59faee5
2018-05-18 14:09:00 -07:00
Lei Yu
551a1a0176 Refine update process for restrict tip.
When restrict tip update, we should also update app list unless it goes
from NEW to INVISIBLE. After that it won't show "0 apps been
restricted".

Change-Id: Iedf4288fcddfe632a9ba8c16afdfb5bc044bce2e
Fix: 79890132
Test: RunSettingsRoboTests
2018-05-18 13:00:03 -07:00
TreeHugger Robot
42ef3471e4 Merge "Add controller to show the summary" 2018-05-18 19:34:48 +00:00
hughchen
a2a26442eb Merge "Update UI when BT device is rename" into pi-dev am: 77d218ab72
am: 3053922340

Change-Id: I86bd3be4f017f5bd80a2308a5b1e99366027a476
2018-05-18 12:27:08 -07:00
TreeHugger Robot
e7906cb910 Merge "Add Intentfilter BasePreferenceController" into pi-dev 2018-05-18 18:41:53 +00:00
hughchen
c24a09e593 Add controller to show the summary
* For fix the "Automatic merge failed" in pi-dev, cherry pick the ag/4036738 in
  master. Change android.support.* to androidx.*
* Add AdvancedConnectedDeviceController that used to show which component is available
* Add getConnectedDevices Summary Resource Id() to decide which string should be shown.
  Here have  4 cases to shown the string.
  case 1: driving mode available and NFC is availalbe, show "Bluetooth, driving mode, NFC"
  case 2: driving mode available and NFC is not availalbe, show "Bluetooth, driving mode"
  case 3: driving mode not available and NFC is availalbe, show "Bluetooth, NFC"
  case 4: driving mode not available and NFC not availalbe, show "Bluetooth"
* Add test to verify the summary string is correct in each condition
* Add test to verify getAvailabilityStatus() is AVAILABLE.

Bug: 79299421
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedConnectedDeviceControllerTest
Change-Id: I1048355bbd344db3ab645dd1537b4259eff57f38
2018-05-18 18:17:43 +00:00
hughchen
fd7c9650ed Add controller to show the summary
* Add AdvancedConnectedDeviceController that used to show which component is available
* Add getConnectedDevices Summary Resource Id() to decide which string should be shown.
  Here have  4 cases to shown the string.
  case 1: driving mode available and NFC is availalbe, show "Bluetooth, driving mode, NFC"
  case 2: driving mode available and NFC is not availalbe, show "Bluetooth, driving mode"
  case 3: driving mode not available and NFC is availalbe, show "Bluetooth, NFC"
  case 4: driving mode not available and NFC not availalbe, show "Bluetooth"
* Add test to verify the summary string is correct in each condition
* Add test to verify getAvailabilityStatus() is AVAILABLE.

Bug: 79299421
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedConnectedDeviceControllerTest
Change-Id: I1048355bbd344db3ab645dd1537b4259eff57f38
Merged-In: I1048355bbd344db3ab645dd1537b4259eff57f38
2018-05-18 18:17:27 +00:00
TreeHugger Robot
cf0e76b4cf Merge "Add Intentfilter BasePreferenceController" 2018-05-18 18:16:17 +00:00