Related
Seriously... does anyone besides me get super irritated when the G1 shuts the screen off during calls? When you are calling automated lines or checking voicemail it's like the biggest pain in the ass... anyone know of a setting or something to stop the phone from turning screen off during calls?
Closes app you can get now is Shake Awake. It won't keep your screen on, but it will turn it on when you move (shake) the phone http://www.cyrket.com/package/com.maplekeycompany.apps.shake
I have been griping about this very problem for almost a year now. Shake awake is nice, but how about just changing a setting so that the phone screen DOES NOT SLEEP during a call? Anyone know where this would be?
There is no such setting. That question has been asked many times before, I'm sure someone would have worked it out if it was possible.
OK. I think I have found the culprit. This is what happens when the screen is shutting itself off during a call:
D/PhoneApp( 185): updateWakeState: keepScreenOn = false (isRinging false, showingDisc false)
D/SurfaceFlinger( 134): About to give-up screen, flinger = 0x17b200
Just a few changes should do the trick. I'll try to work on this.
You'd be a hero for many people if you figured this out
Looking at PhoneApp.java, this seems to be getting closer:
559 /**
560 * Controls how quickly the screen times out.
561 *
562 * The poke lock controls how long it takes before the screen powers
563 * down, and therefore has no immediate effect when the current
564 * WakeState (see {@link PhoneApp#requestWakeState}) is FULL.
565 * If we're in a state where the screen *is* allowed to turn off,
566 * though, the poke lock will determine the timeout interval (long or
567 * short).
568 *
569 * @param shortPokeLock tells the device the timeout duration to use
570 * before going to sleep
571 * {@link com.android.server.PowerManagerService#SHORT_KEYLIGHT_DELAY}.
572 */
573 /* package */ void setScreenTimeout(ScreenTimeoutDuration duration) {
574 if (DBG) Log.d(LOG_TAG, "setScreenTimeout(" + duration + ")...");
575
576 // make sure we don't set the poke lock repeatedly so that we
577 // avoid triggering the userActivity calls in
578 // PowerManagerService.setPokeLock().
579 if (duration == mPokeLockSetting) {
580 return;
581 }
582 mPokeLockSetting = duration;
583
584 // This is kind of convoluted, but the basic thing to remember is
585 // that the poke lock just sends a message to the screen to tell
586 // it to stay on for a while.
587 // The default is 0, for a long timeout and should be set that way
588 // when we are heading back into a the keyguard / screen off
589 // state, and also when we're trying to keep the screen alive
590 // while ringing. We'll also want to ignore the cheek events
591 // regardless of the timeout duration.
592 // The short timeout is really used whenever we want to give up
593 // the screen lock, such as when we're in call.
594 int pokeLockSetting = LocalPowerManager.POKE_LOCK_IGNORE_CHEEK_EVENTS;
595 switch (duration) {
596 case SHORT:
597 // Set the poke lock to timeout the display after a short
598 // timeout (5s). This ensures that the screen goes to sleep
599 // as soon as acceptably possible after we the wake lock
600 // has been released.
601 if (DBG) Log.d(LOG_TAG, "setting short poke lock");
602 pokeLockSetting |= LocalPowerManager.POKE_LOCK_SHORT_TIMEOUT;
603 break;
604
605 case MEDIUM:
606 // Set the poke lock to timeout the display after a medium
607 // timeout (15s). This ensures that the screen goes to sleep
608 // as soon as acceptably possible after we the wake lock
609 // has been released.
610 if (DBG) Log.d(LOG_TAG, "setting medium poke lock");
611 pokeLockSetting |= LocalPowerManager.POKE_LOCK_MEDIUM_TIMEOUT;
612 break;
613
614 case DEFAULT:
615 default:
616 // set the poke lock to timeout the display after a long
617 // delay by default.
618 // TODO: it may be nice to be able to disable cheek presses
619 // for long poke locks (emergency dialer, for instance).
620 if (DBG) Log.d(LOG_TAG, "reverting to normal long poke lock");
621 break;
622 }
623
624 // Send the request
625 try {
626 mPowerManagerService.setPokeLock(pokeLockSetting, mPokeLockToken, LOG_TAG);
627 } catch (RemoteException e) {
628 }
629 }
Click to expand...
Click to collapse
please please get this done... I'm even willing to donate I really want this... soooooooooooooooo tired of pressing MENU every time I need to get anywhere... and with some of these automated lines it can be like 10+ times each call...
Installing it on my phone now and keeping my fingers crossed...
I think there are more crossed fingers than just yours
derfolo said:
Installing it on my phone now and keeping my fingers crossed...
Click to expand...
Click to collapse
That's one long install. I hope you didn't completely trash your phone
I thought the Power Manager app had an option to keep the screen awake during calls...well at least the trial version DID (before it became a trial version)
damn wish i hadnt erased that ASTRO backup file...
I could be wrong but how can i check if I dont wanna buy the app.
dammit I want this!!! baaaaaaaaaaaad!!!
You should really try the power manager app like someone else mentioned. There is an option for keeping the phone awake, albeit only for 2 mins, but it should do the trick.
Hi all,
Sorry for the delay. I had two birthday parties to attend tonight, and my wife was not going to let me get out of it.
The short story is that my original hack did not work correctly. I incorrectly focused on the SHORT_TIMEOUT, when in fact the one that is happening during calls is the MEDIUM. The bonus is that I think I know what is going on at this point. I will keep trying tomorrow. When I am done, I will have a phone.apk that will replace the current one. oooh.
derfolo said:
Hi all,
Sorry for the delay. I had two birthday parties to attend tonight, and my wife was not going to let me get out of it.
The short story is that my original hack did not work correctly. I incorrectly focused on the SHORT_TIMEOUT, when in fact the one that is happening during calls is the MEDIUM. The bonus is that I think I know what is going on at this point. I will keep trying tomorrow. When I am done, I will have a phone.apk that will replace the current one. oooh.
Click to expand...
Click to collapse
I love you man
oneG said:
I thought the Power Manager app had an option to keep the screen awake during calls...well at least the trial version DID (before it became a trial version)
damn wish i hadnt erased that ASTRO backup file...
I could be wrong but how can i check if I dont wanna buy the app.
Click to expand...
Click to collapse
You'd spend a buck on snickers or coke without even thinking - why not buy .99 app?
But if you want to just test it, you can get it and then return it within 24 hours.
I didn't know it had that feature, but even now that I know it, I don't want a full-blown app just to change screen timeout.
exactly... I don't want an application slowing down my phone all the time and also messing with the boot just to have an option that should be on the phone already and most likely can be sorta easily changed...
Send me a patch when you've got it working and I'll add it to my build if you would like!
cyanogen said:
Send me a patch when you've got it working and I'll add it to my build if you would like!
Click to expand...
Click to collapse
EDIT: Got it done! See my post below for the Phone.apk attachment...
So yesterday i was just doing some general browsing on my tablet. I received a warning that my battery was low at 11%. A minute or two later it died so I figured the battery percentage was just in accurate. After I plugged it in and let it charge I tried to turn it on and the tablet boots up just fine, but the screen doesnt turn on at all. No backlight, no anything. It boots up ok since i can feel it vibrate, adb works, and i can hear the chimes for new emails and notifications. I pulled a logcat from the boot up process to see if it tells me anything. In the logcat i keep seeing this line of data show up:
E/hwcomposer( 155): /sys/class/graphics/fb0/device/smartdimmer/enable: open failed: Permission denied
E/hwcomposer( 155): Failed to set initial DIDIM status to enable
D/hwcomposer( 155): Display 0: found 2 modes
W/hwcomposer( 155): Skipping mode with invalid timing (1920 x 1200)
D/hwcomposer( 155): unmatched: 1920 x 1200 @ 59.95 Hz
D/hwcomposer( 155): display type 0: vblank period = 16679218 ns
D/hwcomposer( 155): dc_blank: display 0, [-1 -> 0]
So my question is, is there any chance that it is some sort of software issue not allowing the screen to turn on or I just get the errors due to the screen not working?
Wonder if it would help to hook it up HDMI...then maybe you could check the screen settings???
Android Marshmallow Doze Settings Editor
Requires Root
This app is a simple editor of the settings or parameters which affect the operation of Doze.
If no root is available then it will offer an ADB command that will modify the doze settings.
Because there is no root on open it will always load the default settings.
Changelog - v6.0
You can now add your own custom profiles.
Added tuhinxp04's profile
Bugfix - No longer crashes when device settings unavailable. Will change to non root mode.
Bugfix - Info screen now shows default in current display type
Bugfix - Info screen now shows location accuracy with meters
Changelog - v5.0
New built in profiles
Bugfix - Back arrow in settings not closing activity
The next post contains descriptions of each parameter.
Source Code
https://github.com/p0isonra1n/Doze-Settings-Editor
Disclaimer
I accept no responsibility for any outcome that this app may cause. Use at your own risk.
Parameter Descriptions
These are all direct from the Doze source code.
Inactive Timeout - inactive_to
This is the time, after becoming inactive, at which we start looking at the motion sensor to determine if the device is being left alone. We don't do this immediately after going inactive just because we don't want to be continually running the significant motion sensor whenever the screen is off.
Sensing Timeout - sensing_to
If we don't receive a callback from AnyMotion in this amount of time + locating_to, we will change from STATE_SENSING to STATE_INACTIVE, and any AnyMotion callbacks while not in STATE_SENSING will be ignored.
Locating Timeout - locating_to
This is how long we will wait to try to get a good location fix before going in to idle mode.
Location Accuracy - location_accuracy
The desired maximum accuracy (in meters) we consider the location to be good enough to go on to idle. We will be trying to get an accuracy fix at least this good or until locating_to expires.
Motion Inactive Timeout - motion_inactive_to
This is the time, after seeing motion, that we wait after becoming inactive from that until we start looking for motion again.
Idle After Inactive Timeout - idle_after_inactive_to
This is the time, after the inactive timeout elapses, that we will wait looking for significant motion until we truly consider the device to be idle.
Idle Pending Timeout - idle_pending_to
This is the initial time, after being idle, that we will allow ourself to be back in the IDLE_PENDING state allowing the system to run normally until we return to idle.
Max Idle Pending Timeout - max_idle_pending_to
Maximum pending idle timeout (time spent running) we will be allowed to use.
Idle Pending Factor - idle_pending_factor
Scaling factor to apply to current pending idle timeout each time we cycle through that state.
Idle Timeout - idle_to
This is the initial time that we want to sit in the idle state before waking up again to return to pending idle and allowing normal work to run.
Max Idle Timeout - max_idle_to
Maximum idle duration we will be allowed to use.
Idle Factor - idle_factor
Scaling factor to apply to current idle timeout each time we cycle through that state.
Min Time to Alarm - min_time_to_alarm
This is the minimum time we will allow until the next upcoming alarm for us to actually go in to idle mode.
Max Temp App Whitelist Duration - max_temp_app_whitelist_duration
Max amount of time to temporarily whitelist an app when it receives a high tickle.
MMS Temp App Whitelist Duration - mms_temp_app_whitelist_duration
Amount of time we would like to whitelist an app that is receiving an MMS.
SMS Temp App Whitelist Duration - sms_temp_app_whitelist_duration
Amount of time we would like to whitelist an app that is receiving an SMS.
Extra Infomation
Difference: Doze and App Standby (developer.android.com)
Some tests and issues: code.google.com
Requires root.... so.... source code?
Going to play with this on my Oneplus one for some time.
Thanks for your work m8.
9THX!
Does it show the default numbers or does it read out the current settings?
E.g. can we see what is changed with aggressive doze from greenify?
Edit: aggressive doze seems not edit directly these strings ...
----------------------------------------------------------------------------------------------
note:
whitelist is only for app Standby!
Difference: Doze and App Standby (developer.android.com)
Some tests and issues: code.google.com
Some add links:
Power Management (source.android.com)
Doze and App Standby (developer.android.com)
Doze steps (xda)
Understanding what Doze mode means for your app - Pro-tip by +Joanna Smith (G+)
time explanation in more simple english (xda)
what we found out:
*timeout means not max. time - so the system check only from time to time if there are timeouts over, then it will stop - this is not exactly triggered (only linux sw timer)
** if e.g. sensing_timeout = 0 it will stop sensing after the next control cycle (SystemClock Interrupt AlarmTime) - although it is 0, it will check the motion sensor for few seconds
*idle mode (doze) stops if
**idle_to is reached or
**phone detect any significant motion (!)
**some tests from @italia0101
idle def (source code):
Code:
/** Device is in the idle state, trying to stay asleep as much as possible. */
Device idle controller (deviceidle) dump options:
(adb shell dumpsys battery unplug)
Code:
adb shell dumpsys deviceidle -h
Device idle controller (deviceidle) dump options:
[-h] [CMD]
-h: print this help text.
Commands:
step
Immediately step to next state, without waiting for alarm.
force-idle
Force directly into idle mode, regardless of other device state.
[B] Use "step" to get out.[/B]
disable
Completely disable device idle mode.
enable
Re-enable device idle mode after it had previously been disabled.
enabled
Print 1 if device idle mode is currently enabled, else 0.
whitelist
Print currently whitelisted apps.
whitelist [package ...]
Add (prefix with +) or remove (prefix with -) packages.
tempwhitelist [package ..]
Temporarily place packages in whitelist for 10 seconds.
[GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies
adb shell dumpsys deviceidle - output:
Code:
adb shell dumpsys deviceidle
Settings:
inactive_to=+30m0s0ms
sensing_to=+4m0s0ms
locating_to=+30s0ms
location_accuracy=20.0m
motion_inactive_to=+10m0s0ms
idle_after_inactive_to=+30m0s0ms
idle_pending_to=+5m0s0ms
max_idle_pending_to=+10m0s0ms
idle_pending_factor=2.0
idle_to=+60m0s0ms
max_idle_to=+6h0m0s0ms
idle_factor=2.0
min_time_to_alarm=+60m0s0ms
max_temp_app_whitelist_duration=+5m0s0ms
mms_temp_app_whitelist_duration=+60s0ms
sms_temp_app_whitelist_duration=+20s0ms
Whitelist (except idle) system apps:
com.android.providers.downloads
com.android.vending
com.google.android.gms
Whitelist system apps:
com.google.android.gms
Whitelist (except idle) all app ids:
10008
10011
10020
Whitelist all app ids:
10011
mEnabled=true
mForceIdle=false
mSigMotionSensor={Sensor name="Significant Motion Detector", vendor="QTI", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.3999939, minDelay=-1}
mCurDisplay=Display id 0: DisplayInfo{"Integrierter Bildschirm", uniqueId "local:0", app 1080 x 1823, real 1080 x 1920, largest app 1835 x 1769, smallest app 1080 x 1026, mode 1, defaultMode 1, modes [{id=1, width=1080, height=1920, fps=60.0}], rotation 0, density 360 (442.451 x 443.345) dpi, layerStack 0, appVsyncOff 7500000, presDeadline 12666667, type BUILT_IN, state OFF, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}, DisplayMetrics{density=2.25, width=1080, height=1823, scaledDensity=2.25, xdpi=442.451, ydpi=443.345}, isValid=true
mScreenOn=false
mCharging=false
mSigMotionActive=false
mSensing=false mNotMoving=false
mLocating=false mHaveGps=false mLocated=false
mState=INACTIVE
mInactiveTimeout=+5m0s0ms
mNextAlarmTime=+4m57s175ms
MOTION_INACTIVE_TIMEOUT
Code:
@Override
public void onTrigger(TriggerEvent event) {
synchronized (DeviceIdleController.this) {
active = false;
motionLocked();
}
}
@Override
public void onSensorChanged(SensorEvent event) {
synchronized (DeviceIdleController.this) {
mSensorManager.unregisterListener(this, mMotionSensor);
active = false;
motionLocked();
}
}
void motionLocked() {
// The motion sensor will have been disabled at this point
handleMotionDetectedLocked(mConstants.[B]MOTION_INACTIVE_TIMEOUT[/B], "motion");
}
void handleMotionDetectedLocked(long timeout, String type) {
// The device is not yet active, so we want to go back to the pending idle
// state to wait again for no motion. Note that we only monitor for motion
// after moving out of the inactive state, so no need to worry about that.
if (mState != STATE_ACTIVE) {
scheduleReportActiveLocked(type, Process.myUid());
mState = STATE_ACTIVE;
[B]mInactiveTimeout = timeout; [/B]
EventLogTags.writeDeviceIdle(mState, type);
becomeInactiveIfAppropriateLocked();
}
}
void becomeInactiveIfAppropriateLocked() {
if (((!mScreenOn && !mCharging) || mForceIdle) && mEnabled && mState == STATE_ACTIVE) {
// Screen has turned off; we are now going to become inactive and start
// waiting to see if we will ultimately go idle.
mState = STATE_INACTIVE;
resetIdleManagementLocked();
scheduleAlarmLocked([B]mInactiveTimeout[/B], false);
EventLogTags.writeDeviceIdle(mState, "no activity");
}
}
void scheduleAlarmLocked(long delay, boolean idleUntil) {
mNextAlarmTime = SystemClock.elapsedRealtime() + delay;
if (idleUntil) {
mAlarmManager.setIdleUntil(AlarmManager.ELAPSED_REALTIME_WAKEUP,
mNextAlarmTime, mAlarmIntent);
} else {
mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
mNextAlarmTime, mAlarmIntent);
}
}
SENISING_TIMEOUT
Code:
switch (mState) {
case STATE_INACTIVE:
// We have now been inactive long enough, it is time to start looking
// for motion and sleep some more while doing so.
...
break;
case STATE_IDLE_PENDING:
mState = STATE_SENSING;
EventLogTags.writeDeviceIdle(mState, "step");
scheduleSensingAlarmLocked(mConstants.[B]SENSING_TIMEOUT[/B]);
cancelSensingAlarmLocked();
cancelLocatingLocked();
mAnyMotionDetector.checkForAnyMotion();
mNotMoving = false;
mLocated = false;
mLastGenericLocation = null;
mLastGpsLocation = null;
break;
case STATE_SENSING:
...
}
void scheduleAlarmLocked(long delay, boolean idleUntil) {
mNextAlarmTime = SystemClock.elapsedRealtime() + delay;
if (idleUntil) {
mAlarmManager.setIdleUntil(AlarmManager.ELAPSED_REALTIME_WAKEUP,
mNextAlarmTime, mAlarmIntent);
} else {
mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
mNextAlarmTime, mAlarmIntent);
}
}
// mAlarmManager.setIdleUntil * Schedule an idle-until alarm, which will keep the alarm manager idle until the given time.
// mAlarmManager.set * Schedule an alarm.; If the stated trigger time is in the past, the alarm will be triggered immediately.
//android/server/AnyMotionDetector.java
public AnyMotionDetector(AlarmManager am, PowerManager pm, Handler handler, SensorManager sm,
DeviceIdleCallback callback) {
mAlarmManager = am;
mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
mHandler = handler;
mSensorManager = sm;
mAccelSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
mMeasurementInProgress = false;
mState = STATE_INACTIVE;
mCallback = callback;
mRunningStats = new RunningSignalStats();
mNumSufficientSamples = (int) Math.ceil(
((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
}
private final class MotionListener extends TriggerEventListener
implements SensorEventListener {
...
}
private final SensorEventListener mListener = new SensorEventListener() {
@Override
public void onSensorChanged(SensorEvent event) {
int status = RESULT_UNKNOWN;
synchronized (mLock) {
Vector3 accelDatum = new Vector3(SystemClock.elapsedRealtime(), event.values[0],
event.values[1], event.values[2]);
mRunningStats.[B]accumulate[/B](accelDatum);
// If we have enough samples, stop accelerometer data acquisition.
if (mRunningStats.getSampleCount() >= mNumSufficientSamples) {
status = stopOrientationMeasurementLocked();
}
}
if (status != RESULT_UNKNOWN) {
mCallback.onAnyMotionResult(status);
}
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
};
private int stopOrientationMeasurementLocked() {
int status = RESULT_UNKNOWN;
if (mMeasurementInProgress) {
mSensorManager.unregisterListener(mListener);
mHandler.removeCallbacks(mMeasurementTimeout);
if (mWakeLock.isHeld()) {
mWakeLock.release();
}
long detectionEndTime = SystemClock.elapsedRealtime();
mMeasurementInProgress = false;
mPreviousGravityVector = mCurrentGravityVector;
mCurrentGravityVector = mRunningStats.getRunning[B]Average[/B]();
mRunningStats.reset();
status = getStationaryStatus();
if (status != RESULT_UNKNOWN) {
mState = STATE_INACTIVE;
} else {
/*
* Unknown due to insufficient measurements. Schedule another orientation
* measurement.
*/
Message msg = Message.obtain(mHandler, mSensorRestart);
msg.setAsynchronous(true);
mHandler.sendMessageDelayed(msg, ORIENTATION_MEASUREMENT_INTERVAL_MILLIS);
}
}
return status;
}
/*
* Updates mStatus to the current AnyMotion status.
*/
public int getStationaryStatus() {
if ((mPreviousGravityVector == null) || (mCurrentGravityVector == null)) {
return RESULT_UNKNOWN;
}
Vector3 previousGravityVectorNormalized = mPreviousGravityVector.normalized();
Vector3 currentGravityVectorNormalized = mCurrentGravityVector.normalized();
float angle = previousGravityVectorNormalized.angleBetween(currentGravityVectorNormalized);
if ((angle < [B]THRESHOLD_ANGLE[/B]) && (mRunningStats.getEnergy() < [B]THRESHOLD_ENERGY[/B])) {
return [B]RESULT_STATIONARY[/B];
} else if (Float.isNaN(angle)) {
/**
* Floating point rounding errors have caused the angle calcuation's dot product to
* exceed 1.0. In such case, we report RESULT_MOVED to prevent devices from rapidly
* retrying this measurement.
*/
return [B]RESULT_MOVED[/B];
}
long diffTime = mCurrentGravityVector.timeMillisSinceBoot -
mPreviousGravityVector.timeMillisSinceBoot;
if ([B]diffTime [/B]> [B]STALE_MEASUREMENT_TIMEOUT_MILLIS[/B]) {
return [B]RESULT_UNKNOWN[/B];
}
return [B]RESULT_MOVED[/B];
}
/** Current measurement state. */
private int mState;
/** Threshold angle in degrees beyond which the device is considered moving. */
private final float THRESHOLD_ANGLE = 2f;
/** Threshold energy above which the device is considered moving. */
private final float THRESHOLD_ENERGY = 5f;
/** The duration of the accelerometer orientation measurement. */
private static final long ORIENTATION_MEASUREMENT_DURATION_MILLIS = 2500;
/** The maximum duration we will collect accelerometer data. */
private static final long ACCELEROMETER_DATA_TIMEOUT_MILLIS = 3000;
/** The interval between accelerometer orientation measurements. */
private static final long ORIENTATION_MEASUREMENT_INTERVAL_MILLIS = 5000;
/**
* The duration in milliseconds after which an orientation measurement is considered
* too stale to be used.
*/
private static final int STALE_MEASUREMENT_TIMEOUT_MILLIS = 2 * 60 * 1000;
/** The accelerometer sampling interval. */
private static final int SAMPLING_INTERVAL_MILLIS = 40;
[B][/B]
/android/server/DeviceIdleController.java
motionLocked() https://android.googlesource.com/pl...android/server/DeviceIdleController.java#1402
scheduleAlarmLocked https://android.googlesource.com/pl...android/server/DeviceIdleController.java#1402
sensing scheduleAlarmLocked https://android.googlesource.com/pl...android/server/DeviceIdleController.java#1490
/android/hardware/Sensor.java
description of a significant motion trigger sensor (TYPE_SIGNIFICANT_MOTION = 17) https://android.googlesource.com/pl...er/core/java/android/hardware/Sensor.java#305
mPower: https://android.googlesource.com/pl...er/core/java/android/hardware/Sensor.java#721
SensorPrintString https://android.googlesource.com/pl...er/core/java/android/hardware/Sensor.java#848
/android/hardware/SensorManager.java
cancelTriggerSensor https://android.googlesource.com/pl...java/android/hardware/SensorManager.java#1534
/android/server/AnyMotionDetector.java
constant: https://android.googlesource.com/pl.../com/android/server/AnyMotionDetector.java#64
I think with the string sensing_to = 0 we could deaktivate any motion for doze.
Could that be right?
Im not sure if all settings (pic) make sense... :/
original:
test:
final:
I will try it (a better "aggressiv doze")
Are the numbers in this app in seconds?
Sent from my Nexus 6 using XDA Free mobile app
freebee269 said:
Are the numbers in this app in seconds?
Sent from my Nexus 6 using XDA Free mobile app
Click to expand...
Click to collapse
Milliseconds e.g. 600000 means 10min
If you have greenify beta installed you might want to disable doze setting as it may affect this app changes.
Sent from my Nexus 6 using XDA Free mobile app
freebee269 said:
If you have greenify beta installed you might want to disable doze setting as it may affect this app changes.
Sent from my Nexus 6 using XDA Free mobile app
Click to expand...
Click to collapse
I think greenify use such a code:
" adb shell dumpsys deviceidle force-idle" to (only!) force doze mode if screen goes off.
http://forum.xda-developers.com/nexus-6/general/doze-depth-t3234529
So I think we could combine both.
The command "dumpsys deviceidle disable" should disable Doze.
The app will read the current settings but will fall back to loading the defaults if it can't read the settings.
this is what i have so far. greenify uninstalled.
- inactive_to set to 600000 (10min) - the time i want my device to sit before it thinks about going into doze.
- locating_to set to 0 - going into idle (doze) right away
- sensing_to set to 0 - disabling motion and going into inactive right away
- location_accuracy not changed - doesnt matter because we are going into idle right away with locating_to set to 0
- motion_inactive_to set to 0 - disabling motion
- idle_after_inactive_to set to 0 - we are already waiting 10min with inactive_to, no need to wait any longer
- idle_pending_to set to 120000 (2min) - my phone can check for updates for 2min before going back into idle
- max_idle_pending set to 120000 (2min) - my phone can check for updates for 2min before going back into idle
- idle_to set to 1800000 (30min) - the time in idle before my phone can change to idle pending to check for updates
i wonder if these settings will revert to defaults if i reboot? if so, is there a way to automate these settings with initd?
They should stick through a reboot as they are saved in the global settings.
Mkkt Bkkt said:
Going to play with this on my Oneplus one for some time.
Thanks for your work m8.
Click to expand...
Click to collapse
which marshmallow rom are you using on 1+1 ? doze is marshmallow only JFYI
---------- Post added at 10:20 AM ---------- Previous post was at 10:14 AM ----------
freebee269 said:
this is what i have so far. greenify uninstalled.
- inactive_to set to 600000 (10min) - the time i want my device to sit before it thinks about going into doze.
- locating_to set to 0 - going into idle (doze) right away
- sensing_to set to 0 - disabling motion and going into inactive right away
- location_accuracy not changed - doesnt matter because we are going into idle right away with locating_to set to 0
- motion_inactive_to set to 0 - disabling motion
- idle_after_inactive_to set to 0 - we are already waiting 10min with inactive_to, no need to wait any longer
- idle_pending_to set to 120000 (2min) - my phone can check for updates for 2min before going back into idle
- max_idle_pending set to 120000 (2min) - my phone can check for updates for 2min before going back into idle
- idle_to set to 1800000 (30min) - the time in idle before my phone can change to idle pending to check for updates
i wonder if these settings will revert to defaults if i reboot? if so, is there a way to automate these settings with initd?
Click to expand...
Click to collapse
there will be tasker integration i'm sure and depending on ones skill it should be possible to set this up in tasker already, something like day and night profiles. this app will be a runner once people get aware of it. will replace amplify since doze in action beats amplify by far on my N6 and N5. Surprised how fast someone came up with such a thing even though it was clear from day one that it will happen LOL "CHAPEAU" to @p0isonra1n
would be interesting if it is possible to log the doze steps: (Doze - In depth)
*IDLE_PENDING
*SENSING
*IDLE
*IDLE_MAINTENANCE
to find out how doze exactly works with different settings
magnamentis said:
which marshmallow rom are you using on 1+1 ? doze is marshmallow only JFYI
---------- Post added at 10:20 AM ---------- Previous post was at 10:14 AM ----------
there will be tasker integration i'm sure and depending on ones skill it should be possible to set this up in tasker already, something like day and night profiles. this app will be a runner once people get aware of it. will replace amplify since doze in action beats amplify by far on my N6 and N5. Surprised how fast someone came up with such a thing even though it was clear from day one that it will happen LOL "CHAPEAU" to @p0isonra1n
Click to expand...
Click to collapse
I'm using experimental home build.
5% drain over 9hours of deep sleep.
6hours to 8hours SOT max. (Depends on usage..etc)
Mkkt Bkkt said:
I'm using experimental home build.
5% drain over 9hours of deep sleep.
6hours to 8hours SOT max. (Depends on usage..etc)
Click to expand...
Click to collapse
ok, thanks for the feedback
i get 1% drain in 9-10h idle with my nexus 5, 2-3% drain with nexus 6 due to LED always on and i think 5% is slightly on the high side depending.
the 1% on nexus 5 correlate with 0.09% awake which is an absolute record result. the N6 has not only LED always on but as well has wake gestures ( dt2w ) active at all times while the N5 switches that of off charger. unfortunately that tasker intent, albeit it works, cannot be used on N6 because for yet unknown reason it will cause a random reboot a minute or 2 after the intent was executed. still trying to get feedback from the kernel dev as to what could be the reason. congrates for having MM on OPO, my OPO is now used by my dad hence i wait a bit for things to settle until i shall flash MM on that device.
GeraldRudi said:
would be interesting if it is possible to log the doze steps: (Doze - In depth)
*IDLE_PENDING
*SENSING
*IDLE
*IDLE_MAINTENANCE
to find out how doze exactly works with different settings
Click to expand...
Click to collapse
The sequence starts with sensing and locating. Once those 2 timeouts have passed and have not been tripped then it goes to inactive. After inactive timeout passes then it goes into idle which is the actual doze. It periodically wakes itself from doze with idle pending setting for normal phone function then goes back into doze.
Sent from my Nexus 6 using XDA Free mobile app
I am using Cataclysm without root(office mail requirement) on my N6.
Is there a way that we can achieve this in TWRP?
Sent from my Nexus 6 using Tapatalk
As it say in title my N5's Screen Randomly Turn off & Flicker in Dark (any ROM..stock 6.0.1/Pure nexus/AOSPA 7.1)
after sceen goes off it doesn't wake by power button or any other means till either i turn on the light in room or force reboot by holding power button.
Important things to consider :
Random (mostly happens on Browsing, Streaming video in chrome, FB , News apps But never happened in YouTube or MX Player while playing video)
Only happens in Dark (it never happened in Day)
Can easily wake the sceen once i turn on light in room but there is no other way to turns it on in Dark once it goes off.
Some times Screen flickers before going off (not always)
from this points i tend to believe it's related to proximity sensor but tried checking it's working via some apps and they shows it's working perfectly.
even tried resting proximity data via EFS backup still no luck.
if you know something about this issue kindly help
Thanks in advance
i have the same problem.
i onlin turn on the image when disconnect the baterry for 2 or 3 minutes, but nothing resolve the problem.
i chainge the lcd but not resolve the problema.
jineshpatel30 said:
As it say in title my N5's Screen Randomly Turn off & Flicker in Dark (any ROM..stock 6.0.1/Pure nexus/AOSPA 7.1)
after sceen goes off it doesn't wake by power button or any other means till either i turn on the light in room or force reboot by holding power button.
Important things to consider :
Random (mostly happens on Browsing, Streaming video in chrome, FB , News apps But never happened in YouTube or MX Player while playing video)
Only happens in Dark (it never happened in Day)
Can easily wake the sceen once i turn on light in room but there is no other way to turns it on in Dark once it goes off.
Some times Screen flickers before going off (not always)
from this points i tend to believe it's related to proximity sensor but tried checking it's working via some apps and they shows it's working perfectly.
even tried resting proximity data via EFS backup still no luck.
if you know something about this issue kindly help
Thanks in advance
Click to expand...
Click to collapse
@devs Kindly check logs in attachment and help me in finding exact culprit for this problem (with possible solution )
this type of entries are present all over the logs (i don't know if it's relevant to this issue or not)
Code:
07-31 00:19:30.312 I/WindowManager( 752): Screen frozen for +223ms due to Window{1c3e4be u0 NavigationBar}
07-31 00:19:31.630 I/ActivityManager( 752): Waited long enough for: ServiceRecord{834a3ca u0 com.whatsapp/.messaging.MessageService}
07-31 00:21:19.461 I/PowerManagerService( 752): Going to sleep due to power button (uid 1000)...
07-31 00:21:20.088 I/DisplayManagerService( 752): Display device changed state: "Built-in Screen", OFF
07-31 00:21:20.363 I/PowerManagerService( 752): Sleeping (uid 1000)...
07-31 00:21:20.493 I/ActivityManager( 752): Config changes=480 {1.0 404mcc57mnc en_IN ldltr sw360dp w360dp h576dp 480dpi nrml port finger -keyb/v/h -nav/h as.1 s.9}
07-31 00:21:20.573 I/PowerManagerService( 752): Waking up from sleep (uid 1000)...
07-31 00:21:20.589 I/DisplayPowerController( 752): Blocking screen on until initial contents have been drawn.
07-31 00:21:20.668 I/DisplayManagerService( 752): Display device changed state: "Built-in Screen", ON
07-31 00:21:20.865 D/PowerManagerService( 752): acquireWakeLock: ignoring request from com.android.nfc
07-31 00:21:21.021 D/PowerManagerService( 752): acquireWakeLock: ignoring request from com.android.nfc
07-31 00:21:21.050 I/DisplayPowerController( 752): Unblocked screen on after 461 ms
07-31 00:21:22.239 I/PowerManagerService( 752): Going to sleep due to power button (uid 1000)...
07-31 00:21:22.826 I/DisplayManagerService( 752): Display device changed state: "Built-in Screen", OFF
07-31 00:21:23.101 I/PowerManagerService( 752): Sleeping (uid 1000)...
07-31 00:21:23.133 D/PowerManagerService( 752): acquireWakeLock: ignoring request from com.android.nfc
07-31 00:21:34.403 I/PowerManagerService( 752): Waking up from sleep (uid 1000)...
07-31 00:21:34.464 I/DisplayPowerController( 752): Blocking screen on until initial contents have been drawn.
07-31 00:21:34.491 D/PowerManagerService( 752): acquireWakeLock: ignoring request from com.android.nfc
07-31 00:21:34.548 I/DisplayManagerService( 752): Display device changed state: "Built-in Screen", ON
07-31 00:21:34.624 I/DisplayPowerController( 752): Unblocked screen on after 160 ms
@marcomarinho i know you are busy with PA but if you get some time please check this and let me know what you find
i have this issue before when I'm watching youtube vids specially when the phone is in landscape mode, happens also 1 time when i was playing.
Edit: The lcd of my device has already been replaced.
Any input from logs ?
@osm0sis if you get some please take a look at logs and let me know if you find cause of issue in OP.
Thanks in advance
Turning OFF "adaptive (auto) brightness" seems to fix the problem.. atleast for now. Not a ideal solution but still..
So i guess issue is related to light sensor.
Hi,
I updated recently to 9.02.
Unfortunately i have some problems wie Pie versions (before i already tested 9.0, but went back to 8.x due to the same probs)
I used Nova Launcher.
I use the "Swipe up" gesture to lock my phone.
The Screen lock method was set to "root". (with "device admin", unlocking with Fingerprint is not possible)
I also use Alarmdroid.
When i set an alarm, and lock my OPO6 with a swipe up, the alarm is never activated. The phone was nearly unusable, like a program took 100%CPU. (Probably Nova and/or Alarmdroid).
This combination worked on every previous Android versions.
Second Problem is that Android Auto always stops with a message:
"Something went wrong - Google play services doesn't seem to be working right now".
Third Problem: My Luxspeed application does not start anymore (worked fine with 8.x versions)
Code:
D/ActivityManager( 910): # addPackageDependency # packageName=com.google.android.gms -> proc: ProcessRecord{f932016 11289:com.pitschneider.luxspeed/u0a254}
D/ActivityManager( 910): # addPackageDependency # packageName=com.android.chrome -> proc: ProcessRecord{f932016 11289:com.pitschneider.luxspeed/u0a254}
D/ActivityManager( 910): # addPackageDependency # packageName=com.android.chrome -> proc: ProcessRecord{f932016 11289:com.pitschneider.luxspeed/u0a254}
I/ActivityManager( 910): Start proc 11359:com.android.chrome:sandboxed_process0/u0i6 for webview_service com.pitschneider.luxspeed/org.chromium.content.app.SandboxedProcessService0
I/ActivityManager( 910): Start proc 11379:com.android.chrome:sandboxed_process0/u0i7 for webview_service com.pitschneider.luxspeed/org.chromium.content.app.SandboxedProcessService0
E/OnePlusSmartBoostManager( 910): cmd: iop_start 11289 com.pitschneider.luxspeed /data/app/com.pitschneider.luxspeed-WQJscZhKGHMabc9A86_l8w== false length = 108
D/RestartProcessManager( 910): Duration is too short, ignore : 853 in com.pitschneider.luxspeed
E/AndroidRuntime(11289): Process: com.pitschneider.luxspeed, PID: 11289
I/WindowManager( 910): WIN DEATH: Window{a5dcfe3 u0 com.pitschneider.luxspeed/com.pitschneider.luxspeed.MainActivity}
I/ActivityManager( 910): Process com.pitschneider.luxspeed (pid 11289) has died: vis TOP
W/ActivityManager( 910): Force removing ActivityRecord{930dcfd u0 com.pitschneider.luxspeed/.MainActivity t701}: app died, no saved state
I/ActivityManager( 910): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.pitschneider.luxspeed/.MainActivity bnds=[642,167][845,495]} from uid 10060 pid 3614
E/OnePlusSmartBoostManager( 910): cmd: iop_start -1 com.pitschneider.luxspeed /data/app/com.pitschneider.luxspeed-WQJscZhKGHMabc9A86_l8w== false length = 105
D/RestartProcessManager( 910): updateSelf : com.pitschneider.luxspeed, size : 5
I/ActivityManager( 910): Start proc 11596:com.pitschneider.luxspeed/u0a254 for activity com.pitschneider.luxspeed/.MainActivity
D/OnePlusSmartBoostManager( 910): writeHotCount com.pitschneider.luxspeed, pid=11596
Anyone had similar errors/problems?
Thanks
Nop.
I use Nova (old beta version) but i nver use gestures...
Alarm works as suposed...
The only problem i have is double tap sometimes doesnt work, and rotation also freezes....
first things first. open up settings battery battery optimization 3 dot menu advanced optimization. turn off advanced optimization. then go back 1 menu, and set what ever app you need to not optimize so android (i mean oos) does not kill said app. give that a try.
Advanced Optimization was already disabled.
Also Alarmdroid was set to not optimized.
I changed the other problem apps to not optimize.