core: add support for translucent volume panel

Add support for display the volume panel in translucent mode

Patchset 4: Make it depends to high-end graphics flag

Change-Id: I4f21a6cc88282789072a0e71ae696b754a5e083e
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

Conflicts:
	core/java/android/view/VolumePanel.java
QS: Fix up Wifi Display tile for screencasting and reenable it

Replace the Wifi Display code with MediaRouter/RemoteDisplay observers,
and turn let the controller manage the tile again

Change-Id: Iaf5c509ae078b9305d1d314ec76d44362beb025e

Conflicts:
	packages/SystemUI/src/com/android/systemui/quicksettings/WiFiDisplayTile.java
QS: Rename WiFiDisplay to RemoteDisplay

Change-Id: Iae8537482bc2c2a1beca71336a569bc5d4c16df5
Show live wallpapers in the recents view on high-end devices

Change-Id: Iefbf4f292b6a9bfdb516f154cc2976db2ba86cde
Revert "Fix stencil buffer bug."

This reverts commit ea327b48b495168872c1c758c7c744890496650f.

Change-Id: I8e4b8b4c6cf48930907cdb52c95135dd6f338af2
Display: Dirty region propagation

Pass Dirty region values from HW renderer to Surface Texture.

Change-Id: Ibd121ed398a1319d3daf26f9fd39a03323bba666
core: fix volume panel more button transparency

Change-Id: I9f728256efbaf138611822079ea7737cd345bb19
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
fb: restore navbar compatibility with several xposed modules

I am tired of the complains....

Xposed use the emulator overwrite to enable/disable navbar...this results
into showing up navbar on reboot even if the user has set it to off in settings.

This fixes the issue and still keeps for emulator tests the basic overwrite functionallity
alive as long the provider value was not set.

We may should reflect that in settings as well.

Change-Id: Id60b45645d489c08539d56b8e05d135c36d38990
Sensor: Enable the motion accelerometer for screen orientation change

The screen orientation can be detected by the motion accelerometer
instead of generic accelerometer to save power.

Change-Id: Iaeb3e5958d2ef7cc33080d7091ed8a5462695c67
fb: Slims new Power Menu (1/2)

gmillz already prepared it and I finished it now. Idea was to be more
flexible on the power menu but at the same time not complicated.
So we adapted Power Menu to our dslv system which allows to sort
drag swipe etc the entries.
So user can now have the power menu how they like it.
As well custom apps or activities can be added

So currently:
airplanemode
custom apps
screenshot
reboot
sound
power off

are available as options to add or remove or customize with our
easy dslv settings

As well we are only using our central classes for it....means adding
whatever shortcut is mostly only a 10 line change in future

Carbon Patchsets

PS1: Initial upload to see what has changed.
PS2: A few fixes.
PS3: Should build now.
PS4: Add resources
PS5: Fix derp
PS6: Minor fix
PS7: More stuff
PS9: Works good. Add back screen record option.
PS10: Fix Sys UI Fc

Change-Id: Ibec6627538408f29fc328808fdc51b82e9827fd0

Conflicts:
	core/res/res/values/colors.xml
	policy/src/com/android/internal/policy/impl/GlobalActions.java
Custom lockscreen wallpaper [1/2]

Conflicts:

	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java

Change-Id: I6b0cd091f5d3c14d267921c047f0308929fe7cf2

Custom Wallpaper: use PNG and fix derp

This should fix the bad lockscreen wallpaper quality after reboot.

Change-Id: Iff461b109f79cf99fa99a7ab89ad57864c8a0dbc
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

Conflicts:
	core/java/android/provider/Settings.java
Frameworks: bring back all lockscreen Widget Settings

this commits brings back adapted versions for 4.4:

- enable permanent maximized widgets
- allow carousel view
- disable camera widget
- disable usibility hints
- longpress lockhandle unlocks screen

cheers gmillz and kufi

Change-Id: Idaca3d770a620c5f07ea389842a680eb7e55b601

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewStateManager.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
[1/2] Base: ActiveDisplay (rework interface)

really fix AD buggy stuff
tested with Music play
tested with No lockscreen
tested with faster screen turn off
check all sensor going off if AD not Showing or Disabled
fix notification posted/removed
make AD using System Window so it will covered all screen
fix Navbar translucent if Lockscreen Blur merged :P
now using Rounded Image
also introduce new RoundedImageView widget
 courtesy of @vinc3m1 (thanks)
fix build
fix sometimes screen turn off after unlock because screen timeout (hopefully)
now using new parser to get Notification data (thanks @Achep for the parser)
rework lightsensor manager
add NotificationUtils
fix brightness sometimes not changing

add support applications privacy mode (will not show content message if enable on each app)
see http://jira.omnirom.org/browse/OMNI-600

allow bypass AD if no notification and lockscreen is secure
see http://jira.omnirom.org/browse/OMNI-594

fix proximity always enable after adding new feature allow bypass AD
fix parsing notification data from app with targetSDK < 17

fix excluded app value (no body notice this broken since AD merged into OmniRom xD )

add option to allow bypass AD
make AD multiuser support

Change-Id: I1fc3047496cce71cefc1718b8ef3f4c4fc1605eb

Base: fix ClockView ActiveDisplay

why no body report this bug?

this happen since AD merger into omnirom for the first time
i found this bug after using 24 time format LOL

Change-Id: I85be84914cc8210d9b0612994a4c25a5c6bfdeb6

Change-Id: I1fc3047496cce71cefc1718b8ef3f4c4fc1605eb
ActiveDisplay: Fix for flo and other devices

The changes made to layout/active_display_content.xml were not
made to its layout-land and layout-sw600dp counterparts

Make them here too to stop flo from crashlooping in systemui.

These values may need to be tweaked later, but preventing crashloops
is top priority.

Change-Id: If137eaabad735539cc9d50c107a1733bef71538d
DocumentsUI: Add a standalone File Manager

This commit adds a standalone mode to the DocumentsUI, to let
it act as a file manager/explorer.
You can browse your storage contents, open files, and delete them,
as well as do everything that the DocumentsUI can do (ie. sort
by name/size/type, list and grid view, recents, search, ...).

This gives us a consistent file browsing UX accross all apps
that uses the new documents API.

Change-Id: If73a3c100f010bdb766c843976d4fd3573ea805c
Fix Power Shutter Exception 2 of 2

Set protection level to 'dangerous'

Change-Id: I9792f4c543c9ce8a647989ca60cdc9389602551c

Conflicts:
	core/res/AndroidManifest.xml
NumberPicker: Don't filter Bengali-Indic characters

Add Bengalese digit characters to the digit characters list of
NumberPicker.

CRs-Fixed: 530201

Change-Id: I32445660c2c2a451c71f5a235ee71ae906660f12
NumberPicker: Don't filter Devanagari-Indic characters

Add Devanagari digit characters to the digit characters list of
NumberPicker.

CRs-fixed: 530201

Change-Id: I0f5b273679e3f0bb478c8a6f0609b1bb8a0fac11
Adjust the index of the ArrayList during iteration

Decrement the index when an element is deleted during
iteration to avoid the index going out of bounds and also
some elements getting skipped.

Change-Id: Ie4a57e02d684d598cd971c4ce6866579b65345d3
CRs-Fixed: 613390