Commit Graph

105 Commits

Author SHA1 Message Date
Fan Zhang
a7b04ed692 Merge "Show default app icon in default app screen." 2017-07-13 22:41:16 +00:00
Fan Zhang
2ea6700336 Show default app icon in default app screen.
- Renamed AdvancedAppSettings to DefaultAppSettings.
- Add logic to DefaultAppPreferenceController to also display icon.
- Modified DefautlAssistPrefController to suppress gear icon, and use
  the controller in default app setting UI to display icon.
- Remove dynamic injected payment setting activity and create the
  setting statically in xml.
- Add DefaultPaymentSettingsPreference to display default payment app
  title (no icon because we can't get it)

Change-Id: I6b8c768da0bafe5ec9a85ba9c79c7993b449be25
Fix: 36458534
Test: robotests
2017-07-13 13:49:28 -07:00
Doris Ling
83327ec2ab Fix failing user settings test cases.
Update preference text to match latest label.

Change-Id: I3de544bea99c193507ee3b1451dd3c67049af07c
Fix: 63665308
Test: make SettingsTests
2017-07-13 12:03:08 -07:00
Bill Yi
556bf129c9 Import translations. DO NOT MERGE
Change-Id: Ie9a5c1d5f9795c7ca3120f792300ec3d4e3cc8b7
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-07 03:01:25 -07:00
Antony Sargent
c73c4b4055 Merge "Fix Bluetooth device details crash on screen rotation" into oc-dr1-dev am: 6d50576496
am: 5438319677

Change-Id: I1595e3c80b731a4c7f86faa198f2cc6e7f05d710
2017-07-05 23:15:53 +00:00
Antony Sargent
1b6e7d76ed Fix Bluetooth device details crash on screen rotation
We were getting the following exception when you rotated the Bluetooth
device details screen:

java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.android.settings/com.android.settings.SubSettings}:
java.lang.IllegalStateException: This Activity already has an action bar
supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR
and set android:windowActionBar to false in your theme to use a Toolbar
instead.

It turns out that allowing EntityHeaderController to inflate the
settings_entity_header.xml view seems to cause this - if you instead
manually include a LayoutPreference and hand that to
EntityHeaderController, you don't have the problem.

The rotation failure couldn't be tested with Robolectric because our
version doesn't support using FragmentTestUtil.startFragment for
fragments which use PreferenceScreen's ("sorry, not yet
implemented"). So instead this includes an app test.

Bug: 62447414
Test: runtest --path=BluetoothDeviceDetailsRotationTest.java
Change-Id: I8d052d1f4ab6e2b0ca5c0e513ec366bdcc382d99
2017-06-30 16:34:40 -07:00
Julia Reynolds
559bd3651e Disable managed services special access screens...
... on low ram devices.

- Remove them from the 'Special app access' screen
- Display an error message if an app intents directly to
them

Bug: 35219985
Test: visual, and runtest --path ManagedAccessSettingsLowRamTest.java,
when the device is in low ram mode and when it's not.
Change-Id: Ied919cb248ae56683a00e3492c4737dfd00449ac
2017-06-23 15:44:43 -04:00
Fan Zhang
fdcb8b1dc8 Hide app info button from app notification settings header
Change-Id: I10803e78fe4f30c2d84ec795c343ed660aab7762
Bug: 62708686
Test: visual and runtest --path AppNotificationSettingsTest.java
(cherry picked from commit 5d811c40d3)
2017-06-16 22:30:31 +00:00
Fan Zhang
5d811c40d3 Hide app info button from app notification settings header
Change-Id: I10803e78fe4f30c2d84ec795c343ed660aab7762
Bug: 62708686
Test: visual and runtest --path AppNotificationSettingsTest.java
2017-06-16 13:12:44 -07:00
Maurice Lam
4c930fc2d5 Allow skipping PIN setup screen
So that setup wizard can show PIN option by default.

Test: Added Robolectric and instrumentation tests
Bug: 38509560
Change-Id: Id72744dd444b9b026ca5f28f230bae3bec254b2f
(cherry picked from commit 0f897d79f6)
2017-06-15 20:23:21 +00:00
Maurice Lam
0f897d79f6 Allow skipping PIN setup screen
So that setup wizard can show PIN option by default.

Test: Added Robolectric and instrumentation tests
Bug: 38509560
Change-Id: Id72744dd444b9b026ca5f28f230bae3bec254b2f
2017-06-12 18:03:02 -07:00
Matthew Fritze
824f25320a Merge "Search results always highlight proper results" into oc-dev
am: 2a32cb6a33

