summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/cyanogenmod/QuickSettingsUtil.java
Commit message (Collapse)AuthorAgeFilesLines
* Settings: Improve QS tiles config codeThiago Vinícius Freire de Araújo Ribeiro2013-07-091-45/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tile configuration has some unusual coding, like having a public static Map (QuickSettingsUtil.TILES) to hold all tile information. That map is modified directly during the execution of QuickSettings.onCreate(), which removes unavailable tiles from this global map. Once those tiles are removed, they are gone for good (until the runtime decides that it must reinitialize QuickSettingsUtil.TILES). This patch tweaks this process a bit: - The global TILES variable is now immutable. - There is a distiction from disabling and removing a tile - Removed tiles are those related to the device capabilities, and can never be enabled, once removed. - Disabled tiles are those related to the device state, like the ProfileTile, which is unavailable if the user has disabled the profile feature. Disabled tiles can be re-enabled later. - All code that actually removes/disables tiles is now at QuickSettingsUtil. The results of such operations are reflected on the TILES immutable view. - It is possible to enable tiles that have been disabled. This changes improve [citation needed] coding style a bit, but, furthermore, allows one to disable and reenable tiles when needed be. For instance, enabling Profiles or Expanded Desktop will cause the corresponding tile to be available for selection immediately. That would not possible to accomplish, once those tiles were removed from the available TILES map. Patch set 2: Rebased Patch set 3: Rebase, refactor Patch set 4: Check network tile availability at every resume Patch set 5: Sort tiles at the adapter, revoke caveats Patch set 6: Some cleanup Change-Id: Ifd46d81a49b0ce036e9ccd6d13b6e2251ecbf42a
* QuickSettings: Camera tileNebojsa Cvetkovic2013-06-261-0/+4
| | | | Change-Id: I8de198c6144e1b0194ebeaffffec084035492635
* QS/PW: Check for mobile data instead of telephony permissions (2/2)Brandon Bennett2013-04-151-3/+3
| | | | | | | | | | | | | | | For QuickSettings and Power Widget check if there is ConnectivityManager.TYPE_MOBILE network avaialbe directly instead of relying on a checking for the PackageManager.FEATURE_TELEPHONY permission. Some devices like tilapia (Nexus 7 GSM) has mobile data but does not set the telephony permission. Patchset 2: - Have power widget use the same logic as quicksettings to check for mobile data Change-Id: Ibe8059aaa5f3bd1e72e958608a34e89abfd0ad4a Fixes: CYAN-803
* QuickSettings : Use stock layouts / fix userTileDanesh Mondegarian2013-04-071-9/+9
| | | | | | | | Switch over to using 2 layouts (one generic, one user tile), just like how aosp does it. This way the tiles look similar to their SystemUI counter part. Change-Id: I8640c99602b056fb48b37f516c23c16555a2ba2a
* Settings: Add Expanded desktop tile in QuickSettings (1/2)xavihernandez2013-04-041-3/+4
| | | | Change-Id: I42a7182859bd028c2e93f0c2fe0b6b5dee404cfa
* QuickTiles : Fix order in tileDanesh Mondegarian2013-03-201-3/+3
| | | | | | Preserve alphabetical sorting. Change-Id: I1790fd3536f3ca6551ba8d83ff2c6437a2885a94
* QuickSettings: Fix load default tiles (CYAN-541)fuzz2013-03-181-2/+20
| | | | | | | This fix a issue unable to reorder tiles correctly caused by loading tiles device doesn't supported. Change-Id: Id341e698394c14c1525115616128f019fc244598 JIRA: https://jira.cyanogenmod.org/browse/CYAN-541
* Added Volume Tile to Tile chooser in Settingsstofstik2013-03-111-4/+8
| | | | Change-Id: Iafaf817e380790dadbf5eb41bd27c19927645e1e
* Settings: Add LTE Quick Settings Tile (2 of 2)DvTonder2013-02-281-11/+4
| | | | | | | Patchset 2 - Use proper SystemUI drawable - Place tile in alpha order Change-Id: Id2d6cf549d17a139acda3b9edafae6ee5e0692a5
* Settings : QuickSettings CleanupDanesh Mondegarian2013-02-281-55/+27
| | | | | | | | | | | | Use the new class introduced to avoid code duplication. Patchset 2 - Cleanup Patchset 3 - Rebase Patchset 4 - Rebase and expanding of imports Patchset 5 - Organize imports Patchset 6 - Fix commit message Change-Id: I6868563d6526bd7d5069c17d39cc6d2640476333
* QuietHours Tile (2/2)Danesh Mondegarian2013-02-071-0/+4
| | | | | | Allows user to toggle state of quiet hours Change-Id: I9d3234b993d250a7d43683b51c1c3254aaec262f
* QuickSettings : Filter tiles from defaultDanesh Mondegarian2013-01-071-10/+17
| | | | | | | | | Filter unsupported tiles from default. Fixes re-arrange issue found on tablets post reset Note : Please reset quicksettings after this commit to fix issues. Change-Id: Ib92a8fc7e5e23baefb1e83a0309e73879ca64515
* Settings: Add Screen timeout Quick Settings Tile (1 of 2)DvTonder2012-12-231-3/+3
| | | | Change-Id: I385ef755ad7cf4a3c02dd8c7b739d5cb33aa2e90
* Settings: Use new Lock screen drawableDvTonder2012-12-221-1/+1
| | | | | | Credit to Björn Lundén for drawables Change-Id: Iffd6d8574448f69f876ea4ccd1f6e15d60b92982
* Settings: Add NFC Tile to Quick Settings (1 of 2)DvTonder2012-12-221-0/+4
| | | | Change-Id: I7099c9d29864a3b4f18c60d472cd7e78eb5e11b1
* Quick Settings: Clean up Torch tile (1 of 2)DvTonder2012-12-211-4/+7
| | | | Change-Id: I1e047278879ef88c71f81c3078760e1d1ff57fbd
* Settings: Add Quick Settings Sync tile (1 of 2)DvTonder2012-12-211-15/+15
| | | | | | Also, put tiles in alpha order Change-Id: I8fcb229f7c123529ed273a34138c0306345f237d
* Quick Settings: Add Network mode tile (part 2 of 2)DvTonder2012-12-201-17/+7
| | | | | | | This commit also inlcudes a bit of code cleanup and sets the default tiles to AOSP defaults Change-Id: I735878997a807450368641faad52ba4b5e8eadf5
* QuickSettings: Added ProfileTile (1/2)Sven Dawitz2012-12-171-0/+4
| | | | | | | | | | | | | | | | see frameworks commit for details Patchset 2: using blunden's png resource making ProfileSettings reachable from the outside Patchset 3: The profile tile should not be available if profiles are turned off Side rant: I really hate manifest cleanups. i would wish for our settings not beeing such a mess and comply with fragments properly. Change-Id: I3e7bcce4b5f54b9bed065780779c9946a73936be
* QuickSettings : Add Wifi-AP TileDanesh Mondegarian2012-12-151-3/+3
| | | | | | | Patchset 2 : Rebase and WiFi AP Tile fix Patchset 3 : Remove the tile if not supported by device Change-Id: I93ddf34f9d0061000e1f3b8baa03f9e17d0fba61
* QuickSettings: Use the new QS drawables for the settings too.blunden2012-12-151-12/+13
| | | | | | | Before it used the old power widget drawables, some of which look quite different from the ones actually used by QS. Change-Id: I022b1e3499bb69f0b974e610719778b16a59c543
* QuickSettings : Add torch tileDanesh Mondegarian2012-12-141-3/+3
| | | | Change-Id: I3d206c95e5da15a0717b500ed30efc69ff28c07d
* Settings: Add ability to reset Quick Settings panel to defaultDvTonder2012-12-141-0/+5
| | | | Change-Id: I968f8b01e82e39410d6b1fc8dacced05c011468b
* Settings: Quick Settings customization (Part 1 of 2) WIP!DvTonder2012-12-131-0/+230
This commit will alow configuring the Quick Settings tiles layout in Settings. Patchset 2 - Add QS Configuration UI (Danesh M) Patchset 3 - Bug fixes Patchset 4 - Cleanup - Sort supported tiles alphabetically - Add license headers Patchset 5 - Fix re-arrangement bug Patchset 6 - Add 'Static tiles' category and move Sound modes preference Patchset 7 - Add Note to Power widget explaining interaction with Quick Settings panel behaviour Patchset 8 - Whitespace derp Patchset 9 - Restore Settings tile to AOSP location Change-Id: I6239abb1b93f9d65072d16cc61954bb0140d4777