PEEK: Beautify bridging layers code

* Save new instances for Peek and PowerManager:
    Create it only in BaseStatusBar when start() method is called. That one
    will be passed throught the sub layers such like new helper class so another
    feature can check Peek state invocking from NotificationHelper class.
* Move phone listener to new helper class.
* Do not show Peek on sim pin lock screen.
* Process new incoming notifications only if screen is off, keep updating notification array separately.
* General cleanup.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I9efde073df35b92e42b9faa9930d2fc39b3a43b9

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Revert "Consolidate to cr_***"

This reverts commit d48d358c627c383372e3d0ee918d5b17f134c130.

Conflicts:
	core/res/res/values/cr_strings.xml
	core/res/res/values/cr_symbols.xml
	packages/SystemUI/res/values/cr_dimens.xml
	packages/SystemUI/res/values/cr_strings.xml
	packages/SystemUI/res/values/cr_styles.xml

Change-Id: I8b2533d15ba0f8541cd4dead33dafe6e47d84f62
Revert "Base: App Circle sidebar (add support Samsung multiwindow flags)"

This reverts commit e20625dc7b234edc71b224388ffb17674feb33d9.
Revert "Base: App Circle sidebar (add support floating window)"

This reverts commit 96afb2d014d788a862006de66916904dc53e99fb.
Revert "[1/2] Base: implement App circle sidebar"

This reverts commit 5c11894f801d901ef0eefc7d812f93b337ebee71.

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Change-Id: I4e641e03e0d96952ec27130bc7c6ded12611cd06
Revert "Base: Floating window with multitasking"

This reverts commit 3170abb9a173a52f5dcdbbadc0ca3fcd983ccfb1.
Revert "Revert "Floating Window: Welcome back""

This reverts commit cba161d937cf7932858381e74d09263ea4ff09ca.
remove unnecessary files

Change-Id: If704ea292fc94c5c548c3eb437196796916a75f1
audio: Volume can't adjust during HFP call when screen is off.

PhoneWindowManager don't pass the key to the application when screen is
off. In handleVolumeKey(), the STREAM_VOICE_CALL volume was set, so the
STREAM_BLUETOOTH_SCO volume can't be adjusted.
Add a judgement to choose the correct stream to adjust when screen is off.

CRs-Fixed: 649548

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: I1ab06617d59b9bf2eabed9ed8b6892bc20db75b9
Bluetooth: use  virtual sco calls for VOIP

 - use virtualvoicesco connection set-up for VOIP calls
 - cannot simply revert c18c9138cee0f0859bcab636a004ce92ca4a9ab5
and 25fc29b3691a1d2a84164988dc74b2e7d301868e changes because
of aidl modifications involved.

Change-Id: Ib49cb01151a9cea2e94bc7a51ad1f58e877271aa
CRs-Fixed: 598072
audio: no notification sound when adjusting volume bar twice.

Notification sound won't take effect when the previous track hasn't
finished.
Need explicitly stop the previous ongoing track to alow the current one.

Change-Id: Ib344a8b14ecc47a5c8fdd9c11ae48a3541ea9a55
CRs-Fixed: 652236
Bluetooth: Unbind only in case of OFF state

In MESSAGE_SAVE_NAME_AND_ADDRESS,BT manager
calls unbindandfinish without checking BT
adapter state which if not OFF, will lead
to improper cleanup. Unbind will get called
but cleanup will not happen.

Change-Id: Ibfc70c51a95f8b80f331090e322ba3ebb88f6c03
CRs-Fixed: 652260
Bluetooth: Adds check to verify Bluetooth adapter state

This checks whether bluetooth is turned ON or not in BLE
start scan process.BLE scan apis are called from applications
so need to check if BT adapter state is ON to avoid Bluetooth
crash

CRs-fixed: 649274
Change-Id: Ic075e1560bba2cabbfac2e1477932f9ad3144067
BT: HF: Control verbose logging at runtime.

Verbose logging in BluetoothHeadset can be
controlled from adb shell.

Change-Id: If63974402a4fc91065c8007a224388af12f49cf7
CRs-Fixed: 601899
Clear cached locations when location providers disabled Bug: 12118307

(cherry picked from commit b084fef18ee1b5d24d15cff37dc3a053933d361e)

Change-Id: Ief869b9e38858092bfa3f8d6d090a278dee7d86c
AlarmMangerService: Fix the delay of ACTION_TIME_CHANGED for time-services

After boot completed, if low memory condition happens or some ordered
broadcasts have time out, it will cause delay for some receivers to
receive ordered broadcasts. Adding FLAG_RECEIVER_FOREGROUND into
time changed action will make TimeServiceBroadcastReceiver receive
ACTION_TIME_CHANGED in time.

CRs-Fixed: 630982
Change-Id: Id789d0b3c969af6b92f62612602ba119613382ab