<commit_before>/* Copyright (C) 2014 KKBOX Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * ​http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.kkbox.toolkit.app;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

public class KKFragmentActivity extends FragmentActivity implements KKServiceActivity {

	private KKActivityDelegate delegate;

	public KKFragmentActivity() {
		delegate = new KKActivityDelegate(this);
	}

	@Override
	public void startActivityIfNoDialog(Intent intent) {
		delegate.startActivityIfNoDialog(intent);
	}

	@Override
	public void finishIfNoDialog() {
		delegate.finishIfNoDialog();
	}

	@Override
	public void startActivityForResultIfNoDialog(Intent intent, int requestCode) {
		delegate.startActivityForResultIfNoDialog(intent, requestCode);
	}

	@Override
	public void sendMessageToActiveSubFragments(Bundle arguments) {
		delegate.sendMessageToActiveSubFragments(arguments);
	}

	@Override
	public void finishAllKKActivity() {
		delegate.finishAllKKActivity();
	}

	@Override
	public void activateSubFragment(KKFragment fragment) {
		delegate.activateSubFragment(fragment);
	}

	@Override
	public void deactivateSubFragment(KKFragment fragment) {
		delegate.deactivateSubFragment(fragment);
	}

	@Override
	public void onServiceStarted(int flag) {}

	@Override
	public void onServiceStarting(int flag) {}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		delegate.onCreate(savedInstanceState);
	}

	@Override
	protected void onPostResume() {
		super.onPostResume();
		delegate.onPostResume();
	}

	@Override
	protected void onPause() {
		super.onPause();
		delegate.onPause();
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		delegate.onDestroy();
	}
}<commit_msg>bug fixed: startActivityForResult() in KKFragment doesn't work properly<commit_after>/* Copyright (C) 2014 KKBOX Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * ​http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.kkbox.toolkit.app;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

public class KKFragmentActivity extends FragmentActivity implements KKServiceActivity {

	private KKActivityDelegate delegate;

	public KKFragmentActivity() {
		delegate = new KKActivityDelegate(this);
	}

	@Override
	public void startActivityIfNoDialog(Intent intent) {
		delegate.startActivityIfNoDialog(intent);
	}

	@Override
	public void finishIfNoDialog() {
		delegate.finishIfNoDialog();
	}

	@Override
	public void startActivityForResultIfNoDialog(Intent intent, int requestCode) {
		delegate.startActivityForResultIfNoDialog(intent, requestCode);
	}

	@Override
	public void sendMessageToActiveSubFragments(Bundle arguments) {
		delegate.sendMessageToActiveSubFragments(arguments);
	}

	@Override
	public void finishAllKKActivity() {
		delegate.finishAllKKActivity();
	}

	@Override
	public void activateSubFragment(KKFragment fragment) {
		delegate.activateSubFragment(fragment);
	}

	@Override
	public void deactivateSubFragment(KKFragment fragment) {
		delegate.deactivateSubFragment(fragment);
	}

	@Override
	public void onServiceStarted(int flag) {}

	@Override
	public void onServiceStarting(int flag) {}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		delegate.onCreate(savedInstanceState);
	}

	@Override
	protected void onPostResume() {
		super.onPostResume();
		delegate.onPostResume();
	}

	@Override
	protected void onPause() {
		super.onPause();
		delegate.onPause();
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		delegate.onDestroy();
	}

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        delegate.onActivityResult(requestCode, resultCode, data);
    }
}
{'fraction_non_alphanumeric': 0.08646770237121831, 'fraction_numerical': 0.003679476696647588, 'mean_word_length': 5.162468513853904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2488554', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1348, 'n_words': 392}