Java Code Examples for org.chromium.base.ApplicationState#HAS_DESTROYED_ACTIVITIES

The following examples show how to use org.chromium.base.ApplicationState#HAS_DESTROYED_ACTIVITIES . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChromeApplication.java    From delion with Apache License 2.0 5 votes vote down vote up
private ApplicationStateListener createApplicationStateListener() {
    return new ApplicationStateListener() {
        @Override
        public void onApplicationStateChange(int newState) {
            if (newState == ApplicationState.HAS_STOPPED_ACTIVITIES) {
                onForegroundSessionEnd();
            } else if (newState == ApplicationState.HAS_DESTROYED_ACTIVITIES) {
                onForegroundActivityDestroyed();
            }
        }
    };
}
 
Example 2
Source File: DefaultMediaRouteController.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public void onApplicationStateChange(int newState) {
    switch (newState) {
        // HAS_DESTROYED_ACTIVITIES means all Chrome activities have been destroyed.
        case ApplicationState.HAS_DESTROYED_ACTIVITIES:
            onActivitiesDestroyed();
            break;
        default:
            break;
    }
}
 
Example 3
Source File: ChromeActivitySessionTracker.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
private ApplicationStateListener createApplicationStateListener() {
    return new ApplicationStateListener() {
        @Override
        public void onApplicationStateChange(int newState) {
            if (newState == ApplicationState.HAS_STOPPED_ACTIVITIES) {
                onForegroundSessionEnd();
            } else if (newState == ApplicationState.HAS_DESTROYED_ACTIVITIES) {
                onForegroundActivityDestroyed();
            }
        }
    };
}
 
Example 4
Source File: DefaultMediaRouteController.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public void onApplicationStateChange(int newState) {
    switch (newState) {
        // HAS_DESTROYED_ACTIVITIES means all Chrome activities have been destroyed.
        case ApplicationState.HAS_DESTROYED_ACTIVITIES:
            onActivitiesDestroyed();
            break;
        default:
            break;
    }
}
 
Example 5
Source File: ChromeActivitySessionTracker.java    From 365browser with Apache License 2.0 5 votes vote down vote up
private ApplicationStateListener createApplicationStateListener() {
    return new ApplicationStateListener() {
        @Override
        public void onApplicationStateChange(int newState) {
            if (newState == ApplicationState.HAS_STOPPED_ACTIVITIES) {
                onForegroundSessionEnd();
            } else if (newState == ApplicationState.HAS_DESTROYED_ACTIVITIES) {
                onForegroundActivityDestroyed();
            }
        }
    };
}
 
Example 6
Source File: DefaultMediaRouteController.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void onApplicationStateChange(int newState) {
    switch (newState) {
        // HAS_DESTROYED_ACTIVITIES means all Chrome activities have been destroyed.
        case ApplicationState.HAS_DESTROYED_ACTIVITIES:
            onActivitiesDestroyed();
            break;
        default:
            break;
    }
}