[MOD][Xposed][4.0.3+] Screen Filter (v1.5.2)

Search This thread

tony78960

Senior Member
Sep 25, 2011
109
390
31
[size=+5]Screen Filter[/size]​


This mod puts a transparent view on top of the window manager in order to darken the whole screen.

Once activated, the mod adds a toolbox below the header of your expanded status bar where you can easily switch ON or OFF the filter and set its transparency using the seek bar (only if the filter is active).
A settings activity is also available to control the filter and other settings (such as tuning or hiding the toolbox).

Screen Filter is mostly designed to lower you screen's luminosity and allow you to use your device in the dark without killing your eyes, but you can also use it as a screen privacy guard!
Also, on AMOLED screens, reducing the luminosity improves your battery's lifetime!


[size=+2]Features[/size]

  • Darken the whole screen, including: soft keys (nav bar), toasts, cpu info (*)
  • While activated, the filter does not trigger Android's security against overlays (like preventing you from installing new apps) (*)
  • Filter's transparency and color are customizable
  • Add a toolbox in the extended statusbar (you can disable it in the settings activity)
  • Tasker/Locale integration
  • Transparency range can be changed (but the minimum cannot go under 15 in order to avoid completely black screen)
  • Works for both phone and tablet layouts

[size=-1](*) contrary to most "user level" screen filters on the market[/size]​


[size=+2]Screenshots[/size]

attachment.php

[SIZE=-1]The number you can see in the toggle button while the filter is enabled is the current value of the alpha layer (max range: 15 to 255).[/SIZE]

attachment.php

[SIZE=-1]Screen Filter has a settings activity and is recognized as a plugin in Tasker.[/SIZE]


[size=+2]Requirements[/size]

  • You need the Xposed framework installed (and working, of course).
  • Screen Filter works with ICS (4.0.3), JB, KK and Lollipop
  • Should work well on any AOSP based ROM
  • May work on some stock ROM, please report your result (good or bad) if you give a try!

[highlight]Don't forget to read the troubleshooting section in the next post![/highlight]


XDA:DevDB Information
Screen Filter, Xposed for all devices (see above for details)

Contributors
tony78960
Xposed Package Name: com.tonymanou.screenfilter

Version Information
Status: Stable
Current Stable Version: 1.5.2
Stable Release Date: 2015-02-22

Created 2014-10-02
Last Updated 2015-02-22
 

Attachments

  • phone_4_4.jpg
    phone_4_4.jpg
    23.1 KB · Views: 238,656
  • activity_and_tasker.jpg
    activity_and_tasker.jpg
    30.9 KB · Views: 21,504
  • activity_toolbox.jpg
    activity_toolbox.jpg
    77.3 KB · Views: 113,442
Last edited:

tony78960

Senior Member
Sep 25, 2011
109
390
31
[size=+2]Automation[/size]

It is possible to control Screen Filter via intents, here is how the magic works:

There are three different intent actions:
  • com.tonymanou.screenfilter.action.DISABLE
  • com.tonymanou.screenfilter.action.ENABLE
  • com.tonymanou.screenfilter.action.TOGGLE
With each of these actions, you can choose which filter you want to control by setting one or both of the following extras:
  • FILTER_DIM
    Valid values for 'selected' are: "1" (int), "true" (boolean) or no value (null string).
    Valid values for 'unselected' are: "0" (int), "false" (boolean) or just don't use this extra.
  • FILTER_COLOR
    Valid values for 'selected' are: "1" (int), "true" (boolean) or no value (null string).
    Valid values for 'unselected' are: "0" (int), "false" (boolean) or just don't use this extra.
In the case of ENABLE and TOGGLE actions, you can change the value of the filters with the following extras:
  • TRANSPARENCY
    Valid values are 8 bit unsigned integers within the transparency interval you set, between 5 and 255.
    Works only if FILTER_DIM is selected and if the darkening filter is getting enabled.
  • COLOR
    Valid values are 32 bit signed integers in base 10 representing the ARGB color (hexadecimal string not supported yet).
    Works only if FILTER_COLOR is selected and if the color filter is getting enabled.
Note: if both FILTER_DIM and FILTER_COLOR are unselected or if they are not given, only the darkening filter is affected by the action and TRANSPARENCY is skipped.

