Search in sources :

Example 16 with WaitResult

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

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 17 with WaitResult

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

the class ActivityStack method reportActivityLaunchedLocked.

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

Example 18 with WaitResult

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

the class ActivityStack method reportActivityVisibleLocked.

void reportActivityVisibleLocked(ActivityRecord r) {
    for (int i = mWaitingActivityVisible.size() - 1; i >= 0; i--) {
        WaitResult w = mWaitingActivityVisible.get(i);
        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;
    }
    mService.notifyAll();
    if (mDismissKeyguardOnNextActivity) {
        mDismissKeyguardOnNextActivity = false;
        mService.mWindowManager.dismissKeyguard();
    }
}
Also used : WaitResult(android.app.IActivityManager.WaitResult) ComponentName(android.content.ComponentName)

Example 19 with WaitResult

use of android.app.IActivityManager.WaitResult in project platform_frameworks_base by android.

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 20 with WaitResult

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

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