Change-Id: I1bc6297cc75aa833184a00598f5930aa3ca114dc
2017-06-09 01:23:39 +00:00
Matthew Fritze
33f3e3f4f7 Search results always highlight proper results
In fragments where preferences were being injected after
the super#onResume, the incorrect preference was
being highlighted as the selected result.

This is because the index of the preference is calculated
in SettingsPreferenceFragment#onResume, but the index is
not checked again before the item is highlighted.

Instead, we calculate index right before we highlight.

Change-Id: Idaa655f682a1a6186c1996fb51d352589bbeda0f
Fixes: 62179739
Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/SettingsPreferenceFragmentTest.java
2017-06-08 16:25:52 -07:00
Andrew Sapperstein
61353aa4fd Revert "Add search bar to SearchActivity."
This reverts commit fac61b71e5.

Bug: 37477506
Change-Id: I1ee66999fbb28b03feb5a51c7146f31a71c1252a
Merged-In: I4a0f0c91c51ff5820b61a596520d80a3337c3466
2017-06-06 17:29:41 +00:00
TreeHugger Robot
ee8ac88f82 Merge "Add search bar to SearchActivity." 2017-06-01 19:57:20 +00:00
Andrew Sapperstein
fac61b71e5 Add search bar to SearchActivity.
Styling doesn't look exactly right yet but there's a bar.
Creates an ItemDecoration to add a spacer above the first view.

Removes the action bar and replaces it with a SearchView
inside of a CardView.

Remaining work: pixel pushing

Bug: 37477506
Test: make RunSettingsRoboTests
Change-Id: Ibf38c3c2725551bc4cd90e98d0020ec49c2eab2b
Merged-In: I4a0f0c91c51ff5820b61a596520d80a3337c3466
2017-06-01 11:02:56 -07:00
Andrew Sapperstein
893cb0987a Add search bar to SearchActivity.
Styling doesn't look exactly right yet but there's a bar.
Creates an ItemDecoration to add a spacer above the first view.

Removes the action bar and replaces it with a SearchView
inside of a CardView.

Remaining work: pixel pushing

Bug: 37477506
Test: make RunSettingsRoboTests
Change-Id: I4a0f0c91c51ff5820b61a596520d80a3337c3466
2017-06-01 11:01:00 -07:00
Fan Zhang
c2b0c7bf31 Use a common style for custom preference icon layouts
Change-Id: Ief3bc54f700cb891041adf92846149c6f41caad0
Fix: 35961001
Test: instrumentation test
2017-05-31 17:09:15 -07:00
Matthew Fritze
2078bc2358 Remove search2 package and put everything into search
Change-Id: Ie8651c79ef023f154cd7120a88a20f3481abce2b
Fixes: 38502743
Test: make RunSettingsRoboTests
2017-05-23 13:57:28 -07:00
Maurice Lam
2eb170cd6f Clean up choose lock intent creation
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.

Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.

Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
2017-05-12 15:35:20 -07:00
Bill Yi
27dc0b5efa Import translations. DO NOT MERGE
Change-Id: I0ae57f3a1b494044e26518590797977fa331a975
Auto-generated-cl: translation import
2017-04-28 19:46:17 -07:00
Sudheer Shanka
35b23bcb53 Merge "Update ActivityMonitor.onMatchIntent to ActivityMonitor.onStartActivity." into oc-dev am: f64c5236c7
am: e3961b402a

Change-Id: Iaa78ed7a3883b2d89f736d4c88c1f755906ebb28
2017-04-28 02:27:20 +00:00
Sudheer Shanka
1bd1d8dabb Update ActivityMonitor.onMatchIntent to ActivityMonitor.onStartActivity.
Bug: 37672383
Change-Id: I63adcafc6e8dced173d52f25e8a6521ae897c9aa
Test: builds
2017-04-26 17:37:16 -07:00
TreeHugger Robot
3fb76069f3 Merge "Import translations. DO NOT MERGE" 2017-04-26 19:40:34 +00:00
Bill Yi
a3f31766c9 Import translations. DO NOT MERGE
Change-Id: Ia07692e881b02a0f4ac62f1a714eb45319d063c8
Auto-generated-cl: translation import
2017-04-25 16:01:58 -07:00
Sundeep Ghuman
87bf49a436 Force update APs when enabling wifi in WifiSettings.
This reverts commit b2bdc8f17b
and fixes a broken Espresso test case.

Reason for revert: Rolling forward after fix in ag/2133493, to fix b/37324736

