Commit Graph

180 Commits

Author SHA1 Message Date
Fabrice Di Meglio
45f754e506 Add Indexable.SearchIndexProvider.getNonIndexableKeys(Context)
- getNonIndexableKeys(Context) allow a SearchIndexProvider to tell which data
he does not want to index by providing a list of the data keys
- use this new API for SoundSettings and removing KEY_EMERGENCY_TONE related
settings if the device is not CDMA
- add a BaseSearchIndexProvider for code simplification

Change-Id: I23633ace1d7e390ee05fac0a5458a33e04e72d8d
2014-04-11 11:16:33 -07:00
Fabrice Di Meglio
f66eb7a8c8 Add indexing for Storage preferences
- implement the contract for SEARCH_INDEX_DATA_PROVIDER

Change-Id: I131e9176c47ccd697d05961b09546ba0e51059f7
2014-04-02 17:18:56 -07:00
Fabrice Di Meglio
c94122a199 Merge "Fix bug #12919330 RTE in Settings: PhoneFactory probably already running" 2014-02-07 01:58:26 +00:00
Fabrice Di Meglio
3065f75e16 Fix bug #12919330 RTE in Settings: PhoneFactory probably already running
- revert changes from the CL for Drawer implementation.
- we cannot convert those Activities to fragments as they are running in the Phone process

Change-Id: I7e4033bc9b53daa7e7aa6f1fd74576375cde88e9
2014-02-06 17:51:30 -08:00
Jeff Sharkey
4d6fe13707 am abe6b835: am 1f37bff7: Merge "Total and available fields missing in Settings storage menu"
* commit 'abe6b83559d17111d067dfdef22d07cb50c302c0':
  Total and available fields missing in Settings storage menu
2014-02-06 22:43:58 +00:00
Jeff Sharkey
1f37bff7d2 Merge "Total and available fields missing in Settings storage menu" 2014-02-06 22:29:11 +00:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Amith Yamasani
ecc1730a9c am 200b6c63: am 3cfb6767: am e7d8485a: am 5be77489: Merge "Dont show "Erase SD Card" when there is none"
* commit '200b6c63237bcf1d911d5e8b48a4cd2f05d0ce3d':
  Dont show "Erase SD Card" when there is none
2014-01-07 19:23:09 +00:00
Johan Redestig
5517ad92dd Dont show "Erase SD Card" when there is none
On devices with physcal, external SD Cards, the "Erase SD card"
option in in Settings/Storage is available even when there is
no SD card present, this dont make much sense since you cannot
erase a card that is absent. With this change the erase option
is bound to the mount toggle which leads to the following
consequences:

 Card present and mounted -> Erase enabled
 Card present but unmounted -> Erase enabled
 No card present -> Erase disabled
 Card present and MTP attached -> Erase disabled

Change-Id: I756ae8af3e0565febaf940df5f4991dd89105bd9
2013-12-19 10:47:17 +01:00
The Android Open Source Project
b568548747 Merge commit 'f9ca318a3d2aceaf5c9e54610073a9017442be9b' into HEAD 2013-12-05 12:38:23 -08:00
Lorenzo Colitti
5448b25481 Dynamically update connectivity and IP address.
The settings status page dynamically updates mobile network
status (in/out of service, signal strength, network type, etc.)
but not IP address and connectivity information. Dynamically
update that information as well, for consistency.

For consistency, also update the advanced wifi settings page.

[Cherry-pick of deb8f08ace]

Bug: 10232006
Change-Id: I3a292d8bd9e36ab16c37e107eefff4b37d884a4c
2013-11-25 17:34:45 +09:00
Lorenzo Colitti
b088c8a7c7 Cache preferences and services in status dialog.
Currently, the status dialog fetches the preferences and system
services that it uses to display connectivity information (e.g.,
IP and MAC addresses) only when the dialog is first opened. This
is fine because the connectivity information is only filled in
once and never updated.

In order to have this information update dynamically (like the
rest of the dialog), fetch and cache these objects in onCreate.
The next change will actually make this information update on
network changes.

[Cherry-pick of 6eb6a90821]

Bug: 10232006
Change-Id: Ib4072674543e517cf6935e3e03f35090e728090a
2013-11-25 17:34:08 +09:00
Lorenzo Colitti
deb8f08ace Dynamically update connectivity and IP address.
The settings status page dynamically updates mobile network
status (in/out of service, signal strength, network type, etc.)
but not IP address and connectivity information. Dynamically
update that information as well, for consistency.

For consistency, also update the advanced wifi settings page.

