use of com.waz.zclient.core.controllers.tracking.events.settings.ChangedProfilePictureEvent in project wire-android by wireapp.
the class ZetaPreferencesActivity method onBitmapSelected.
@Override
public void onBitmapSelected(final ImageAsset imageAsset, boolean imageFromCamera, CameraContext cameraContext) {
if (cameraContext != CameraContext.SETTINGS) {
return;
}
getStoreFactory().getNetworkStore().doIfHasInternetOrNotifyUser(new NetworkAction() {
@Override
public void execute(NetworkMode networkMode) {
getStoreFactory().getProfileStore().setUserPicture(imageAsset);
getControllerFactory().getBackgroundController().setImageAsset(imageAsset);
injectJava(GlobalTrackingController.class).tagEvent(new ChangedProfilePictureEvent());
}
@Override
public void onNoNetwork() {
ViewUtils.showAlertDialog(ZetaPreferencesActivity.this, R.string.alert_dialog__no_network__header, R.string.profile_pic__no_network__message, R.string.alert_dialog__confirmation, null, true);
}
});
getSupportFragmentManager().popBackStack(CameraFragment.TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
}
Aggregations