yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] GermainZ:
I didn't check those links because the class names didn't feel relevant to this module.

If you didn't post in the wrong thread, perhaps you'd care to clarify your question/the point you're trying to make, and how it is related to this module, because I really don't know what it is that you're trying to say.

Thanks ;)
[Xposed Framework Modules] jumoog:
ok np i just want you know that normal Timeout is (0,5 seconds) for keys

private static final int GLOBAL_ACTIONS_KEY_TIMEOUT = 500;

and the problem caused by keyguard ;)

and i dont have this issue on all my devices
[Xposed Framework Modules] GermainZ:
That's for another thing, if you check the source code of ActivityManagerService, you'll see this:

...
// Amount of time after a call to stopAppSwitches() during which we will
// prevent further untrusted switches from happening.
static final long [COLOR="DeepSkyBlue"]APP_SWITCH_DELAY_TIME[/COLOR] = 5*1000;
...

/**
* The time at which we will allow normal application switches again,
* after a call to {@link #stopAppSwitches()}.
*/
long mAppSwitchesAllowedTime;
...

public void [COLOR="Red"]stopAppSwitches()[/COLOR] {
if (checkCallingPermission(android.Manifest.permission.STOP_APP_SWITCHES)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.STOP_APP_SWITCHES);
}

synchronized(this) {
mAppSwitchesAllowedTime = SystemClock.uptimeMillis()
+ [COLOR="DeepSkyBlue"]APP_SWITCH_DELAY_TIME[/COLOR];
mDidAppSwitch = false;
mHandler.removeMessages(DO_PENDING_ACTIVITY_LAUNCHES_MSG);
Message msg = mHandler.obtainMessage(DO_PENDING_ACTIVITY_LAUNCHES_MSG);
mHandler.sendMessageDelayed(msg, APP_SWITCH_DELAY_TIME);
}
}
...

This module makes the stopAppSwitches method do nothing (the source code is available and very simple.)

This method is (mainly) called from com.android.internal.policy.impl.MidWindowManager:

...

/**
* A home key -> launch home action was detected. Take the appropriate action
* given the situation with the keyguard.
*/
private void launchHomeFromHotKey() {
// no keyguard stuff to worry about, just launch home!
try {
ActivityManagerNative.getDefault()[COLOR="Red"].stopAppSwitches()[/COLOR];
} catch (RemoteException e) {
}
mContext.startActivity(mHomeIntent);
sendCloseSystemWindows();
}
...

/**
* goes to the home screen
* @return whether it did anything
*/
boolean goHome() {
if (false) {
// This code always brings home to the front.
try {
ActivityManagerNative.getDefault().[COLOR="Red"]stopAppSwitches()[/COLOR];
} catch (RemoteException e) {
}
mContext.startActivity(mHomeIntent);
} else {
// This code brings home to the front or, if it is already
// at the front, puts the device to sleep.
try {
ActivityManagerNative.getDefault().stopAppSwitches();
int result = ActivityManagerNative.getDefault()
.startActivity(null, mHomeIntent,
mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),
null, 0, null, null, 0, true /* onlyIfNeeded*/, false);
if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
return false;
}
} catch (RemoteException ex) {
// bummer, the activity manager, which is in this process, is dead
}
}
sendCloseSystemWindows();
return true;
}

You can check those (and more) yourself if you want to.

As for not having this problem on your device, check the third post for an explanation, you most likely haven't encountered it.
[Xposed Framework Modules] horselamacow:
Excellent mod, I thought it was a limitation in the OS or the app I was using (sidebar pro if anyone's interested)

This mod took away one annoyance I had on my Nexus 5, loving this phone now. Thanks

Skickat från min Nexus 5 via Tapatalk
[Xposed Framework Modules] djsky2011:
Works great thanks
[Xposed Framework Modules] paradonym:
Is that delay only in Vanilla android? Hadn't recognized a delay in that behaviour on my LG G2...
[Xposed Framework Modules] GermainZ:
No.

See third post.
[Xposed Framework Modules] Amit_timA:
Works great, thanks for this awesome feature GermainZ
[Xposed Framework Modules] rzr86:
great module:good:

i will test it to my sensation

i have noticed some delays after pressing home button when exit from an app
[Xposed Framework Modules] Thomas_BA:
Working great. No delay anymore after home button and opening an app with SwipePad.

Thanks!!
[Xposed Framework Modules] RadarNyan:
Sorry wrong post, I didn't test enough. (see following posts)
[Xposed Framework Modules] GermainZ:
I can't see how that's possible.
[Xposed Framework Modules] RadarNyan:
Sorry, my fault. I'm using this module together with switchr and enabled kill app with root somehow… That's why I can't reopen the closed app from recent apps view :( Once again, excuse me. I'll go ask Switchr developer.

This module works pretty nice by the way :) Now I can really use my favorite secondary launchers (Glovebox, Switchr) without the annoying delay.
[Xposed Framework Modules] Jsilver73:
AWESOME

