Search in sources :

Example 6 with WaitResult

use of android.app.IActivityManager.WaitResult in project android_frameworks_base by ResurrectionRemix.

the class ActivityStackSupervisor method reportActivityLaunchedLocked.

void reportActivityLaunchedLocked(boolean timeout, ActivityRecord r, long thisTime, long totalTime) {
    boolean changed = false;
    for (int i = mWaitingActivityLaunched.size() - 1; i >= 0; i--) {
        WaitResult w = mWaitingActivityLaunched.remove(i);
        if (w.who == null) {
            changed = true;
            w.timeout = timeout;
            if (r != null) {
                w.who = new ComponentName(r.info.packageName, r.info.name);
            }
            w.thisTime = thisTime;
            w.totalTime = totalTime;
        // Do not modify w.result.
        }
    }
    if (changed) {
        mService.notifyAll();
    }
}
Also used : WaitResult(android.app.IActivityManager.WaitResult) ComponentName(android.content.ComponentName)

Example 7 with WaitResult

use of android.app.IActivityManager.WaitResult in project android_frameworks_base by ResurrectionRemix.

the class ActivityStackSupervisor method sendWaitingVisibleReportLocked.

void sendWaitingVisibleReportLocked(ActivityRecord r) {
    boolean changed = false;
    for (int i = mWaitingActivityVisible.size() - 1; i >= 0; i--) {
        WaitResult w = mWaitingActivityVisible.get(i);
        if (w.who == null) {
            changed = true;
            w.timeout = false;
            if (r != null) {
                w.who = new ComponentName(r.info.packageName, r.info.name);
            }
            w.totalTime = SystemClock.uptimeMillis() - w.thisTime;
            w.thisTime = w.totalTime;
        }
    }
    if (changed) {
        mService.notifyAll();
    }
}
Also used : WaitResult(android.app.IActivityManager.WaitResult) ComponentName(android.content.ComponentName)

Example 8 with WaitResult

use of android.app.IActivityManager.WaitResult in project android_frameworks_base by DirtyUnicorns.

the class ActivityStackSupervisor method sendWaitingVisibleReportLocked.

void sendWaitingVisibleReportLocked(ActivityRecord r) {
    boolean changed = false;
    for (int i = mWaitingActivityVisible.size() - 1; i >= 0; i--) {
        WaitResult w = mWaitingActivityVisible.get(i);
        if (w.who == null) {
            changed = true;
            w.timeout = false;
            if (r != null) {
                w.who = new ComponentName(r.info.packageName, r.info.name);
            }
            w.totalTime = SystemClock.uptimeMillis() - w.thisTime;
            w.thisTime = w.totalTime;
        }
    }
    if (changed) {
        mService.notifyAll();
    }
}
Also used : WaitResult(android.app.IActivityManager.WaitResult) ComponentName(android.content.ComponentName)

Example 9 with WaitResult

use of android.app.IActivityManager.WaitResult in project android_frameworks_base by DirtyUnicorns.

the class ActivityStackSupervisor method reportActivityLaunchedLocked.

void reportActivityLaunchedLocked(boolean timeout, ActivityRecord r, long thisTime, long totalTime) {
    boolean changed = false;
    for (int i = mWaitingActivityLaunched.size() - 1; i >= 0; i--) {
        WaitResult w = mWaitingActivityLaunched.remove(i);
        if (w.who == null) {
            changed = true;
            w.timeout = timeout;
            if (r != null) {
                w.who = new ComponentName(r.info.packageName, r.info.name);
            }
            w.thisTime = thisTime;
            w.totalTime = totalTime;
        // Do not modify w.result.
        }
    }
    if (changed) {
        mService.notifyAll();
    }
}
Also used : WaitResult(android.app.IActivityManager.WaitResult) ComponentName(android.content.ComponentName)

Example 10 with WaitResult

use of android.app.IActivityManager.WaitResult in project android_frameworks_base by AOSPA.

the class ActivityStackSupervisor method reportTaskToFrontNoLaunch.

void reportTaskToFrontNoLaunch(ActivityRecord r) {
    boolean changed = false;
    for (int i = mWaitingActivityLaunched.size() - 1; i >= 0; i--) {
        WaitResult w = mWaitingActivityLaunched.remove(i);
        if (w.who == null) {
            changed = true;
            // Set result to START_TASK_TO_FRONT so that startActivityMayWait() knows that
            // the starting activity ends up moving another activity to front, and it should
            // wait for this new activity to become visible instead.
            // Do not modify other fields.
            w.result = START_TASK_TO_FRONT;
        }
    }
    if (changed) {
        mService.notifyAll();
    }
}
Also used : WaitResult(android.app.IActivityManager.WaitResult)

Aggregations

WaitResult (android.app.IActivityManager.WaitResult)21 ComponentName (android.content.ComponentName)14 Intent (android.content.Intent)1 RemoteException (android.os.RemoteException)1 UserHandle (android.os.UserHandle)1