For instance, using the command-line:

  • adb shell am broadcast -a com.tonymanou.screenfilter.action.TOGGLE
    Toggles the darkening filter.
  • adb shell am broadcast -a com.tonymanou.screenfilter.action.ENABLE --ez FILTER_DIM true --ei TRANSPARENCY 125
    Enables the darkening filter at the transparency 125.
  • adb shell am broadcast -a com.tonymanou.screenfilter.action.ENABLE --ei FILTER_COLOR 1 --ei COLOR 792333838
    Enables the color filter at the color #2F3A0E0E (792333838 = 0x2F3A0E0E).
  • But...
    adb shell am broadcast -a com.tonymanou.screenfilter.action.DISABLE --ei FILTER_COLOR 0
    Will disable the darkening filter /!\

Screen Filter is also provides shortcuts and is recognized as a plugin in Locale/Tasker.
Here is how the "linked filters" option works:

Not linked:
  • darkening enabled, color enabled
    --> darkening is disabled, color is disabled
  • darkening enabled, color disabled
    --> darkening is disabled, color is enabled & color updated
  • darkening disabled, color enabled
    --> darkening is enabled & transparency updated, color is disabled
  • darkening disabled, color disabled
    --> darkening is enabled & transparency updated, color is enabled & color updated
Linked:
  • darkening enabled, color enabled
    --> darkening is disabled, color is disabled
  • darkening enabled, color disabled
    --> darkening is disabled
  • darkening disabled, color enabled
    --> darkening is enabled & transparency updated, color is updated
  • darkening disabled, color disabled
    --> darkening is enabled & transparency updated, color is enabled & color updated

[size=+2]Testing[/size]

  • [size=+1]AOSP based[/size]
    Successfully tested on:
    • Android emulator 4.0.3
    • Genymotion 4.1.1 / 4.3 / 4.4.2
    • CM 11 (KK 4.4.4)
    Reported working on:
    • CM 10.2 (JB 4.3.1) on GT-i8190 [post]
    • CM 9 (ICS 4.0.4) on LG Optimus L3 [post]
  • [size=+1]Stock[/size]
    Reported working on:
    • Omni Rom on Galaxy R [post] and Galaxy S3 (GT-I9300) [post]
    • Samy Deluxe Pick Your King 4.4.2 on Galaxy S4 (GTI9505) [post]
    • Stock 4.3 MK2 baseband on Galaxy S4 (SCH-R970 USCC) [post]
    • Stock 4.4 rooted on Galaxy Note 2 [post]
    • Crash ROM (17.1) on Galaxy Note 3 (N9005) [post]
    • Stock TouchWiz 4.4.2 on Galaxy Note 3 (SM-N9005) [post] and on Note Pro 12.2 (SM-P905) [post]
    • CloudyG3 (KitKat) on LG G2 [post]
    • Stock rooted ROM on T-Mobile LG G3 [post]
    • Stock 4.4.2 (version 183.46.15) on RAZR HD [post]
    • Stock 4.4.2 on Moto G (XT1032) [post]
    • Carbon Rom 4.4.4 on Galaxy S4 mini [post]
    • KitKat Google Edition on Galaxy S4 [post]
    • Stock 4.4.4 on Nexus 5 [post]
    • Stock Sony 4.4.4 on Xperia Z (C6603) [post]
    • Stock 4.2.1 on Cubot One [post]
    • . . .
If you get problems after installation, check in the following section if the bug is already known. If not, then read the Troubleshooting section.


[size=+2]Known bugs[/size]

  • Screen-off animation (like electron beam / CRT effect) is not affected by the filter
  • As you can see in the first post, screenshots are affected by the filter
  • Quick settings disappear when the toolbox is visible on Stock Sense 6 (HTC One m7 and m8)
  • Stock ROM where SystemUI addon is not loaded:
    • Stock 4.4.2 on Elephone P10c
    • Stock 4.4.2 on i9500
    • Stock 4.4.2 on Micromax A106
    • Neat rom 4.1.2 on SGS2

[size=+2]Troubleshooting[/size]

In case you set the filter too dark and you can't see anything on your screen, just reboot your device.

