Revert "Revert "Add back navigation ring customization.""

This reverts commit 7b17c91228849d1fa107574acb5c003e1219c80e.
Power menu into navring targets (1/2)

- This commit use the intent added here: 0efd6981a6c4b299204b8d4f5495bddb5049f30e

The intent added in  core/java/android/content/Intent.java is called when power menu is choosed

Change-Id: Ifcf898ce7e3221fc67c18b2a54806ef344f68e7f
Keyguard: do not show maximized on simpin and several fixes

- to show a maximzed widget container on first boot when simpin
  or puk is requested does not make any sense. In this case
  show it as normal view
- fix sometimes unresponsive unlock handle on maximized widgets
  and bring it to front (happened only in combination with
  lock before unlock)
- a bit codecleanup and centralize
- fix animation was visible on screnn turn on. Now it is directly
  maximized visible

Change-Id: Id4dce13efee29ce44def60b4de9200a4680e2007
fb: TRDS 3.0 and new theme engine preparation (1/4)

For the one who do not know this feature see as reference
the first two versions here:

SlimRoms/frameworks_base@b330fde

SlimRoms/frameworks_base@3194015

we got now over a year now a lot experience how to handle the qualifier fallback
as well how to theme it and how to handle other apps. Based on this knowledge we
redid some parts of TRDS engine with following new features/additions and fixes
to have now a final perfect working TRDS

- compared to the old versions where it was needed on some apps to restart them
  in background this is not needed any more. All is handled about the internal
  AOSP resource handling and on qualifier change the caches are cleared
  and the apps get an onconfigurationchanged to restart the activity
  like it is doing on orientation change eg
- inverted folder is now depreciated and the new folders are holodark
  and hololight which allows on the one hand a dark theme (at least
  how TRDS started) and a light based theme hololight
- This name change is mainly because of the new theme engine which
  will come which uses this as base to add 2 external themes at the same
  time and give the user the ability to switch between them. But this is
  still in early stages and this commit is just the preparation for it
- Two new automodes are now integrated. User can enable the twilight modus
  which enables/disables holodark/hololight depending on the daytime...means
  on the evening it switches to holodark on normal day it is hololight.
  The other automode is based on light conditions....means that if it is
  dark outside it switches to holodark....if we have bright light conditions
  it switches immediatelly to hololight. Due of the resource cache handling now
  this happens immediatelly for the user and feels completly system integrated
  and happens without delay. A bit comparable to some navigation tool for cars
  which can switch automatically from dark to light and back
- currently the auto modes as well the manual mode switches between holodark
  and hololight. Due that we do not have currently anything hololight themed
  in the source hololight = stock theme. We will give the user the ability
  later when done to choose between which modes the user want to switch
  (stock/holodark/hololight). But this does not make sense at the moment.
  As soon as we have done the light theme or theme engine (lets see what
  comes first) we will open the ability to choose it. This is only a small code change
- a lot small tweaks and fixes went as well into the new version

Whatever this commit as usual adds the support for it. The themeing is done in the
other commits by kroz which is as well way more extended then on the older versions

cheers

PatchSets:
- minor code cleanup

PatchSet5:
- use one value for auto modes

PatchSet6:
- kill resource caches on configuration change

PatchSet7:
- register settings observer lol

PatchSet8:
- fix not assigment of config mode change (typo lol)

PatchsSet 9 -11:
- playing around aosp qualifier is not that flexible then I thought
whatever back in most parts to original implementation handling

PatchSet 12:
- now no restarts of any application needed any more like it was on 4.3...yeaaah
- fix wrong shifting in native adapter
- fix wrong call of twilightmode
- disable debug
- cleanup

PatchSet 13:
- fix lightsensor

Patchset 14:
- no need currently to recreate the navbar we can do if a theme needs it

Patchset 16:
- synchronize on sending config change
- only send if system is ready
- fire first update when system is ready

-rebase

============================================

PS: Added two classes (part of SlimRoms)
TRDSConstant.java
TRDSActions.java

Those two will be used to control enable/disable TRDS

