OSDN Git Service

GlobalActions: Fix setting ringer mode in global actions
authorItalian Quadcore <myawfulchat@gmail.com>
Tue, 9 Jun 2015 08:48:25 +0000 (10:48 +0200)
committerMichael Bestas <mkbestas@lineageos.org>
Sun, 21 Jan 2018 20:03:35 +0000 (20:03 +0000)
commit8344a15d2f606cc4cbcff586125c5a07060bcb18
tree00ea464db3fd73ec015401625b5c34b8ef7564ee
parentb83b533e832347bd3d782b4b51caf74dd2f9fb28
GlobalActions: Fix setting ringer mode in global actions

* It looks like we missed some fixes while forward porting
  this feature from cm-13.0. Squash the following commits:

Author: Italian Quadcore <myawfulchat@gmail.com>
Date:   Tue Jun 9 10:48:25 2015 +0200

    Add Sound Panel to Power Menu (Part 1/2)

    Change-Id: I5a638b1817b3de82d891935e0071c6e42856c59e

Author: d34d <clark@cyngn.com>
Date:   Mon Feb 1 14:19:01 2016 -0800

    GlobalActions: Fix setting ringer mode in global actions

    It looks like we did not bring in this full feature for cm-13.0.
    This patch updates SilentModeTriStateAction to match cm-12.1 with
    one minor change.  We can no longer set the zen mode by writing to
    Global settings directly.  The ZenModeHelper class actually checks
    when a change is made and resets it.  The fix is to use
    INotificationManager.setZenMode() instead.

    Change-Id: Ib2423a19da3a2ca95f73cb92247e0a38bff8bbee
    TICKET: CYNGNOS-1808

Author: Dave Kover <kover@cyngn.com>
Date:   Tue Mar 1 13:37:57 2016 -0800

    Fix GlobalActions sound panel iconography.

    The priority and none icons were using old zen icons and did not
    match up with the status bar iconography. We are now in sync. Also
    aligning the prefix to match the other icons present in this dialog.
    Lastly, creating new drawables for the two sound options so that
    we don't clash designs with the Settings view, which also used the
    same icons.

    Change-Id: I0a0cee6c7f0f7b014a0b2cdd95b7f7e5cb8e5f38
    Ticket: CYNGNOS-2172

Author: d34d <clark@cyngn.com>
Date:   Tue Apr 12 10:13:22 2016 -0700

    GlobalActions: Always use setZenMode

    When set to silent mode, the user cannot change the ringer mode to
    vibrate or ring.  Notification manager listens for changes to the
    zen mode setting and will switch it back if there is a mismatch.
    Using INotificationManager.setZenMode takes care of changing the mode
    and keeping track of the updated change.

    Change-Id: I5139a9a8cde4ca59f64bd21cf7c184d4745a7d59
    TICKET: CYNGNOS-2417 BACON-4658

Change-Id: I5a638b1817b3de82d891935e0071c6e42856c59e
core/res/res/drawable/ic_lock_dnd_priority.xml [new file with mode: 0644]
core/res/res/drawable/ic_lock_dnd_total_silence.xml [new file with mode: 0644]
core/res/res/drawable/ic_lock_ring.xml [new file with mode: 0644]
core/res/res/drawable/ic_lock_vibrate.xml [new file with mode: 0644]
core/res/res/layout/global_actions_silent_mode.xml
core/res/res/values/cm_strings.xml
core/res/res/values/cm_symbols.xml
services/core/java/com/android/server/policy/GlobalActions.java