After installation or update of the module, [highlight]you must reboot your device[/highlight] to get the latest changes fully loaded.

If it does not work even after reboot:
  • first, check if Xposed is working and if the module is activated in the Xposed Installer,
  • then, post in the thread indicating your ROM and attaching:
    • your last Xposed error log (the /data/data/de.robv.android.xposed.installer/log/error.log file)
    • and your SystemUI.apk (should be located in /system/app or /system/priv-app)
    Thanks!

[size=+2]To-do list[/size]

  • Toolbox customization:
    • Hide the toolbox from notification panel or quick settings independently
    • Choose location (top/bottom)
    • Change the height
    • Double tap on the icon to open settings activity
    • Full toolbox customization:
      • Change items location
      • Ability to make the button transparent or replace it by a grey(off)/white(on) image
      • Ability to add shortcuts to some values
  • Filter improvements:
    • Let the user create different settings (color + transparency)
    • Filter pattern [post] [post]
    • Darkening filter using an image [post]
    • Filter blending using multiply instead of addition (?)
    • Allow unfiltered screenshots (?)
  • Other ways to toggle the filter:
    • Notification with ^ and v buttons
    • Overlay control [post]
  • Automation:
    • Auto enable at device startup
    • Auto enable depending on application context
    • Auto enable depending on the time and/or battery level
  • Other:
    • Make the project open-source
    • Llama integration (locale changer)
    • Make use of the luminosity sensor
 
Last edited:

tony78960

Senior Member
Sep 25, 2011
109
390
31
[size=+2]Download[/size]

You can download Screen Filter from the Xposed repository.


[size=+2]Translations[/size]

Strings are available on GitHub, translators are welcome to contribute!
Don't forget to read the "Translations" section in the README.


[size=+2]Changelog[/size]

v1.5.2 - Feb 22, 2015
-- Lollipop support with SELinux set to permissive (no toolbox)
-- Fixed transparency value display in the toolbox
-- Better exception handling in module initialization
-- Updated Simplified Chinese and Slovak translations​


v1.5.1 - Feb 18, 2015 [highlight](removed)[/highlight]
-- Probable Lollipop support (not tested)
-- Replaced third-party color picker by custom implementation
-- Added ability to edit values in color picker
-- Merged temperature picker and color picker
-- Fixed crash when using shortcuts or Locale/Tasker plugin if the filter service is not found
-- Added debug option: dump view hierarchy of the notification area
-- Updated French, Russian, Simplified Chinese & Slovak translations​

v1.5 - Jan 26, 2015
-- Draft customizable toolbox
---- Ability to tint the toolbox
---- More to come...
-- Long-press on the color button to choose a color temperature (in Kelvin)
-- Added warning message about hardware button backlight
-- Changed notification icon
-- Another potential fix for the hole left in system UI in some cases when the toolbox is hidden
-- Fixed value editing in Locale/Tasker plugin (value was not restored)
-- Updated French, Japanese, Russian, Slovak & Spanish translations​

v1.4.2 - Jan 11, 2015
-- Color filter's opacity is now independent from its color
-- Implemented shortcuts to toggle filters
---- can be used "like a widget" on the desktop
---- thanks to GravityBox, can be used as a quick setting tile
-- Added translator's name in About
-- Fixed Screen Filter plugin not showing in Locale
-- Potential fix for the hole left in system UI in some cases when the toolbox is hidden
-- Updated French, Russian & Slovak translations
-- Fixed Spanish translation​

v1.4.1 - Dec 23, 2014
-- Updated Locale/Tasker plugin in order to support color filter control
-- Added simple intents to control filters
-- Fixed FC in activity
-- Fixed bugs occurring at screen rotation
-- Prevent full flat colored filter (capped max opacity, fully transparent at first launch)
-- Lowered the minimum transparent limit to 5, use it wisely!
-- Updated French, Simplified Chinese & Slovak translations​

v1.4 - Dec 02, 2014
-- Refreshed UI: filter settings are separated from global settings
-- Color filter is now independent from darkening filter
-- Added ability to hide toolbox when the filter is disabled
-- Added help dialog
-- Changed the behavior of "change default" buttons, !!! read the help dialog !!!
-- Many other internal changes, bug-fixes and improvements
-- Added Russian translation
-- Updated French, Japanese, Spanish translations​

