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

The following examples show how to use android.app.Activity#hashCode() . 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: TaskExecutor.java    From android-task with 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 File: FlutterAMapNavView.java    From flutter_amap_plugin with 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 File: FlutterAMapNavView.java    From flutter_amap_plugin with 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 File: FlutterAMapNavView.java    From flutter_amap_plugin with 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 File: FlutterAMapNavView.java    From flutter_amap_plugin with 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 File: FlutterAMapNavView.java    From flutter_amap_plugin with 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 File: FlutterAMapView.java    From flutter_amap_plugin with 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 File: FlutterAMapView.java    From flutter_amap_plugin with 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 File: FlutterAMapView.java    From flutter_amap_plugin with 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 File: FlutterAMapView.java    From flutter_amap_plugin with 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 File: FlutterAMapView.java    From flutter_amap_plugin with 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 File: TaskExecutor.java    From android-task with Apache License 2.0 4 votes vote down vote up
private boolean isCallbackActivity(Activity activity) {
    return activity.hashCode() == mActivityHash;
}
 
Example 13
Source File: TaskExecutor.java    From android-task with Apache License 2.0 4 votes vote down vote up
private void updateCallbackActivity(Activity activity) {
    mActivityHash = activity.hashCode();
    mCanSaveInstanceState = getInitialSaveInstanceState(activity);
}
 
Example 14
Source File: Tina.java    From tina with 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 15
Source File: FlutterAMapView.java    From flutter_amap_plugin with 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 File: FlutterAMapView.java    From flutter_amap_plugin with MIT License 4 votes vote down vote up
@Override
public void onActivityStarted(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
}
 
Example 17
Source File: FlutterAMapNavView.java    From flutter_amap_plugin with MIT License 4 votes vote down vote up
@Override
public void onActivityStopped(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
}
 
Example 18
Source File: FlutterAMapNavView.java    From flutter_amap_plugin with MIT License 4 votes vote down vote up
@Override
public void onActivityStarted(Activity activity) {
    if (disposed || activity.hashCode() != registrar.activity().hashCode()) {
        return;
    }
}