QList<QString> runningUnlocked;
while(!exit) {
//Get a list of all the running apps on the phone
QList<QString> runningApps = GetRunningApps();
//Loop through them and find out if they are locked, and if they have been unlocked by the person unlocking the phone
for(int i = 0; i < runningApps.length(); i++) {
if(IsLockedApp(runningApps[i]) && !runningUnlocked.contains(runningApps[i])) {
LockPhone();
WaitForUnlock(); //We don't want to keep calling the lock function while the phone is locked, so wait for it to unlock
runningUnlocked << runningApps[i]; //Add the app to the list of unlocked ones (temporary)
continue;
}
//Remove any of the apps that were running unlocked but have been closed
for(int i = 0; i < runningUnlocked.length(); i++) {
if(!runningApps.contains(runningUnlocked[i]))
runningUnlocked.removeAt(i);
}
}
sleep(5);
}
| The Following 2 Users Say Thank You to SPARTAN563 For This Useful Post: | ||
| The Following User Says Thank You to SPARTAN563 For This Useful Post: | ||
QList<QString> runningUnlocked;
while(!exit) {
//Get a list of all the running apps on the phone
QList<QString> runningApps = GetRunningApps();
//Loop through them and find out if they are locked, and if they have been unlocked by the person unlocking the phone
for(int i = 0; i < runningApps.length(); i++) {
if(IsLockedApp(runningApps[i]) && !runningUnlocked.contains(runningApps[i])) {
LockPhone();
WaitForUnlock(); //We don't want to keep calling the lock function while the phone is locked, so wait for it to unlock
runningUnlocked << runningApps[i]; //Add the app to the list of unlocked ones (temporary)
continue;
}
//Remove any of the apps that were running unlocked but have been closed
for(int i = 0; i < runningUnlocked.length(); i++) {
if(!runningApps.contains(runningUnlocked[i]))
runningUnlocked.removeAt(i);
}
}
sleep(5);
}

| The Following User Says Thank You to SPARTAN563 For This Useful Post: | ||
| The Following User Says Thank You to SPARTAN563 For This Useful Post: | ||