Bug: 10232006
Change-Id: I3a292d8bd9e36ab16c37e107eefff4b37d884a4c
2013-11-15 02:38:36 +09:00
Lorenzo Colitti
6eb6a90821 Cache preferences and services in status dialog.
Currently, the status dialog fetches the preferences and system
services that it uses to display connectivity information (e.g.,
IP and MAC addresses) only when the dialog is first opened. This
is fine because the connectivity information is only filled in
once and never updated.

In order to have this information update dynamically (like the
rest of the dialog), fetch and cache these objects in onCreate.
The next change will actually make this information update on
network changes.

Bug: 10232006
Change-Id: Ib4072674543e517cf6935e3e03f35090e728090a
2013-11-15 02:38:35 +09:00
Jeff Sharkey
457284e858 am 8cd39351: am bd5cbb04: am fd845410: Merge "remove primary condition check on storage format." into klp-dev
* commit '8cd39351fe9d1164a06bb4420e2b95c5dd9259fb':
  remove primary condition check on storage format.
2013-10-25 16:14:01 -07:00
Pierre
93df01e3a7 remove primary condition check on storage format.
this change seemed to have been introduced originally
via commit d2a6f28fa7
as a workaround to fix interoperability problem with MTP,
then commit 8218d3ba18
seemed to have address this problem.

therefore it looks like removing the original restriction
is in order to allow formating of the sd-card when not
primary storage.

Bug: 11352632
Change-Id: I0419135a607dac08c44a3f30a7ccdcad17c46437
Signed-off-by: Pierre <pierre@broadcom.com>
2013-10-25 13:12:28 -07:00
Amith Yamasani
ecb9156898 am 8f4919ff: am b46e57ee: am 4a4a1b8b: Merge "Use a public media content uri for viewing local media files" into klp-dev
* commit '8f4919ffeb97994c5214011696945d08ca8beedb':
  Use a public media content uri for viewing local media files
2013-10-04 17:36:46 -07:00
Amith Yamasani
c778bc560d Use a public media content uri for viewing local media files
Bug: 11061566
Change-Id: I7e049f48d37a68a0a41b7a62383eea71f3938c44
2013-10-04 14:59:40 -07:00
Daniel Sandler
b771532330 Longpress any row in Status to copy text to the clipboard.
Really convenient for grabbing IMEI/MAC/serial/etc.

Change-Id: I30dd6109d76f342108b10571cf043158b09743d0
2013-10-02 04:17:32 +00:00
Kent Persson
62f8b9155e Total and available fields missing in Settings storage menu
After formatting SD card or inserting an SD card the total and
available space fields in Settings storage are missing.
This fix add those fields after SD card has been mounted.

Change-Id: Id6c1d1963effdb9656c8eb1c567b913bc4d98bd2
2013-06-26 16:06:49 +02:00
Jeff Sharkey
eab49cab9f Always allow formatting of physical storage.
Also rebuild UI when volume state changes after a format finishes.

Bug: 8985206
Change-Id: I6208e385711b883fb6fc77cc76cbe425d740b0a8
2013-06-05 17:52:03 -07:00
Maggie Benthall
6ad2e323f7 When user has DISALLOW_USB_FILE_TRANSFER set, disable settings controls.
Under Settings > Storage, remove the "USB computer connection" menu item.
In case someone launches the UsbSettings screen instead, also disable those checkboxes.

Change-Id: I59ec8b16bed4670beeac8d359e5368e4a659061b
2013-03-29 18:59:33 -04:00
Jeff Sharkey
cfd328b64f Allow disabling both MTP and PTP.
Require that MTP and PTP are mutually exclusive when enabled, but
allow them to be both disabled.  Users can enable them again under
Storage menu item in Settings.

Bug: 6518257
Change-Id: I43419fa619ce2c62dd5e8c14d6c645d24fd8943a
2013-03-18 15:46:35 -07:00
Jeff Sharkey
e6c5003278 Remove guava dependency to speed up build.
Change-Id: I4cee4b6324e72e94c1241e10f3cdc507d65512cd
2013-03-06 11:47:26 -08:00
Elliott Hughes
420b193069 am d7d5b33b: am 375b6d98: Merge "Force closed at settings application when delete Misc files"
* commit 'd7d5b33bcd78680d475c92fca7bafc4ac4279621':
  Force closed at settings application when delete Misc files
2013-01-22 08:03:32 -08:00
Elliott Hughes
d7d5b33bcd am 375b6d98: Merge "Force closed at settings application when delete Misc files"
* commit '375b6d985be9203fb221eb42810e586e196c34f8':
  Force closed at settings application when delete Misc files