v1.3.3 beta - Nov 18, 2014
-- Added ability to choose the color of the filter
---- Choose a dark color, otherwise it will brighten the screen!
-- Improved the readability of transparency range values in the range dialog
-- Updated Dutch, French, Simplified Chinese, Slovak & Spanish translations​

v1.3.2 - Oct 31, 2014
-- Added ability to disable hardware button backlight when the filter is active
-- Added debug button to dump display list in logcat
-- Fixed transparency setting that was sometimes reset when sliding the seekbar​

v1.3.1 - Oct 28, 2014
-- Added "toggle" action in Tasker/Locale plugin
-- Added more internal checks to avoid wrong transparency
-- Seekbar is now movable even if the filter is disabled
-- Long-press on the icon of the toolbox opens the settings activity
-- Long-press on the toggle button in the toolbox enables the filter and sets it to the default level
-- Long-press on the "Change" button in settings activity reset the transparency to default value (but does not enable the filter)
-- Updated Dutch, Slovak and Traditional Chinese translations​

v1.3 - Oct 25, 2014
-- Added Locale/Tasker support
-- Added ability to change min and max transparency
-- Refactored toolbox injection system
-- Added more error checks and fixed minor bugs
-- Debug log enabled by default
-- Updated French, Japanese, Slovak and Spanish translations
-- Added Simplified & Traditional Chinese translations​

v1.2 - Oct 12, 2014
-- Added ability to change default transparency
-- Added ability to enable debug log (disabled by default)
-- Updated Japanese translation
-- Added Chinese translation
-- Code cleaning and small bugfixes​

v1.1.6 beta - Oct 11, 2014
-- Heavy code restructuring to allow the filter to work even if the toolbox cannot be injected into SystemUI
-- Added Dutch, Japanese and Slovak translations​

v1.1.5 beta - Oct 09, 2014
-- Fixed wrong cast exception introduced in 1.1.4​

v1.1.4 beta - Oct 09, 2014 [highlight](removed)[/highlight]
-- Added Spanish and Turkish translations
-- Experimental support for Gemini status bar​

v1.1.3 beta - Oct 09, 2014
-- Fixed AOSP support that was broken in 1.1.2​

v1.1.2 beta - Oct 09, 2014 [highlight](removed)[/highlight]
-- Output more debug log
-- Potential fix for stock Sony ROMs
-- Added support for JB tablet layout (statusbar at the bottom of the screen)​

v1.1.1 beta - Oct 07, 2014
-- Reduced service setup constraint (SystemUI is reloaded many times on some ROM like Spirit ROM)​

v1.1 - Oct 05, 2014
-- Added settings activity to control the filter
-- Ability to show/hide toolbox
-- Ability to make toolbox's background transparent
-- Added French translation​

v1.0.1 - Oct 02, 2014
-- Better ICS support​

v1.0 - Oct 02, 2014 [highlight](not released)[/highlight]
-- Headless Xposed module that puts filter's settings under the expanded statusbar's header​

 
Last edited:

Rom

Senior Member
Jul 1, 2013
2,574
1,064
Lyon
Thanks but i don't get to do transparancy setting, help me please..
 

tony78960

Senior Member
Sep 25, 2011
109
390
31
Thanks but i don't get to do transparancy setting, help me please..

According to your signature you are using CM 10.1, right? It should work like a charm...
It may not interfere but did you enable PowerWidgets in the expanded statusbar?

Are you using some Xposed modules that act on the statusbar?
Do you have any error log in the Xposed installer's "Log" tab?
Dumb question: did you reboot you device after enabling Screen Filter in the Xposed installer?
 
  • Like
Reactions: mauam

Rom

Senior Member
Jul 1, 2013
2,574
1,064
Lyon
According to your signature you are using CM 10.1, right? It should work like a charm...
It may not interfere but did you enable PowerWidgets in the expanded statusbar?

Are you using some Xposed modules that act on the statusbar?
Do you have any error log in the Xposed installer's "Log" tab?
Dumb question: did you reboot you device after enabling Screen Filter in the Xposed installer?