I didn't even realise that the 5 sec delay was not a bug but rather some relic android code from times when we had wind up clockwork devices lol!

I use 'swipe starter' and 'overlay launcher' and it has been a major annoyance in an otherwise perfect system that I run that if I come back home I must wait before my swipe gestures work.

Thank you for this - I have just switched back to dalvik from ART just for this module and am very pleased with the results first look. Thanks :D
[Xposed Framework Modules] Mechayoshi:
I can't install this at all.
[Xposed Framework Modules] GermainZ:
Check your logcat or install via ADB/a terminal emulator to see why it's failing. GIYF.
[Xposed Framework Modules] Mechayoshi:
I'm not getting an error. I literally can't press the install button. So strange.
[Xposed Framework Modules] GermainZ:
Disable your screen filter/overlay apps.
[Xposed Framework Modules] Mechayoshi:
Thanks. It was Unicon or whatever messing up my phone.
[Xposed Framework Modules] luisblop:
Bug: Conflict with Patter/PIN systems

I have a rooted Samsung Galaxy S Advance with Jelly Bean 4.1.2

I tried your module as complement to the Cover Lockscreen (www.coverscreen.com). It seems working pretty well avoiding the delay when I wake up my device with [HOME] and immediately I launch an app with Cover.

However I discovered that if an Android's Pattern or PIN security system is set, then StopSwitchDelay may have a conflict because it doesn't work all the times and Cover quits when I press twice [HOME].

Could you check this please?

I'm using the last version 1.1

Thanks in advance
[Xposed Framework Modules] GermainZ:
Does this not happen if you disable the module and reboot? Looks like normal behavior as apps (including lockscreen replacements) can't handle the home button without being a launcher.

Anyway, if the problem doesn't happen when this module is disabled, I'm going to need detailed steps to reproduce this it.
[Xposed Framework Modules] luisblop:
I tried with the module disabled. It seems that Cover (the lockscreen replacement) doesn't quit with double [HOME] pressing (only 1 over 10).

WIth the module enabled, Cover quits systematically when I do the double pressing. (9 times over 10).

I repeat this issue only happens when the Pattern or PIN securities are enabled.

Please don't hesitate in asking me other details.

NB. I'm using a stock ROM with Touchwiz
[Xposed Framework Modules] GermainZ:
Here's what I see:

Enable pattern lock -> lock the screen -> turn screen on -> Cover shows up -> press home -> pattern lock immediately shows up.

This happens regardless of the module. I consider this the expected behavior.

Is this not what happens for you?
[Xposed Framework Modules] luisblop:
In my case I have set a pattern lock with a 5 minutes screen off time-out. So the pattern is enabled but not still active.
[Xposed Framework Modules] GermainZ:
If I do that then pressing the home button will always exit Cover within those 5 minutes (with the module enabled or disabled.) Looking at the Android code, this is expected, so I don't understand why the home button doesn't exit Cover for you, and I can't see how StopSwitchDelay could be affecting that anyway…
[Xposed Framework Modules] luisblop:
I've always used Cover with a timeout pattern security because it was developed to support that feature http://blog.coverscreen.com/post/66969987760/faq-how-cover-works-with-your-security-code

In fact I hadn't encountered any problem with [HOME] before till I started using StopSwitchDelay. That's why I'm sure there's a conflict somehow.

I really like your module and it works fine with Cover when there's no security lock set. Probably at the end I have to accept the issue and simply avoid pressing [HOME] twice when I wake up my phone.

Thanks for the feedback
[Xposed Framework Modules] luisblop:
...... post moved
[Xposed Framework Modules] pitastrudl:
ask here http://xdaforums.com/showthread.php?t=2327541, this module doesnt have anything to do with your problem since its for 4.4 roms only

Sent from my GT-I9505
[Xposed Framework Modules] luisblop:
I got it solved. The solution is posted in that discussion.

http://xdaforums.com/showpost.php?p=52186790&postcount=5663

So I erased the previous posted. Sorry for my wrong-posting
[Xposed Framework Modules] equlizer:
I can't believe i didnt start using this sooner!
[Xposed Framework Modules] t86dan:
I just installed this mod but doesnt work all the time.... I am currently on 4.4.3... should it be working flawlessly? Not sure what i did wrong.. sometimes it works but not all the time. The app I'm using for opening activities from is Cover Lockscreen... the slidebar from the right