2013-01-22 07:58:42 -08:00
Predrag Stanojevic
aee4b75aba Force closed at settings application when delete Misc files
NullPointerException in MiscFilesHandler.java, missing check to
ensure that dir.list() does not return null.

Change-Id: I13aac19949826b385610fd1fee2befb411684023
2013-01-18 08:56:19 +01:00
Amith Yamasani
3f9c9b6eae Use bindServiceAsUser() to follow API change.
Change-Id: Ib12f1dcf7f3a5df7e166b732e1c29e7e9d0869ed
2013-01-16 12:34:16 -08:00
Wink Saville
4e0391a733 am 49c4de7f: Merge "Format change at "Mobile network type" value"
* commit '49c4de7f139a1a3a60dc8f7e72acae710dba506f':
  Format change at "Mobile network type" value
2012-12-07 12:18:53 -08:00
Akira Oshimi
1fd3544c55 Format change at "Mobile network type" value
Remove "network type Number" from "mobile network type" value
at "About Phone > Status".

For example value "UNKNOWN:0" became "UNKNOWN"
(if value is "UNKNOWN", the word is localized)

The number ":0" did not add much value to the user.

Change-Id: Iee29fa2ab42f2d6eab5d9dbd6f647087ee382648
2012-12-06 09:52:55 +01:00
Jake Hamby
ac9bb0bdc0 am b39ab37a: am bc5d9271: Add latest area info broadcast to Settings status screen.
* commit 'b39ab37aa0e8be02a61c4245c181e523419ba703':
  Add latest area info broadcast to Settings status screen.
2012-12-04 20:09:34 -08:00
Jake Hamby
bc5d9271a9 Add latest area info broadcast to Settings status screen.
When the SIM has a Brazilian country code, add an item to the
status screen to show the most recently received area info cell
broadcast, requested from CellBroadcastReceiver, which also
broadcasts any updates to the area info. To read the area info
broadcast or request it from CellBroadcastReceiver requires
READ_PHONE_STATE permission.

Bug: 7445881
Change-Id: I387e23ecd0802b212ecb3e44f900a3a7a4b27e76
2012-12-04 18:18:55 -08:00
Pawit Pornkitprasan
2ea50e2b5b Settings: fix storage measurement for device without emulated sdcard
StorageMeasurement: misc files should only be measured for internal
storage only if it is the emulated storage, otherwise misc count
for the primary storage will be erroneously duplicated on the
internal storage count.

StorageVolumePreferenceCategory:
  - Always create mMountTogglePreference to avoid null pointer
    exception for code that relies on it existing
  - Check if the keys exist before calculating totalValues to
    avoid null pointer exception on storage where media is not
    calculated
  - For available/readonly, set title, not summary (summary is
    supposed to be the amount available)

Change-Id: Ib217f79ee562dffc514696fff038e58ed0dba7d9
2012-11-24 10:47:11 +07:00
Amith Yamasani
7fb91855b0 Merge "Show more settings and add restrictions/dialogs for secondary users" into jb-mr1-dev 2012-09-23 18:47:20 -07:00
Amith Yamasani
9627a8ea15 Show more settings and add restrictions/dialogs for secondary users
Bug: 7213029 crash in About>Status
Bug: 7212495 hide System updates for second user
Bug: 7212230 nickname editor should select the text
Bug: 7160487 TTS settings
Bug: 7129411 Settings needs visibility changes for secondary users

Change-Id: Ia2d1229c08b392edfa6b671fce4a382410405b14
2012-09-23 18:43:31 -07:00
Jeff Sharkey
0e9cf8a723 Storage item to represent cached data.
When touched, offers to clear all cached data.

Bug: 7216370
Change-Id: I86afe66b819fb7deeba909bef507925fc5a590f3
2012-09-23 17:49:31 -07:00
Jeff Sharkey
fda48e39d3 Always show auto-sync; user-specific storage.
Auto-sync is per-user, so show it to all users.  Also create user-
specific path when showing misc storage items.

Bug: 7179485, 7177335
Change-Id: I9f6029e22d519a5516a0f1a76e6aa55db3c2832c
2012-09-18 15:09:35 -07:00
Jeff Sharkey
ec6e662688 Treat cache storage usage as available space.
Bug: 7123160
Change-Id: I1b3f36622be557d7c47f1452832f67da40893a02
2012-09-14 13:01:52 -07:00
Jeff Sharkey
da13ec0cb4 Iteration on multi-user Storage UI.
Now that DefaultContainerService has visibility of external storage
for all users, we can measure internal storage in a single pass.
Internal storage measurement now iterates across all known users,
counting both apps and emulated storage usage.