Bug: b/37324736
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: I9cdf8cb1043af5d527eccbd9cc56d3b02419d7ac
2017-04-25 15:12:00 -07:00
TreeHugger Robot
b6a0360a92 Merge "Use buttons for EncryptionInterstitial" into oc-dev 2017-04-18 00:32:55 +00:00
Maurice Lam
88df6f4407 Use buttons for EncryptionInterstitial
Bug: 30742121
Test: Run EncryptionInterstitialTest via `am instrument`
Change-Id: I04d304da4153ebc7f8809ce9c640bccc5e1f5685
(cherry picked from commit 9be96e06bb)
2017-04-17 15:42:21 -07:00
Suprabh Shukla
fdc69a5452 Merge "Renaming intent action for unknown sources" into oc-dev am: 3fa963b28e
am: eb2e6c7add

Change-Id: Ifeb4c9714c77f93cb95dffcf850867c68fe06d7a
2017-04-12 04:55:28 +00:00
Suprabh Shukla
3fa963b28e Merge "Renaming intent action for unknown sources" into oc-dev 2017-04-12 04:32:51 +00:00
Fan Zhang
57c1ce4980 Merge "Revert "Revert "Convert BT preference to use TwoTargetPreference""" into oc-dev am: fd29aada6b
am: 668dae22e7

Change-Id: Ib618566f6078793be3460070e65bd78b9d0f0a59
2017-04-11 23:48:37 +00:00
Fan Zhang
00d8ff5d6e Revert "Revert "Convert BT preference to use TwoTargetPreference""
This reverts commit 457c3cbec2.

Revert with fix/test.
The fix is that we removed DevicePickerFragment#initDevicePreference(),
which incorrectly set a useless widget on preference, and removes the
gear icon from preference, preventing bind() call to go through

Change-Id: Ia70cdb51d13cca6035a4e7fe8008d195f7f00c6e
Fix: 36511169
Test: runtest --path tests/app/src/com/android/settings/bluetooth/DevicePickerActivityTest.java
2017-04-11 09:45:27 -07:00
Doris Ling
d49dfb1472 Merge "Add test to verify no crash on selecting brightness level." into oc-dev am: 43146c4972
am: 272d65c0bc

Change-Id: I5dc16b17576273d7b3e43bae69e8bc60f29ccd5d
2017-04-07 02:37:13 +00:00
TreeHugger Robot
43146c4972 Merge "Add test to verify no crash on selecting brightness level." into oc-dev 2017-04-07 02:28:47 +00:00
Suprabh Shukla
aa9fe03dfa Renaming intent action for unknown sources
Renaming action MANAGE_EXTERNAL_SOURCES to MANAGE_UNKNOWN_APP_SOURCES to
be clearer about its purpose

Test: adb shell am instrument -w -e class \
com.android.settings.applications.ExternalSourcesSettingsTest \
com.android.settings.tests/android.support.test.runner.AndroidJUnitRunner

cts-tradefed run singleCommand cts -m ExternalSources

Bug: 35812498
Change-Id: Ic6db5b3446c1890a358f5b5225d38409d1bd2c7c
2017-04-06 18:05:32 -07:00
jackqdyulei
9d78a655fa Merge "Fix crash when clicking item in Battery screen" into oc-dev am: bac9b527e7
am: 23f8052652

Change-Id: Ie1895e12f4628dd80aca7eeb41bcbeac9599dc0e
2017-04-06 23:03:55 +00:00
Doris Ling
de03809396 Add test to verify no crash on selecting brightness level.
Add UI test to launch Settings->Display->Brightness level and Settings
app does not crash.

Change-Id: I526f44961bd0efbcacde334affbe2b7a93da0ce3
Fix: 36647069
Test: make SettingsTests
2017-04-06 15:10:29 -07:00
jackqdyulei
fefdd5d47f Fix crash when clicking item in Battery screen
"last full charge/Screen usage since full charge" goes crash when
clicking on it. This is because The default behaviour for
PowerGaugePreference is to start detail page and the above two items
are PowerGaugePreference.

This cl set these two items as non-selectable.

Bug: 37080048
Test: make -j40 SettingsTest
Change-Id: Ide4e151dcd0b44fb795a5753c91f2197b2a24a56
2017-04-06 12:52:50 -07:00
Sundeep Ghuman
5c2245fca3 Merge "Create Espresso test class for WifiSettings." into oc-dev am: 8b06cbd3a9
am: 904320244d