Anyone have it? Is it working with it?

THanks
[Xposed Framework Modules] GermainZ:
Can you reproduce this?
[Xposed Framework Modules] gnarlsagan:
Great app. Works perfectly for Nova Google Now voice activation. There is one bug however in 4.4.3 stock. My wallpaper resets from Muzei to the default Android wallpaper after reboot when this module is installed. I can reproduce the problem as well. When I uninstall this module, Muzei stays as my wallpaper after reboot. Kind of odd, but as I said the problem goes away after uninstalling this module. If I reinstall the module, set my wallpaper to Muzei and reboot, my wallpaper is the Android default again.
[Xposed Framework Modules] RyconPayne:
....this explains so much, I didn't even know this 5 second delay existed. I guess I just thought it was my phone freezing up a bit after closing an app. Well, thanks for fixing this annoyance.
[Xposed Framework Modules] Sam7777777:
Do I need this on touch wiz?
[Xposed Framework Modules] Jsilver73:
[MENTION=4775688]GermainZ[/MENTION], I'm a big fan of your work. I've just had to drop xposed and this is the one module that I installed the framework for. I'm now running ART to see if it makes a difference with the freezes I've been experiencing on AOSP.

I'm just wondering how difficult/easy it would be to implement this code within the ROM without xposed, is it possible?

I know in my miui 4.4.2 cm based ROM the delay is not there so I'm guessing it is possible, are there commits that can be merged whilst compiling the ROM?
[Xposed Framework Modules] _jis_:
Sure, because the delay is built in AOSP base, not in TouchWiz interface.
[Xposed Framework Modules] Sam7777777:
Alright, thanks for the info
[Xposed Framework Modules] kantjer:
Would changing:

APP_SWITCH_DELAY_TIME = 5*1000

The the ROM source to

APP_SWITCH_DELAY_TIME

Accomplish the same thing ?
[Xposed Framework Modules] GermainZ:
If you like crashes, sure. :p You probably want `APP_SWITCH_DELAY_TIME = 0` instead.
[Xposed Framework Modules] kantjer:
Oops typo

thanks
[Xposed Framework Modules] takota6:
Was this in build prop?

Æaaa..\../
[Xposed Framework Modules] kantjer:
No in the ROM's source, it need to be compiled with the change.
[Xposed Framework Modules] boywithabeard:
Germainz, I absolutely must have this function on Lollipop! It's I one of my cherished modules from xposed.(thanks) Would you be able to post how to implement this manually in 5.02? I see the code posted in your OP descriptions. Are the ActivityManagerService edits all that is required? Could you tell me the path of the files that require edits? Seeing as Xposed is struggling with Lollipop, I thought I would start learning to make the mods myself, that I am missing from KitKat. I know you are a busy guy, any help will be appreciated.
[Xposed Framework Modules] GermainZ:
You can implement it directly if you're building a custom ROM. See a few posts above for what to change if you want to do that (it only requires one minor change if you're modifying the source directly).
[Xposed Framework Modules] zellleonhart:
Hi [MENTION=4775688]GermainZ[/MENTION], as xposed is finally released for lollipop, and this module apparently doesn't work on lollipop yet. Will you release any update?

Thanks :)
[Xposed Framework Modules] Ronii10:
Thank you for this wonderful module! So simple yet so powerful!

It made my phone much faster
[Xposed Framework Modules] F308:
Not sure if I understand fuctionality correctly.

I have Xperia Z1C, ROM is KK stock, odexed.

When I call someone then I end call - there still is some seconds delay before dialer disappears.

Is such behavior beyond scope of this module?
[Xposed Framework Modules] GermainZ:
Indeed, removing that delay isn't the goal of this module.
[Xposed Framework Modules] kartiksood1:
Hi Germain.. this is one of the best modules i have ever used and infact have won many brownie points from whoever i have recommended it to..

i would like to know if you are thinking to add lollipop support in future...

we all really appreciate ur work.. thanks again
[Xposed Framework Modules] GermainZ:
Shoot me a PM this weekend as a reminder, please. It should be a very easy fix if I remember to do it.
[Xposed Framework Modules] kartiksood1:
wowww... will do bro!
[Xposed Framework Modules] kartiksood1:
sent u a pm
[Xposed Framework Modules] GermainZ:
Please test this version and let me know if it works on Lollipop (5.0, since the unofficial Xposed for 5.1 is still quite buggy). Thanks :)