I am on CM 10.2, yes i have other modules that act on statubar like XBlast Tools, Gravitybox, check my log in attachment :)

Edit: And i have reboot my device :) I can look it:
510563Screenshot20141002201241.png
 

Attachments

  • error.rar
    5.4 KB · Views: 360
Last edited:

tony78960

Senior Member
Sep 25, 2011
109
390
31
I am on CM 10.2, yes i have other modules that act on statubar like XBlast Tools, Gravitybox, check my log in attachment :)

Edit: And i have reboot my device :) I can look it:

Nice!
Most of the errors in your logs are thrown by AlternateAppPicker, LiveIcons and GravityBox. Maybe you should warn the developers of these modules...

Looking at you screenshot I added the following point in my to-do list: "Ability to change the background of filter's settings"
 
  • Like
Reactions: afj9966 and mauam

Rom

Senior Member
Jul 1, 2013
2,574
1,064
Lyon
Nice!
Most of the errors in your logs are thrown by AlternateAppPicker, LiveIcons and GravityBox. Maybe you should warn the developers of these modules...

Looking at you screenshot I added the following point in my to-do list: "Ability to change the background of filter's settings"

Thank you very much, i will tell authors of these addons :)

Can you explain me how to change transparancy settings ?

Thanks.
 

mauam

Senior Member
Jan 26, 2011
7,349
12,931
:laugh:Forgot to say previously, this is a great battery life saver:cool: Thanks once more tony, you made my day:laugh::good:
 
  • Like
Reactions: tony78960

tony78960

Senior Member
Sep 25, 2011
109
390
31
Feature request...

Could you put in an auto time thingy...

Example...

After 9pm (when the sun is down) the screen filter kicks in saving my night vision or keeping me from having 'stare at the phone insomnia'

Thanks

Nice idea, added to the to-do list :cowboy:

A thing to remember is that Screen Filter adds a layout on top of the screen to make it darker, so it assumes that you are already at the lowest luminosity. I do not plan to make the module control backlight luminosity as well.
 
  • Like
Reactions: mauam

tony78960

Senior Member
Sep 25, 2011
109
390
31
@tony78960 Can you explain me how to change transparancy setting please ? :angel:

Sorry, I missed your last post...

Just touch the "OFF" toggle button in your expanded status bar to activate the filter.
Once it is enabled, the "OFF" text is replaced by current value of the transparency (from 0 to 255, but locked between 50 and 200 for now) and you can drag the seek bar next to the toggle button to change the transparency.

:good:
 

mauam

Senior Member
Jan 26, 2011
7,349
12,931
Sorry, I missed your last post...

Just touch the "OFF" toggle button in your expanded status bar to activate the filter.
Once it is enabled, the "OFF" text is replaced by current value of the transparency (from 0 to 255, but locked between 50 and 200 for now) and you can drag the seek bar next to the toggle button to change the transparency.

:good:

He don't mean that (I think). He's asking about the black background & how to make it transparent. I'm using xblast & gbox, but as I like it black it's not big deal for me:)
 

Attachments

  • Screenshot_2014-10-02-21-38-05.png
    Screenshot_2014-10-02-21-38-05.png
    37.9 KB · Views: 664
  • nnn.png
    nnn.png
    75.8 KB · Views: 653
Last edited:
  • Like
Reactions: tony78960

Rom

Senior Member
Jul 1, 2013
2,574
1,064
Lyon
Sorry, I missed your last post...

Just touch the "OFF" toggle button in your expanded status bar to activate the filter.
Once it is enabled, the "OFF" text is replaced by current value of the transparency (from 0 to 255, but locked between 50 and 200 for now) and you can drag the seek bar next to the toggle button to change the transparency.

:good:

No problem :good:

I understand what you told me and it took me 50 but it does not change the transparancy, I upload my SystemUI.apk maybe?

And i have send logs at devs to check my errors ;) :highfive:

Edit: @mauam: yes, you have understand, i want to change the toggles transparancy :good:
 
Last edited:
  • Like
Reactions: tony78960

mauam

Senior Member
Jan 26, 2011
7,349
12,931
No problem :good:

I understand what you told me and it took me 50 but it does not change the transparancy, I upload my SystemUI.apk maybe?

