Coder Social home page Coder Social logo

betterwifionoff's People

Contributors

asksven avatar gaich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

betterwifionoff's Issues

[bug] Preference "On only when previously on" work inconsistently

state machine controlled by prefs "wifi_on_when_previously_on" and "last_action"

Goal:
last action shows what was the last thing done by BetterWifiOnOff
if last_action was on
but wifi is off that means that the user turned it off -> don't turn on
if last action was off
but wifi is on that means that the user turned it on -> don't turn off

[feature] keep wifi active when data is transferring and screen goes off

Just installed on my TF101 and was updating a load of apps from Google Play. The screen went off, and a few minutes later I unlocked the screen and the WiFi was off (and then reconnected as expected).

It would be nice if the WiFi wouldn't drop when the screen goes off if there is data transferring (over a given threshold I guess), to avoid aborting any downloads that are in progress.

[feature] keep wifi on when screen goes off and in a call

TelephonyManager telephony = (TelephonyManager) mContext
.getSystemService(Context.TELEPHONY_SERVICE);
if (telephony.getCallState() == TelephonyManager.CALL_STATE_OFFHOOK
|| telephony.getCallState() == TelephonyManager.CALL_STATE_RINGING) {
Slog.w(TAG, "Phone is ringing or in a phone call, not enabling power saver");
return;
}

[bug] binder error

ceiverCallNotAllowedException: IntentReceiver components are not allowed to bind to services
E/AndroidRuntime(29242): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2362)
E/AndroidRuntime(29242): at android.app.ActivityThread.access$1500(ActivityThread.java:142)
E/AndroidRuntime(29242): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
E/AndroidRuntime(29242): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(29242): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(29242): at android.app.ActivityThread.main(ActivityThread.java:4928)
E/AndroidRuntime(29242): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(29242): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(29242): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(29242): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
E/AndroidRuntime(29242): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(29242): Caused by: android.content.ReceiverCallNotAllowedException: IntentReceiver components are not allowed to bind to services
E/AndroidRuntime(29242): at android.app.ReceiverRestrictedContext.bindService(ContextImpl.java:142)
E/AndroidRuntime(29242): at com.asksven.betterwifionoff.services.EventWatcherServiceBinder.doBindService(EventWatcherServiceBinder.java:95)
E/AndroidRuntime(29242): at com.asksven.betterwifionoff.services.EventWatcherServiceBinder.getInstance(EventWatcherServiceBinder.java:46)
E/AndroidRuntime(29242): at com.asksven.betterwifionoff.handlers.BroadcastHandler.onReceive(BroadcastHandler.java:122)
E/AndroidRuntime(29242): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2355)

[bug] typos

If in a call section should be leave wifi on if not of

Wifi tethering section should be leave on not of

for consistently purposes under the rules for leaving wifi on add the word in after if plugged to match your language with the other sections.

[bug] Wifi off delay in prefs is misleading

Also, the "Connection timeout" and its description indicates that it only applies to the "Only if connected" rule but I think it applies to all "Rules for leaving wifi on"

[feature] add basic and advanced profiles on prefs

A "simple" mode would be:
Service setting (all hidden)
Rules for turning Wifi on (all visible)

Rules for leaving Wifi on
Only if connected (on by default but hidden)
Check for cage (off by default but hidden)
If in call (I feel this pref could be removed completely and the behavior aleays be as "on")
If netwotk activity (off by default and hidden)
If wakelock is held (on by default but hidden)
If Wifi tethering (I feel this pref could be removed completely and the behavior aleays be as "on"

Rules whn plugged in
Wifilocks (off by default and hidden)

Rules for turining Wifi off (all on by default and hidden)

Own logfile: not really required as I will provide logcat with grep on BetterWifiOnOff

[feature] leave Wifi on if a partial wakelock is held

There's a kernel module responsible for creating KWLs on behalf of userland processes. It exposes 2 sysfs entries at /sys/power/wake_lock and wake_unlock.
Any regular process (running as radio or as system) can write to wake_lock to create and lock a KWL with the same name as the passed text. And to unlock it, write the same text to the wake_unlock file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.