Source:
<code>protected void onCreate(Bundle savedInstanceState) { Log_OC.v(TAG, "onCreate() start"); super.onCreate(savedInstanceState); if (savedInstanceState == null) { FileObserverService.initialize(this); } mLocalBroadcastManager = LocalBroadcastManager.getInstance(this); if (savedInstanceState != null) { mFileWaitingToPreview = (OCFile) savedInstanceState.getParcelable( FileDisplayActivity.KEY_WAITING_TO_PREVIEW); mSyncInProgress = savedInstanceState.getBoolean(KEY_SYNC_IN_PROGRESS); mWaitingToSend = (OCFile) savedInstanceState.getParcelable( FileDisplayActivity.KEY_WAITING_TO_SEND); } else { mFileWaitingToPreview = null; mSyncInProgress = false; mWaitingToSend = null; } setContentView(R.layout.files); setupToolbar(); setupDrawer(R.id.nav_all_files); mDualPane = getResources().getBoolean(R.bool.large_land_layout); mLeftFragmentContainer = findViewById(R.id.left_fragment_container); mRightFragmentContainer = findViewById(R.id.right_fragment_container); getSupportActionBar().setHomeButtonEnabled(true); FragmentManager fm = getSupportFragmentManager(); TaskRetainerFragment taskRetainerFragment = (TaskRetainerFragment) fm.findFragmentByTag(TaskRetainerFragment.FTAG_TASK_RETAINER_FRAGMENT); if (taskRetainerFragment == null) { taskRetainerFragment = new TaskRetainerFragment(); fm.beginTransaction() .add(taskRetainerFragment, TaskRetainerFragment.FTAG_TASK_RETAINER_FRAGMENT).commit(); } Log_OC.v(TAG, "onCreate() end"); <START> AppRater.appLaunched(this, "com.owncloud.android"); <END> }</code><technical_language>Please getPackageName() instead of "com.owncloud.android", package name change in brandable solutions</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { Log_OC.v(TAG, "onCreate() start"); super.onCreate(savedInstanceState); if (savedInstanceState == null) { FileObserverService.initialize(this); } mLocalBroadcastManager = LocalBroadcastManager.getInstance(this); if (savedInstanceState != null) { mFileWaitingToPreview = (OCFile) savedInstanceState.getParcelable( FileDisplayActivity.KEY_WAITING_TO_PREVIEW); mSyncInProgress = savedInstanceState.getBoolean(KEY_SYNC_IN_PROGRESS); mWaitingToSend = (OCFile) savedInstanceState.getParcelable( FileDisplayActivity.KEY_WAITING_TO_SEND); } else { mFileWaitingToPreview = null; mSyncInProgress = false; mWaitingToSend = null; } setContentView(R.layout.files); setupToolbar(); setupDrawer(R.id.nav_all_files); mDualPane = getResources().getBoolean(R.bool.large_land_layout); mLeftFragmentContainer = findViewById(R.id.left_fragment_container); mRightFragmentContainer = findViewById(R.id.right_fragment_container); getSupportActionBar().setHomeButtonEnabled(true); FragmentManager fm = getSupportFragmentManager(); TaskRetainerFragment taskRetainerFragment = (TaskRetainerFragment) fm.findFragmentByTag(TaskRetainerFragment.FTAG_TASK_RETAINER_FRAGMENT); if (taskRetainerFragment == null) { taskRetainerFragment = new TaskRetainerFragment(); fm.beginTransaction() .add(taskRetainerFragment, TaskRetainerFragment.FTAG_TASK_RETAINER_FRAGMENT).commit(); } Log_OC.v(TAG, "onCreate() end"); if (getResources().getBoolean(R.bool.enable_rate_me_feature)) { AppRater.appLaunched(this, getPackageName()); } }