Change-Id: I5fb21c022ad507b6c49c2909d4897955311a9436

fb: TRDS dark base theme

PS : remove default wallpapers
Change-Id: Ie25abfbf5258ac479ca8bc91033f6892bbbc6741

trds:[framework] dark images adjustments

Change-Id: Ie038c4a1aa535708c23f099fb5e836407e3d1603

fb: TRDS some tweaks and fixes (1/2)

some smaller issues fixed and optimizations:

- fix twilightmode was wrong assigned to wrong value
- ligtsensor mode after first immediattely switch it does
  not allow for 5sec to switch again....after the 5sec it switches
  to current state if the sensor changed its state in this time.
  This prevends on the one hand on bad light conditions a permanent
  switch between dark/light as well it does not bring the system into
  troubles due of to much configuration changes at the same time
- get rid completly of the observe for the UI_THEME_MODE value and
  handle all over the UIModeManager
- adapt slimActions and settings to this new behaviour/method
- some cleanup and minor fixes

Change-Id: I4b2401bf7bef992ad3112ae5ccc852cd29b46bd0

fb: TRDS change auto detect light conditions method

Currently on critical light conditions it still switches to often between
on and off which results in bad UX and in worse cases to unusable phone
due that it is permanently switching. To prevend that slacken the light mode
level detection and set it when it goes to dark mode way more higher (LIGHT_CONDITION)
and when into light mode back to lower level (DARK_CONDITION)

PS
- 25 looks good

Change-Id: I665f3141fe31f26ca371d10593ff95174d68fc9e

Frameworks: TRDS fix possible UI freeze on auto mode change

- only call on theme mode change when auto mode changes. Under special conditions
  it can happen that it is called twice
- ensure that whenever a mode change is really done to close the notification shade
- minor cleanup

Change-Id: I2f5c7fbcdad71c8dcbf547f4bc5943a95416d7a3

Fix build errors

Change-Id: I3f1398a5753d1d3071c2877a2f2f997807e19b7c

Change-Id: I5fb21c022ad507b6c49c2909d4897955311a9436
Fix for Lock before unlock (read description)
- Using lock before unlock combined with patterm pin or password when try to unlock using any app or activity instead of normal lock (padlock shortcut) the unlock process only work if we enter the method two times and not in first attempt.

Change-Id: I60c0ec22d7b0278fd0e3b69c42fad6e2afdd5b92
Fix HALO button with new CyanogenMod 'QS Tiles and layout' function

Change-Id: I5bd70f80b5b3cf4e8925488c73dca905ec456b12
Status bar clock and date customization (1/2)
Thanks SlimRoms for this codes.
Based on this commit: https://github.com/SlimRoms/frameworks_base/commit/39545c535c0d0d6857dd769eeae8bda73955d3b1

Change-Id: Ib13e7fd18ae2f22c12eedb8adbae0127822faa6e
fb: Handle navbar heights correct on dpi changes + more (1/2)

Till now we set the height in px in the settings. Which is a problem
especially on multiDPI roms like we are when the user afterwards changes
the dpi due that it isn't calculated correct anymore on the new dpi.

This commit does
- save the dp value in provider and calculate the real px in fb
- clean up the settings stuff for it + do it a bit nicer (only settings part
  where we do not set the value for the listview)
- as well this commit disables movable navbar for tablets (we may will enable
  it in future but it needs a lot more work to have it on tablets correct working)
- add Converter class for common methods we always use....till now only px->dp
  and dp->px method

Change-Id: I3ddcb993f82758bf2d7a183dcb8023b2fcb8f6c8
Frameworks: Open source google dialer and more (4/5)

This is an open source variant of the well known google Dialer which gives the
ability to show nearby places and revese lookup. It uses default the Google
engine to do this. As well you have the ability to use other providers.

Providers which are currently available:

lookup/nearby places:
Google
OpenStreetMap

Reverse lookup:
Google
OpenCnam (US-only)
WhitePages (US-only)
YellowPages (US-only)
ZabaSearch (US-only)