Change-Id: Icf6780556873c04819216cfd9a162234d6106978
2017-04-05 22:16:59 +00:00
Sundeep Ghuman
d2831c31c1 Create Espresso test class for WifiSettings.
Bug: b/36403696
Test:  runtest --path
packages/apps/Settings/tests/app/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: I91306880f620c4a05bfdce35360a1edbcd8a15b7
2017-04-03 12:28:40 -07:00
Maurice Lam
97f35625b7 Merge "Revert choose lock header file to non-setup theme" into oc-dev am: 1ecbb7d16d
am: 40c22ec75a

Change-Id: I6d2d29f3166ff88a38c92b1eb3fa00c7c2abe61c
2017-03-29 16:53:56 +00:00
Maurice Lam
f8fb4806cf Revert choose lock header file to non-setup theme
The activity ChooseLockGeneric which inflates the layout file
choose_lock_generic_fingerprint_header is not setup themed, and
therefore should not use setup resources.

Test: Run ChooseLockGenericTest via `am instrument`
Bug: 36688431
Change-Id: I7286958345d1762d4a93176afe300d1e4d168f6d
2017-03-28 20:24:12 -07:00
TreeHugger Robot
9502f112e6 Merge "Use buttons for EncryptionInterstitial" 2017-03-28 23:11:41 +00:00
Julia Reynolds
e17590271f Move automatic rules to main DND settings page.
Change-Id: I32b103714d4864ab32e2c85d86106dc118f9c338
Fixes: 31050255
Test: manual
2017-03-27 15:57:39 -04:00
Maurice Lam
9be96e06bb Use buttons for EncryptionInterstitial
Bug: 30742121
Test: Run EncryptionInterstitialTest via `am instrument`
Change-Id: I04d304da4153ebc7f8809ce9c640bccc5e1f5685
2017-03-22 18:37:56 -07:00
Maurice Lam
daaf8f8bc9 Use GLIF theme for screen lock confirmation
Theme the confirm password screen similar to setup wizard and screen
lock enrollment flow, so that we can start showing it during setup
wizard.
The new layouts are called "internal" because it's supposed to be
used only when another settings screen starts it. For external
intents from CONFIRM_DEVICE_CREDENTIAL, the existing theme and layout
are unchanged.

Bug: 32373672
Test: Run ConfirmLockPasswordTest with `am instrument`
Change-Id: Ib887a763a073e6e4b96264d08846827b2e5cbf52
2017-03-15 13:26:54 -07:00
Maurice Lam
019593072b Update fingerprint enrolling flow
1. Make FingerprintEnrollFinish stay on the back stack during "add
   another"
2. Remove skip button from the enrolling screen, since the user can
   now back out of the enrollment flow, or back to
   FingerprintEnrollFinish and press "done" there.

Test: Run FingerprintEnrollFinishTest with `am instrument`
Bug: 32054268
Change-Id: Icaf017952d6582a14b4d0904b7ee67ad22e5280d
2017-03-13 10:22:06 -07:00
TreeHugger Robot
a2a09c9ce2 Merge "Adding app specific screen for "External Sources"" 2017-03-09 01:22:01 +00:00
Suprabh Shukla
f59d2115ed Adding app specific screen for "External Sources"
Adding app specific screen so that third party apps and package
installer can directly intent there to direct users to change the
setting. Also added automater tests.

Test: adb shell am instrument -w -e class \
'com.android.settings.applications.ExternalSourcesSettingsTest' \
'com.android.settings.tests/android.support.test.runner.AndroidJUnitRunner'

Bug: 33792674
Bug: 35487166

Change-Id: I5a481ee7032979df94a9e267ea74aa90da6a0906
2017-03-07 23:44:51 -08:00
Steven Ng
436256c36d Fix phishing attack in ChooseLockGeneric
Test: 1) make and run SettingsTests. It passes.
      2) Manual test 1
         a) On a device supports fingerprint, set a password but not fingerprint.
         b) adb shell am start -a android.app.action.SET_NEW_PARENT_PROFILE_PASSWORD
         c) Confirm Lock password screen is shown
         d) Select "Skip fingerprint". There isn't a second lock password confirmation screen.
         e) A new password can be set successfully.
      3) Manual test 2
         a) Repeat step 2)a) - 2)c)
         b) Select "Fingerprint + PIN". There isn't a second lock password confirmation screen.
         c) A new password and fingerprint can be enrolled successfully.

Bug: 33059280
Change-Id: I1078c6e303fc41aeeb370e5d6518d1f16b5837f1
2017-03-07 19:48:35 +00:00