https://ptpb.pw/AJvW98_SlGtLQby066tjXeApwRsZ.apk
[Xposed Framework Modules] kartiksood1:
working wonderfully(xperia z3 dual sim, lollipop 5.0).. testing still going on, will keep u updated on observations.. thanks once again.
[Xposed Framework Modules] rgshah3:
I can confirm this works perfect on 5.0.2 CM12!

Can be released as an update in the xposed repo
[Xposed Framework Modules] wilflare:
! I thought we wouldn't need this on Lollipop (that it would be fixed) but guess not... haha
[Xposed Framework Modules] mannequin:
i don't have this delay on stock LP, LG G2.
[Xposed Framework Modules] _jis_:
Maybe you just don't get what kind of delay is discussed here.

Did you read the explanation?

Are you using some launcher panel overlay application like SwipePad for example?

If not then you cannot encounter the issue and then you don't need this module.

If you want to test it for yourself I recommend you to try SwipePad and then start any app from SwipePad's portal immediately after pressing/touching home button... It doesn't matter if you have physical home button or virtual one on the screen. Then you will see the toast SwipPad starting <your app> and you should experience mentioned delay.
[Xposed Framework Modules] kartiksood1:
exactly...
[Xposed Framework Modules] mannequin:
what are you guys talking about? :) i was just reporting that the delay is gone on LP (on my LG phone that is). no need for hadron collider blueprints here :)
[Xposed Framework Modules] kartiksood1:
good for u.. but honestly, could not figure out from what you wrote
[Xposed Framework Modules] AreWePhrasing?:
Do you recommend this mod for 5.1? I don't mind testing it out, but wanted your opinion beforehand. Cannot stand this delay and cannot believe they haven't addressed it yet. Thanks in advance.
[Xposed Framework Modules] shadders:
Only just discovered this. Am running lollipop, so will give the linked test version for LP a try. Thanks GermainZ
[Xposed Framework Modules] mikeck:
Working for me on a Moto X (2013, 1st generation) stock Lollipop 5.1.

Thanks GermainZ
[Xposed Framework Modules] empy92:
do this works only with root?

if not, how can i use in my application?:D
[Xposed Framework Modules] GermainZ:
You can't use it in your application, sorry. Root/a custom ROM is required.
[Xposed Framework Modules] empy92:
mmm...I read all discussion, I see 'Cover' ,a lockscreen app, that used it...how?
[Xposed Framework Modules] GermainZ:
I don't think it used it? This module fixes the delay that occurs after you press the home button to go home, not to wake your device up -- I don't see why a lockscreen app would need it.
[Xposed Framework Modules] empy92:
a ok...thanks for your answer...I need it because I have a reciver to get screen off state...but start activity from receiver have this delay (if I press home button:rolleyes:)
[Xposed Framework Modules] DarkionAvey:
Any chance that you update the app on Xposed website? I've tried the APK you provided for Lollipop and it works great on 5.1

Thanks a lot for the fix
[Xposed Framework Modules] GermainZ:
Sure. I forgot about that but I'll do it next week, can't before then.
[Xposed Framework Modules] milojoseph:
If you can all of ur xposed mods

Sent from my SM-G900T powered by AllianceROM

and boosted by speedy kernel

Lollipop ?
[Xposed Framework Modules] zuluuk:
Confirmed to be working device seems a lot more responsive. This is still not published on xposed not sure why 1.1 is listed and the one in here is 1.2
[Xposed Framework Modules] GermainZ:
Crap, I keep forgetting. This weekend!

Edit: done ❤
[Xposed Framework Modules] goofwear:
I am on cm 12.1 and I don't think this is working any more. I have been using this for a couple years with out any problems and i can swear its not working now.
[Xposed Framework Modules] nickthaskater:
Any hope of resurrecting this module for Nougat+?

Running edge gestures in place of nav buttons and the issue arises when trying to launch Google Assistant from a gesture. It'd be perfect to have the time limit removed.
[Xposed Framework Modules] GermainZ:
I just tested it on Oreo and it works. No reason for it not to work on Nougat either.

Can you please provide:

1. Xposed logs to see if the module is crashing?

2. Detailed instructions to reproduce your problem, so that I can test it myself?

Thanks :)
[Xposed Framework Modules] madscribblerz:
Hey op, just wanted to give a shout out. Running this on oreo 8.1 June release with magisk sdk 27 and was being driven crazy by this delay. Your module fixes it completely. You rock!
[Xposed Framework Modules] bendev.xda:
Is there any way to disable 5s delay without install xposed ?