Change-Id: I5d16a583ec713d3890847043bdd3c07e4cc71998
[1/2] Base: Volume panel timeout

Change-Id: Iba6cca4afd5cc1ed81ada2564f03360345fbdd6c
[SQUASHED] Lockscreen Notifications (1/2)

Following commits inside
AOSPAL/android_frameworks_base@3487cda
AOSPAL/android_frameworks_base@5873e99
AOSPAL/android_frameworks_base@7350e91
AOSPAL/android_frameworks_base@8d99eed
AOSPAL/android_frameworks_base@181110c
AOSPAL/android_frameworks_base@ce14cdd
AOSPAL/android_frameworks_base@3914e8d
AOSPAL/android_frameworks_base@32ec14f
AOSPAL/android_frameworks_base@6d2f41d
AOSPAL/android_frameworks_base@b758e16
AOSPAL/android_frameworks_base@6ba6fdb
AOSPAL/android_frameworks_base@b20bdc9
AOSPAL/android_frameworks_base@25f75c6
AOSPAL/android_frameworks_base@a74309e
AOSPAL/android_frameworks_base@5b6e143
AOSPAL/android_frameworks_base@e9dcb99
AOSPAL/android_frameworks_base@4caa49c
AOSPAL/android_frameworks_base@0f2377c
AOSPAL/android_frameworks_base@7e75b49
AOSPAL/android_frameworks_base@bc6c83f Thanks @Der-Schubi
AOSPAL/android_frameworks_base@8fd230d
AOSPAL/android_frameworks_base@e05eba6
AOSPAL/android_frameworks_base@082774a (Partialy ported - Removed codes of clear notifications navbar button)
AOSPAL/android_frameworks_base@a6f92e5
AOSPAL/android_frameworks_base@c3d76f5
AOSPAL/android_frameworks_base@5b1d884
AOSPAL/android_frameworks_base@0c0b133
AOSPAL/android_frameworks_base@73a6b7d

Change-Id: I6f674da28c53863d5103a5822539f268dc9096c4
Lockscreen notifications: Add "show all notifications" navbar button

Change-Id: I0cd5b13e5644de36d24d4d693838bd7080f55412
Lockscreen Notifications: dismiss all button, improve animations, cleanup

Change-Id: I77665e37d823c619680312b73d5ebb1e6e437ffd

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
[1/2] Frameworks: Wakelock Blocker

Change-Id: Id4fd1d8da6ed40517094a5a156f7c6fea622e985

Conflicts:
	core/java/android/os/IPowerManager.aidl
	core/java/android/provider/Settings.java
	services/java/com/android/server/power/PowerManagerService.java
Add native java screen recorder [1/2] (WIP)

This is based on the screenrecorder binary found in frameworks/av.
It has been converted to a native library with the necessary jni
hooks for interfacing withit via a ScreenRecorder java class.

Volume up + power chord is used to start and stop recording by
binding to the service found in the ScreenRecorder app:
https://github.com/ChameleonOS/android_packages_apps_ScreenRecorder

PS1:
Clean up white space.

PS2:
Fix naming convention for state field.

PS3:
Rebase

PS4:
Post mScreenRecordTimeout with 1000 millisecond delay instead
of 10000.

PS5:
Send record screen broadcast instead of using the service
directly.

PS6:
SCREEN_RECORDER_FRAMERATE should be SCREEN_RECORDER_BITRATE

Carbon PS2:
remove vendor_strings, merge cm_strings.xml.
Carbon PS3:
Fixup, duplicate removal
Carbon PS4:
More fixup, missing variables
Carbon PS5:
Gah, more missing things...
Carbon PS6:
Let's try this over...
Carbon PS7:
I spose another change required this update
Carbon PS8:
Fix derp in Settings.java
Carbon PS9:
Fixup, merge conflicts

Change-Id: Id868e1d7ee5add97c48f8e639a5d5c84ad8c0c61

Conflicts:

	core/res/res/values/cr_strings.xml
Screen recorder: add ability to record audio from mic [1/2]

Change-Id: I09eb206398327cd7afc7049f1ed319dcec0cda03