@Override
    @SuppressWarnings("unchecked")
    public synchronized CallbackRegistry<C, T, A> clone() {
        CallbackRegistry<C, T, A> clone = null;
        try {
            clone = (CallbackRegistry<C, T, A>) super.clone();
            clone.mFirst64Removed = 0;
            clone.mRemainderRemoved = null;
            clone.mNotificationLevel = 0;
            clone.mCallbacks = new ArrayList<C>();
            final int numListeners = mCallbacks.size();
            for (int i = 0; i < numListeners; i++) {
                if (!isRemoved(i)) {
                    clone.mCallbacks.add(mCallbacks.get(i));
                }
            }
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }
@return A copy of the CallbackRegistry with all callbacks listening to both instances.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/obs/CallbackRegistry.java