os : android oreo 8.1
[Xposed Framework Modules] quetz666:
Is there a way to use it without Exposed? Can someone post a method here? Exposed disable banking apps which I can normally use with Magisk hide.
[Xposed Framework Modules] GermainZ:
Nope.
[Xposed Framework Modules] The Analog Kid:
Alright, it's tested on Oreo; however, even though there is a delay, it is positively not a five second delay here; It's between two or three seconds at most (whoa, nonroot Vanced shows immediately!) Should we have to change the values, or are we ready to go with module as is??
[Xposed Framework Modules] Chocolatetrain:
Is there a Magisk Module alternative to this? I really don't like having to use Edxposed just for this tweak, Edxposed causes random reboots on my S10+ and for a lot of others using the same device
[Xposed Framework Modules] OzturkAlperen:
Android 10

It doesn't work with Android 10. Any update soon?
[Xposed Framework Modules] P650SE:
Module works perfect on Android 9 Pie with LSPosed Zygisk. Just select the checkbox that says "System Framework" when you enable it in the LSPosed app.

It doesn't work in Android 10 and above.
[T-Mobile, Samsung Galaxy SIII] tokenpoke:
Why is anyone worried about resetting the flash counter that goes up each time we use Odin?

Other than maybe trying to get a replacement on warranty?
[T-Mobile, Samsung Galaxy SIII] Perseus:
Its for Warranty.
[T-Mobile, Samsung Galaxy SIII] afwolfpacked:
Besides warranty if counter advances the ota pushed by service provider on phone wont install. Reads as custom on phone.
[One (M7) Q&A, Help & Troubleshooting] LibertyMarine:
Hey, can someone tell me if this (QHSUSB_DLOAD = Qalcomm HighSpeed USB Download Mode) is preventable ?

I mean quite some people are having this problem;

1) Can we do something to prevent that from happening?

2) Does anybody know the reason for such failure?

3) Has anyone had experience with a repair center, can they turn it on and find out your device was rooted?
[One (M7) Q&A, Help & Troubleshooting] Prophet16:
I think it's an issue with the motherboard. There's not much anyone can do about that. But QHSUSB_DLOAD means that it's in a special download more, similar to iPhone's DFU mode. So I don't know if it means that it can be recovered, but it seems that it's made for diagnostic purposes, because the whole point of this mode is to figure out what went wrong with the device.
[One (M7) Q&A, Help & Troubleshooting] syaoran68:
that DLOAD only happens if you royally F-up the base firmware on the phone. not the rom mind you but its basically like the BIOS of the phone. when you get the QLOAD your pretty much SOL and have to send the phone back.
[G2 Accessories] Redneck101:
I currently have a body glove case and a screen protector. I'm wanting a case with the protection of the otter box defender but with a similar feel to what i have now as it's not very bulky at all. I have a at&t phone. http://www.newegg.com/Product/Product.aspx?Item=9SIA08919W5928&nm_mc=KNC-GoogleMKP&cm_mmc=KNC-GoogleMKP-_-pla-_-All+Cases+%26+Covers-_-9SIA08919W5928&ef_id=UyJb4wAABDAM6nfE:20140320220013:s oh yeah, the screen protectors i have aren't wide enough for the screen, they miss just a little bit of it on one side.
[G2 Accessories] philobolus:
I know you like more protection for your phone but I've been super happy with a poetic slim case with no screen protector. There is a slight barely noticeable edge around the front so no problem laying case face-down on tables.

Poetic-Palette-Case-Black-Only (search amazon)

For a more protective case:

SPIGEN-Protective-Sprint-T-Mobile-International (search amazon)

About screen protectors: I used to use them on every phone but these days the glass material used is very hard to scratch and I think the protectors are redundant. But my phone is in my pocket mostly and I have only dropped a phone rarely. YMMV.
[G2 Accessories] Jooosty:
I have a commuter. Pretty awesome protection while not adding too much bulk.

Sent from the LG G2
[G2 Accessories] ingoljosh:
Are you kidding??? This is the uggliest case ever made for the G2 IMO.

If you want the protection of the otterBox without the bulk just go with the COMMUTER case by OTTERBOX
[G2 Accessories] jassu:
Use a TPU Silicon Case,i think this is the best for Every Phone.
[G2 Accessories] shiftnd:
Tudia-clear skin-Poetic

I was using the relatively slim Tudia case since the first day i got the G2. After a few months, even that case was too bulky for me. So I took the case off and tried IQ Shield's full body clear protective skin. It works great against scratches but I decided to go back to a case after i dropped it on some tiles and dented the plastic corner a bit. I will try the even slimmer Poetic now.