Java Code Examples for android.app.Activity#hashCode()

The following examples show how to use android.app.Activity#hashCode() . These examples are extracted from open source projects. 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 Project: android-task   File: TaskExecutor.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
    if (savedInstanceState == null) {
        return;
    }

    int activityHash = savedInstanceState.getInt(ACTIVITY_HASH, -1);
    if (activityHash != mActivityHash) {
        return;
    }

    mActivityHash = activity.hashCode();
    mTask.setCachedActivity(activity);

    postResultFromLifeCycleCallback(activity);
}
 
Example 2
Source Project: flutter_amap_plugin   File: FlutterAMapNavView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    navView.onCreate(savedInstanceState);
}
 
Example 3
Source Project: flutter_amap_plugin   File: FlutterAMapNavView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivityResumed(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    navView.onResume();
}
 
Example 4
Source Project: flutter_amap_plugin   File: FlutterAMapNavView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivityPaused(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    navView.onPause();
}
 
Example 5
Source Project: flutter_amap_plugin   File: FlutterAMapNavView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    navView.onSaveInstanceState(outState);
}
 
Example 6
Source Project: flutter_amap_plugin   File: FlutterAMapNavView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivityDestroyed(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    navView.onDestroy();
}
 
Example 7
Source Project: flutter_amap_plugin   File: FlutterAMapView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    mapView.onCreate(savedInstanceState);
}
 
Example 8
Source Project: flutter_amap_plugin   File: FlutterAMapView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivityResumed(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    mapView.onResume();
}
 
Example 9
Source Project: flutter_amap_plugin   File: FlutterAMapView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivityPaused(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    mapView.onPause();
}
 
Example 10
Source Project: flutter_amap_plugin   File: FlutterAMapView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    mapView.onSaveInstanceState(outState);
}
 
Example 11
Source Project: flutter_amap_plugin   File: FlutterAMapView.java    License: MIT License 5 votes vote down vote up
@Override
public void onActivityDestroyed(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
    mapView.onDestroy();
}
 
Example 12
Source Project: flutter_amap_plugin   File: FlutterAMapNavView.java    License: MIT License 4 votes vote down vote up
@Override
public void onActivityStarted(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
}
 
Example 13
Source Project: flutter_amap_plugin   File: FlutterAMapNavView.java    License: MIT License 4 votes vote down vote up
@Override
public void onActivityStopped(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
}
 
Example 14
Source Project: flutter_amap_plugin   File: FlutterAMapView.java    License: MIT License 4 votes vote down vote up
@Override
public void onActivityStarted(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
}
 
Example 15
Source Project: flutter_amap_plugin   File: FlutterAMapView.java    License: MIT License 4 votes vote down vote up
@Override
public void onActivityStopped(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
}
 
Example 16
Source Project: tina   File: Tina.java    License: Apache License 2.0 4 votes vote down vote up
@RequiresApi(api = Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public Tina deamon(Activity activity) {
    tag = activity.getClass().getSimpleName() + activity.hashCode();
    registerCancelEvent(activity);
    return this;
}
 
Example 17
Source Project: android-task   File: TaskExecutor.java    License: Apache License 2.0 4 votes vote down vote up
private void updateCallbackActivity(Activity activity) {
    mActivityHash = activity.hashCode();
    mCanSaveInstanceState = getInitialSaveInstanceState(activity);
}
 
Example 18
Source Project: android-task   File: TaskExecutor.java    License: Apache License 2.0 4 votes vote down vote up
private boolean isCallbackActivity(Activity activity) {
    return activity.hashCode() == mActivityHash;
}