Create MeasurementDetails object with documentation about what is
counted under various device configurations.  Generalize to measure
each Environment.DIRECTORY separately, so it can be combined as
needed.  General cleanup of how measurements are passed to UI.

Bug: 7003520
Change-Id: Ib89c185296a0c9debdc20beeaa98584d803a84e8
2012-09-13 01:13:48 -07:00
Jeff Sharkey
fc76a78c45 Include user identifier in external storage paths.
When building external storage paths, always include user in path
to enable cross-user paths and aid debugging.

Mostly changes so Storage doesn't crash; will take another UI
iteration pass soon.

Bug: 7131382
Change-Id: If7ec807f12a36eb8ed02a0fb94e8a0b3a6694f16
2012-09-11 22:49:27 -07:00
Jeff Sharkey
04df8b77a4 Iteration on multi-user storage UI.
Adds headers to distinguish between current and other users.  Also
correctly orders color chips.

Bug: 7003520
Change-Id: I871f1a38d41dad5a5f7d97d91d2ebaac5951066c
2012-09-07 13:23:55 -07:00
Jeff Sharkey
96c2f8c508 Progress towards split storage categories.
Cleans up StorageVolumePreferenceCategory creation, and uses new
isPrimary() API instead of passing around hacky "i == 0" derived
value.

Bug: 7003520
Change-Id: I9eb7164035b5368ee795e35b22e750aebbf3b159
2012-09-06 23:21:09 -07:00
Jeff Sharkey
90c8b20ccf Surface storage usage of other users.
Bring up separate StorageMeasurement sessions bound to other users
on device, and surface their total usage as teal colors.  Exclude
app code size when measuring secondary users.  Shift preferences to
using keys instead of fragile index ordering.

Bug: 7003520
Change-Id: I214d0b223e53955df71104502596743f049f2027
2012-08-30 15:24:53 -07:00
Jean-Baptiste Queru
534529d0cc am 88f37936: am 1183f487: Merge "MTP/PTP: disable erasing/unmount operation for SD card while MTP/PTP is active"
* commit '88f379367f208a75dfe95a081b25c27a54b06a1a':
  MTP/PTP: disable erasing/unmount operation for SD card while MTP/PTP is active
2012-08-24 07:29:43 -07:00
Jean-Baptiste Queru
1183f487c8 Merge "MTP/PTP: disable erasing/unmount operation for SD card while MTP/PTP is active" 2012-08-23 09:31:36 -07:00
Jean-Baptiste Queru
b40815c150 am 71742eb1: am 0c869d69: Merge "UsbSetting: The behavior is not right when enable/disable MTP/PTP with Accessory board connected."
* commit '71742eb13276e93d18f6aead10a8f767134ab0af':
  UsbSetting: The behavior is not right when enable/disable MTP/PTP with Accessory board connected.
2012-08-17 08:57:04 -07:00
Wu, Hao
b76be1f8d4 UsbSetting: The behavior is not right when enable/disable MTP/PTP with Accessory board connected.
Add accessory flag to track accessory status. Disable MTP/PTP button
when Usb is working in accessory mode.

Change-Id: I3edcd2a7eb281db3bb9d345429643b77a237812e
Author: Wu, Hao <hao.wu@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 27200
2012-08-16 14:45:55 +08:00
Jeff Sharkey
1c7d15e841 am 865a914f: am 42eb3fb2: Merge "Fix the issue the setting crashes after unmount SD card in landscape"
* commit '865a914fb5459dd5d6d676b11a09c95d15f2ef6e':
  Fix the issue the setting crashes after unmount SD card in landscape
2012-08-13 16:03:23 -07:00
Chuanxiao Dong
66e7f0a393 Fix the issue the setting crashes after unmount SD card in landscape
When rotate the phone, mLastClickedMountToggle and mClickedMountPoint
would be destroied which made dialog access NULL pointer.

Change-Id: Ic96fce93828ca7a6f8749fad6a258eb47831e062
Author: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 26569
2012-08-10 10:49:45 +08:00
Li Gang
8218d3ba18 MTP/PTP: disable erasing/unmount operation for SD card while MTP/PTP is active
Check the USB connection status and MTP/PTP setting, if USB connected and MTP/PTP enabled,
disable the erasing and umount operation.
Judge SD card Mounting status and keep summary string.

Change-Id: Iff3e0f25b581bc462c88fff59eb93d765baaddd7
Author: Li Gang <gang.g.li@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 47043
2012-08-10 10:20:48 +08:00