And i have send logs at devs to check my errors ;) :highfive:

Edit: @mauam: yes, you have understand, i want to change the toggles transparancy :good:

You can't for now (I think), unless the dev add an option to change the background color/opacity.
 
  • Like
Reactions: tony78960

Rom

Senior Member
Jul 1, 2013
2,574
1,064
Lyon
You can't for now (I think), unless the dev add an option to change the background color/opacity.

Okkkk that's what I thought, I can indeed change the brightness of the screen (and it must not have sight problems hihi) but not the transparancy in fact I understand now if meiux tony78960 has yet to add this feature .. :D
@tony78960 For next version can you put an interface in your app to change setting (instead of in notification drawer) or ad an option have the choice please ? :cool:
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 80
    [size=+5]Screen Filter[/size]​


    This mod puts a transparent view on top of the window manager in order to darken the whole screen.

    Once activated, the mod adds a toolbox below the header of your expanded status bar where you can easily switch ON or OFF the filter and set its transparency using the seek bar (only if the filter is active).
    A settings activity is also available to control the filter and other settings (such as tuning or hiding the toolbox).

    Screen Filter is mostly designed to lower you screen's luminosity and allow you to use your device in the dark without killing your eyes, but you can also use it as a screen privacy guard!
    Also, on AMOLED screens, reducing the luminosity improves your battery's lifetime!


    [size=+2]Features[/size]

    • Darken the whole screen, including: soft keys (nav bar), toasts, cpu info (*)
    • While activated, the filter does not trigger Android's security against overlays (like preventing you from installing new apps) (*)
    • Filter's transparency and color are customizable
    • Add a toolbox in the extended statusbar (you can disable it in the settings activity)
    • Tasker/Locale integration
    • Transparency range can be changed (but the minimum cannot go under 15 in order to avoid completely black screen)
    • Works for both phone and tablet layouts

    [size=-1](*) contrary to most "user level" screen filters on the market[/size]​


    [size=+2]Screenshots[/size]

    attachment.php

    [SIZE=-1]The number you can see in the toggle button while the filter is enabled is the current value of the alpha layer (max range: 15 to 255).[/SIZE]

    attachment.php

    [SIZE=-1]Screen Filter has a settings activity and is recognized as a plugin in Tasker.[/SIZE]


    [size=+2]Requirements[/size]

    • You need the Xposed framework installed (and working, of course).
    • Screen Filter works with ICS (4.0.3), JB, KK and Lollipop
    • Should work well on any AOSP based ROM
    • May work on some stock ROM, please report your result (good or bad) if you give a try!

    [highlight]Don't forget to read the troubleshooting section in the next post![/highlight]


    XDA:DevDB Information
    Screen Filter, Xposed for all devices (see above for details)

    Contributors
    tony78960
    Xposed Package Name: com.tonymanou.screenfilter

    Version Information
    Status: Stable
    Current Stable Version: 1.5.2
    Stable Release Date: 2015-02-22

    Created 2014-10-02
    Last Updated 2015-02-22
    20
    Hello everyone,

    First of, I wish you the best for this new year!

    Next, I must apologize for this long absence. I recognize I left you all without notice and I feel bad about it.
    It's a pity adult life is not as easy as student life... I have been really busy lately, with my job taking up much more time than I imagined. I also realized that I needed to spend more time with the family.
    Thank you to all of you for keeping on supporting the project even if I stopped giving status updates.
    @divineBliss Thank you for your support! You understood well the situation.

    Good news is that I worked on Android apps for my job, thus even if I was not working directly on Screen Filter I improved my programming knowledge!
    During summer holidays I worked a bit on Screen Filter though: service's internals needed some redesign/cleaning, and I started to implement Material Design for the UI. It was just beyond my forces to post updates here, I feared ETAs/features related questions and did not wanted to release a half-finished version...
    @all Please stop complaining about the service not working on Lollipop+, it is a known issue that is fixed on my development version! (For the curious: it was a matter of SELinux policy violation due to the name of the service *facepalm*. Credit goes to @rovo89 and @M66B!)
    Once I release the fix you will be able to forget about the heresy of putting SELinux in permissive mode! Screen Filter should work on Marshmallow too.

    Apart from the lack of free time, there is one more thing delaying Screen Filter's release: I just got a new computer and still need to migrate my data before continuing to work on Screen Filter...
    Please do not ask for ETA, a new release is on its way anyway! (Same goes for new features: just give me some more time to settle things down and rub the last bugs away.)

    Have a nice day!
    17
    [size=+2]Automation[/size]

    It is possible to control Screen Filter via intents, here is how the magic works:

    There are three different intent actions:
    • com.tonymanou.screenfilter.action.DISABLE
    • com.tonymanou.screenfilter.action.ENABLE
    • com.tonymanou.screenfilter.action.TOGGLE
    With each of these actions, you can choose which filter you want to control by setting one or both of the following extras:
    • FILTER_DIM
      Valid values for 'selected' are: "1" (int), "true" (boolean) or no value (null string).
      Valid values for 'unselected' are: "0" (int), "false" (boolean) or just don't use this extra.
    • FILTER_COLOR
      Valid values for 'selected' are: "1" (int), "true" (boolean) or no value (null string).
      Valid values for 'unselected' are: "0" (int), "false" (boolean) or just don't use this extra.
    In the case of ENABLE and TOGGLE actions, you can change the value of the filters with the following extras:
    • TRANSPARENCY
      Valid values are 8 bit unsigned integers within the transparency interval you set, between 5 and 255.
      Works only if FILTER_DIM is selected and if the darkening filter is getting enabled.
    • COLOR
      Valid values are 32 bit signed integers in base 10 representing the ARGB color (hexadecimal string not supported yet).
      Works only if FILTER_COLOR is selected and if the color filter is getting enabled.
    Note: if both FILTER_DIM and FILTER_COLOR are unselected or if they are not given, only the darkening filter is affected by the action and TRANSPARENCY is skipped.

    For instance, using the command-line:

    • adb shell am broadcast -a com.tonymanou.screenfilter.action.TOGGLE
      Toggles the darkening filter.
    • adb shell am broadcast -a com.tonymanou.screenfilter.action.ENABLE --ez FILTER_DIM true --ei TRANSPARENCY 125
      Enables the darkening filter at the transparency 125.
    • adb shell am broadcast -a com.tonymanou.screenfilter.action.ENABLE --ei FILTER_COLOR 1 --ei COLOR 792333838
      Enables the color filter at the color #2F3A0E0E (792333838 = 0x2F3A0E0E).
    • But...
      adb shell am broadcast -a com.tonymanou.screenfilter.action.DISABLE --ei FILTER_COLOR 0
      Will disable the darkening filter /!\

    Screen Filter is also provides shortcuts and is recognized as a plugin in Locale/Tasker.
    Here is how the "linked filters" option works:

    Not linked:
    • darkening enabled, color enabled
      --> darkening is disabled, color is disabled
    • darkening enabled, color disabled
      --> darkening is disabled, color is enabled & color updated
    • darkening disabled, color enabled
      --> darkening is enabled & transparency updated, color is disabled
    • darkening disabled, color disabled
      --> darkening is enabled & transparency updated, color is enabled & color updated
    Linked:
    • darkening enabled, color enabled
      --> darkening is disabled, color is disabled
    • darkening enabled, color disabled
      --> darkening is disabled
    • darkening disabled, color enabled
      --> darkening is enabled & transparency updated, color is updated
    • darkening disabled, color disabled
      --> darkening is enabled & transparency updated, color is enabled & color updated

    [size=+2]Testing[/size]

    • [size=+1]AOSP based[/size]
      Successfully tested on:
      • Android emulator 4.0.3
      • Genymotion 4.1.1 / 4.3 / 4.4.2
      • CM 11 (KK 4.4.4)
      Reported working on:
      • CM 10.2 (JB 4.3.1) on GT-i8190 [post]
      • CM 9 (ICS 4.0.4) on LG Optimus L3 [post]
    • [size=+1]Stock[/size]
      Reported working on:
      • Omni Rom on Galaxy R [post] and Galaxy S3 (GT-I9300) [post]
      • Samy Deluxe Pick Your King 4.4.2 on Galaxy S4 (GTI9505) [post]
      • Stock 4.3 MK2 baseband on Galaxy S4 (SCH-R970 USCC) [post]
      • Stock 4.4 rooted on Galaxy Note 2 [post]
      • Crash ROM (17.1) on Galaxy Note 3 (N9005) [post]
      • Stock TouchWiz 4.4.2 on Galaxy Note 3 (SM-N9005) [post] and on Note Pro 12.2 (SM-P905) [post]
      • CloudyG3 (KitKat) on LG G2 [post]
      • Stock rooted ROM on T-Mobile LG G3 [post]
      • Stock 4.4.2 (version 183.46.15) on RAZR HD [post]
      • Stock 4.4.2 on Moto G (XT1032) [post]
      • Carbon Rom 4.4.4 on Galaxy S4 mini [post]
      • KitKat Google Edition on Galaxy S4 [post]
      • Stock 4.4.4 on Nexus 5 [post]
      • Stock Sony 4.4.4 on Xperia Z (C6603) [post]
      • Stock 4.2.1 on Cubot One [post]
      • . . .
    If you get problems after installation, check in the following section if the bug is already known. If not, then read the Troubleshooting section.


    [size=+2]Known bugs[/size]

    • Screen-off animation (like electron beam / CRT effect) is not affected by the filter
    • As you can see in the first post, screenshots are affected by the filter
    • Quick settings disappear when the toolbox is visible on Stock Sense 6 (HTC One m7 and m8)
    • Stock ROM where SystemUI addon is not loaded:
      • Stock 4.4.2 on Elephone P10c
      • Stock 4.4.2 on i9500
      • Stock 4.4.2 on Micromax A106
      • Neat rom 4.1.2 on SGS2

    [size=+2]Troubleshooting[/size]

    In case you set the filter too dark and you can't see anything on your screen, just reboot your device.

    After installation or update of the module, [highlight]you must reboot your device[/highlight] to get the latest changes fully loaded.

    If it does not work even after reboot:
    • first, check if Xposed is working and if the module is activated in the Xposed Installer,
    • then, post in the thread indicating your ROM and attaching:
      • your last Xposed error log (the /data/data/de.robv.android.xposed.installer/log/error.log file)
      • and your SystemUI.apk (should be located in /system/app or /system/priv-app)
      Thanks!

    [size=+2]To-do list[/size]

    • Toolbox customization:
      • Hide the toolbox from notification panel or quick settings independently
      • Choose location (top/bottom)
      • Change the height
      • Double tap on the icon to open settings activity
      • Full toolbox customization:
        • Change items location
        • Ability to make the button transparent or replace it by a grey(off)/white(on) image
        • Ability to add shortcuts to some values
    • Filter improvements:
      • Let the user create different settings (color + transparency)
      • Filter pattern [post] [post]
      • Darkening filter using an image [post]
      • Filter blending using multiply instead of addition (?)
      • Allow unfiltered screenshots (?)
    • Other ways to toggle the filter:
      • Notification with ^ and v buttons
      • Overlay control [post]
    • Automation:
      • Auto enable at device startup
      • Auto enable depending on application context
      • Auto enable depending on the time and/or battery level
    • Other:
      • Make the project open-source
      • Llama integration (locale changer)
      • Make use of the luminosity sensor
    11
    Hello, all my apologize for not answering earlier, I was quite busy with my studies lately... Next week is going to be time consuming too.

    I tried to work on a way to change the location of the toolbox (notification area or quick settings, top or bottom), but even for a pure AOSP based ROM it seems quite tricky.
    Just imagine the difficulty of the task if I want to support various Stock ROM flavors! So for now, I leave this in a corner until I have more free time.

    By the end of the weekend I will probably release a version allowing you to change filter's color.
    Oh and yeah, don't forget to read the three first posts of this thread before requesting a new feature, it's probably already in the to-do list and I just need some time to implement it!
    Thank you for your patience :good:
    9
    Screen Filter 1.2 stable is here!

    Changelog:
    • Added ability to change default transparency
    • Added ability to enable debug log (disabled by default)
    • Updated Japanese translation
    • Added Chinese translation
    • Code cleaning and small bugfixes
    (Two new strings to translate: defaultTransparency and setDefaultTransparency)