Progress on Analytics magic

This commit is contained in:
Mario Danic 2017-04-26 21:11:27 +02:00
parent 726a02f39c
commit 9130635fa1
111 changed files with 1817 additions and 986 deletions

View file

@ -78,10 +78,12 @@ android {
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
productFlavors {
// used for f-droid
generic {
applicationId 'com.nextcloud.client'
}
// both need .modified gradle file in place of the regular one
modified {
// structure is:
// domain tld
@ -89,6 +91,12 @@ android {
// .client
applicationId 'com.custom.client'
}
zstore {
applicationId 'com.nextcloud.client'
}
}
configurations {

View file

@ -78,10 +78,12 @@ android {
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
productFlavors {
// used for f-droid
generic {
applicationId 'com.nextcloud.client'
}
// both need .modified gradle file in place of the regular one
modified {
// structure is:
// domain tld
@ -89,6 +91,12 @@ android {
// .client
applicationId 'com.custom.client'
}
zstore {
applicationId 'com.nextcloud.client'
}
}
configurations {
@ -191,6 +199,7 @@ dependencies {
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.googlecode.ez-vcard:ez-vcard:0.10.2'
compile 'com.google.android.gms:play-services:10.2.1'
compile 'org.parceler:parceler-api:1.1.6'

View file

@ -0,0 +1,29 @@
/**
* Nextcloud Android client application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.owncloud.android.utils;
import android.app.Activity;
public class AnalyticsUtils {
public static void setCurrentScreenName(Activity activity, String s, String s1) {
// do nothing
}
}

View file

@ -263,8 +263,6 @@
<service android:name=".services.observer.FileObserverService" />
<service android:name="com.evernote.android.job.gcm.PlatformGcmService" tools:node="remove"/>
<activity
android:name=".ui.activity.CopyToClipboardActivity"
android:icon="@drawable/copy_link"

View file

@ -34,7 +34,6 @@ import android.support.multidex.MultiDexApplication;
import android.support.v4.util.Pair;
import com.evernote.android.job.JobManager;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.owncloud.android.authentication.PassCodeManager;
import com.owncloud.android.datamodel.SyncedFolder;
import com.owncloud.android.datamodel.SyncedFolderProvider;
@ -81,8 +80,6 @@ public class MainApp extends MultiDexApplication {
private static SyncedFolderObserverService mObserverService;
private static FirebaseAnalytics firebaseAnalytics;
@SuppressWarnings("unused")
private boolean mBound;
@ -91,13 +88,6 @@ public class MainApp extends MultiDexApplication {
super.onCreate();
JobManager.create(this).addJobCreator(new NCJobCreator());
MainApp.mContext = getApplicationContext();
firebaseAnalytics = FirebaseAnalytics.getInstance(this);
if (!getResources().getBoolean(R.bool.analytics_enabled)) {
firebaseAnalytics.setAnalyticsCollectionEnabled(false);
}
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
MainApp.storagePath = appPrefs.getString(Preferences.PreferenceKeys.STORAGE_PATH, Environment.
@ -287,6 +277,7 @@ public class MainApp extends MultiDexApplication {
syncedFolderProvider.updateAutoUploadPaths(mContext);
}
}
private void cleanOldEntries() {
// previous versions of application created broken entries in the SyncedFolderProvider
// database, and this cleans all that and leaves 1 (newest) entry per synced folder
@ -321,7 +312,9 @@ public class MainApp extends MultiDexApplication {
}
}
/** Defines callbacks for service binding, passed to bindService() */
/**
* Defines callbacks for service binding, passed to bindService()
*/
private ServiceConnection syncedFolderObserverServiceConnection = new ServiceConnection() {
@Override
@ -338,15 +331,4 @@ public class MainApp extends MultiDexApplication {
}
};
public static FirebaseAnalytics getFirebaseAnalyticsInstance() {
/*
In order for Firebase Analytics to work, you also need to
put a proper google-services.json in src/custom folder
If that file is flawed, nothing will be sent to Firebase
*/
return firebaseAnalytics;
}
}

View file

@ -113,6 +113,7 @@ import com.owncloud.android.ui.dialog.IndeterminateProgressDialog;
import com.owncloud.android.ui.dialog.SamlWebViewDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
import com.owncloud.android.utils.AnalyticsUtils;
import com.owncloud.android.utils.DisplayUtils;
import java.security.cert.X509Certificate;
@ -804,7 +805,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
if (!webViewLoginMethod) {
// bound here to avoid spurious changes triggered by Android on device rotations

View file

@ -17,7 +17,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.db;
@ -158,6 +157,7 @@ public class OCUpload implements Parcelable {
public void setUploadId(long id) {
mId = id;
}
public long getUploadId() {
return mId;
}
@ -306,7 +306,7 @@ public class OCUpload implements Parcelable {
mUploadEndTimeStamp = uploadEndTimestamp;
}
public long getUploadEndTimestamp(){
public long getUploadEndTimestamp() {
return mUploadEndTimeStamp;
}
@ -318,8 +318,8 @@ public class OCUpload implements Parcelable {
String localPath = getLocalPath() != null ? getLocalPath() : "";
return localPath + " status:" + getUploadStatus() + " result:" +
(getLastResult() == null ? "null" : getLastResult().getValue());
} catch (NullPointerException e){
Log_OC.d(TAG, "Exception " + e.toString() );
} catch (NullPointerException e) {
Log_OC.d(TAG, "Exception " + e.toString());
return (e.toString());
}
}
@ -392,6 +392,8 @@ public class OCUpload implements Parcelable {
dest.writeInt(mCreatedBy);
}
enum CanUploadFileNowStatus {NOW, LATER, FILE_GONE, ERROR};
enum CanUploadFileNowStatus {NOW, LATER, FILE_GONE, ERROR}
;
}

View file

@ -97,9 +97,11 @@ public abstract class PreferenceManager {
public static boolean instantVideoUploadViaWiFiOnly(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__INSTANT_VIDEO_UPLOAD_ON_WIFI, false);
}
public static boolean instantPictureUploadWhenChargingOnly(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("instant_upload_on_charging", false);
}
public static boolean instantVideoUploadWhenChargingOnly(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("instant_video_upload_on_charging", false);
}

View file

@ -18,7 +18,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.db;
@ -89,7 +88,7 @@ public class ProviderMeta {
public static final String FILE_PERMISSIONS = "permissions";
public static final String FILE_REMOTE_ID = "remote_id";
public static final String FILE_UPDATE_THUMBNAIL = "update_thumbnail";
public static final String FILE_IS_DOWNLOADING= "is_downloading";
public static final String FILE_IS_DOWNLOADING = "is_downloading";
public static final String FILE_ETAG_IN_CONFLICT = "etag_in_conflict";
public static final String FILE_FAVORITE = "favorite";

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.db;
@ -46,6 +45,7 @@ public enum UploadResult {
public int getValue() {
return value;
}
public static UploadResult fromValue(int value) {
switch (value) {
case -1:
@ -78,9 +78,9 @@ public enum UploadResult {
return null;
}
public static UploadResult fromOperationResult(RemoteOperationResult result){
public static UploadResult fromOperationResult(RemoteOperationResult result) {
// messy :(
switch (result.getCode()){
switch (result.getCode()) {
case OK:
return UPLOADED;
case NO_NETWORK_CONNECTION:

View file

@ -16,7 +16,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.files;

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.files;
@ -118,7 +117,7 @@ public class FileMenuFilter {
private void hideAll(Menu menu) {
MenuItem item;
for (int i=0; i<menu.size(); i++) {
for (int i = 0; i < menu.size(); i++) {
item = menu.getItem(i);
item.setVisible(false);
item.setEnabled(false);
@ -134,7 +133,7 @@ public class FileMenuFilter {
* @param toShow List to save the options that must be shown in the menu.
* @param toHide List to save the options that must be shown in the menu.
*/
private void filter(List<Integer> toShow, List <Integer> toHide) {
private void filter(List<Integer> toShow, List<Integer> toHide) {
boolean synchronizing = anyFileSynchronizing();
/// decision is taken for each possible action on a file in the menu
@ -278,7 +277,7 @@ public class FileMenuFilter {
private boolean anyFileSynchronizing(OperationsServiceBinder opsBinder) {
boolean synchronizing = false;
if (opsBinder != null) {
for (Iterator<OCFile> iterator = mFiles.iterator(); !synchronizing && iterator.hasNext();) {
for (Iterator<OCFile> iterator = mFiles.iterator(); !synchronizing && iterator.hasNext(); ) {
synchronizing = opsBinder.isSynchronizing(mAccount, iterator.next());
}
}
@ -288,7 +287,7 @@ public class FileMenuFilter {
private boolean anyFileDownloading(FileDownloaderBinder downloaderBinder) {
boolean downloading = false;
if (downloaderBinder != null) {
for (Iterator<OCFile> iterator = mFiles.iterator(); !downloading && iterator.hasNext();) {
for (Iterator<OCFile> iterator = mFiles.iterator(); !downloading && iterator.hasNext(); ) {
downloading = downloaderBinder.isDownloading(mAccount, iterator.next());
}
}
@ -298,7 +297,7 @@ public class FileMenuFilter {
private boolean anyFileUploading(FileUploaderBinder uploaderBinder) {
boolean uploading = false;
if (uploaderBinder != null) {
for (Iterator<OCFile> iterator = mFiles.iterator(); !uploading && iterator.hasNext();) {
for (Iterator<OCFile> iterator = mFiles.iterator(); !uploading && iterator.hasNext(); ) {
uploading = uploaderBinder.isUploading(mAccount, iterator.next());
}
}
@ -318,8 +317,8 @@ public class FileMenuFilter {
}
private boolean containsFolder() {
for(OCFile file: mFiles) {
if(file.isFolder()) {
for (OCFile file : mFiles) {
if (file.isFolder()) {
return true;
}
}
@ -327,8 +326,8 @@ public class FileMenuFilter {
}
private boolean anyFileDown() {
for(OCFile file: mFiles) {
if(file.isDown()) {
for (OCFile file : mFiles) {
if (file.isDown()) {
return true;
}
}
@ -336,8 +335,8 @@ public class FileMenuFilter {
}
private boolean allKeptAvailableOffline() {
for(OCFile file: mFiles) {
if(!file.isAvailableOffline()) {
for (OCFile file : mFiles) {
if (!file.isAvailableOffline()) {
return false;
}
}
@ -345,8 +344,8 @@ public class FileMenuFilter {
}
private boolean allFavorites() {
for(OCFile file: mFiles) {
if(!file.getIsFavorite()) {
for (OCFile file : mFiles) {
if (!file.getIsFavorite()) {
return false;
}
}
@ -354,8 +353,8 @@ public class FileMenuFilter {
}
private boolean allNotFavorites() {
for(OCFile file: mFiles) {
if(file.getIsFavorite()) {
for (OCFile file : mFiles) {
if (file.getIsFavorite()) {
return false;
}
}
@ -363,8 +362,8 @@ public class FileMenuFilter {
}
private boolean allNotKeptAvailableOffline() {
for(OCFile file: mFiles) {
if(file.isAvailableOffline()) {
for (OCFile file : mFiles) {
if (file.isAvailableOffline()) {
return false;
}
}

View file

@ -103,7 +103,7 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver {
}
String[] CONTENT_PROJECTION = {
Images.Media.DATA, Images.Media.DISPLAY_NAME, Images.Media.MIME_TYPE, Images.Media.SIZE };
Images.Media.DATA, Images.Media.DISPLAY_NAME, Images.Media.MIME_TYPE, Images.Media.SIZE};
int permissionCheck = ContextCompat.checkSelfPermission(context,
Manifest.permission.READ_EXTERNAL_STORAGE);

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.media;
@ -296,7 +295,7 @@ public class MediaControlView extends FrameLayout /* implements OnLayoutChangeLi
if (duration > 0) {
// use long to avoid overflow
long pos = 1000L * position / duration;
mProgress.setProgress( (int) pos);
mProgress.setProgress((int) pos);
}
int percent = mPlayer.getBufferPercentage();
mProgress.setSecondaryProgress(percent * 10);
@ -431,7 +430,7 @@ public class MediaControlView extends FrameLayout /* implements OnLayoutChangeLi
long duration = mPlayer.getDuration();
long newposition = (duration * progress) / 1000L;
mPlayer.seekTo( (int) newposition);
mPlayer.seekTo((int) newposition);
if (mCurrentTime != null) {
mCurrentTime.setText(stringForTime((int) newposition));
}

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.media;
@ -97,7 +96,9 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
PREPARING,
PLAYING,
PAUSED
};
}
;
/** Current state */
@ -215,7 +216,6 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
}
/**
* Initialize a service instance
*
@ -418,7 +418,7 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
private void tryToGetAudioFocus() {
if (mAudioFocus != AudioFocus.FOCUS
&& mAudioManager != null
&& (AudioManager.AUDIOFOCUS_REQUEST_GRANTED == mAudioManager.requestAudioFocus( this,
&& (AudioManager.AUDIOFOCUS_REQUEST_GRANTED == mAudioManager.requestAudioFocus(this,
AudioManager.STREAM_MUSIC,
AudioManager.AUDIOFOCUS_GAIN))
) {

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.media;

View file

@ -21,15 +21,12 @@
package com.owncloud.android.operations;
import java.io.File;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import android.accounts.Account;
import android.webkit.MimeTypeMap;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
import com.owncloud.android.lib.common.operations.OperationCancelledException;
import com.owncloud.android.lib.common.operations.RemoteOperation;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
@ -37,8 +34,11 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.files.DownloadRemoteFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import android.accounts.Account;
import android.webkit.MimeTypeMap;
import java.io.File;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* Remote mDownloadOperation performing the download of a file to an ownCloud server

View file

@ -19,15 +19,6 @@
package com.owncloud.android.operations;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.NameValuePair;
import org.json.JSONException;
import org.json.JSONObject;
import com.owncloud.android.authentication.OAuth2Constants;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.operations.RemoteOperation;
@ -35,6 +26,15 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
import com.owncloud.android.lib.common.utils.Log_OC;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.PostMethod;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class OAuth2GetAccessToken extends RemoteOperation {

View file

@ -23,7 +23,6 @@ package com.owncloud.android.operations;
import android.content.Context;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
@ -32,7 +31,6 @@ import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.RemoveRemoteShareOperation;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.operations.common.SyncOperation;
import java.util.ArrayList;

View file

@ -21,11 +21,6 @@
package com.owncloud.android.services.observer;
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import android.accounts.Account;
import android.app.Service;
import android.content.BroadcastReceiver;
@ -44,6 +39,11 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.operations.SynchronizeFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* Service keeping a list of {@link FolderObserver} instances that watch for local

View file

@ -22,14 +22,6 @@
package com.owncloud.android.syncadapter;
import java.io.IOException;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
@ -38,6 +30,14 @@ import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.Context;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException;
import java.io.IOException;
/**
* Base synchronization adapter for ownCloud designed to be subclassed for different
* resource types, like FileSync, ConcatsSync, CalendarSync, etc..

View file

@ -14,18 +14,17 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;
import android.content.Context;
import android.preference.CheckBoxPreference;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import android.preference.CheckBoxPreference;
public class CheckBoxPreferenceWithLongTitle extends CheckBoxPreference{
public class CheckBoxPreferenceWithLongTitle extends CheckBoxPreference {
public CheckBoxPreferenceWithLongTitle(Context context) {
super(context);
@ -34,6 +33,7 @@ public class CheckBoxPreferenceWithLongTitle extends CheckBoxPreference{
public CheckBoxPreferenceWithLongTitle(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CheckBoxPreferenceWithLongTitle(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}

View file

@ -16,7 +16,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;
@ -28,9 +27,9 @@ import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnTouchListener;
import android.view.ViewGroup.LayoutParams;
import android.view.WindowManager;
import android.widget.PopupWindow;
/**

View file

@ -16,7 +16,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;
@ -57,7 +56,7 @@ public class ExtendedListView extends ListView {
*
*/
@Override
protected void onDraw (Canvas canvas) {
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (mPositionToSetAndCenter > 0) {
Log_OC.v(TAG, "Centering around position " + mPositionToSetAndCenter);

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;
@ -27,13 +26,14 @@ public class NavigationDrawerItem {
private int mIcon;
// Constructors
public NavigationDrawerItem(){}
public NavigationDrawerItem() {
}
public NavigationDrawerItem(String title){
public NavigationDrawerItem(String title) {
mTitle = title;
}
public NavigationDrawerItem(String title, String contentDescription, int icon){
public NavigationDrawerItem(String title, String contentDescription, int icon) {
mTitle = title;
mContentDescription = contentDescription;
mIcon = icon;

View file

@ -14,19 +14,18 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;
import android.content.Context;
import android.preference.Preference;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import android.preference.Preference;
public class PreferenceWithLongSummary extends Preference{
public class PreferenceWithLongSummary extends Preference {
public PreferenceWithLongSummary(Context context) {
super(context);
@ -35,6 +34,7 @@ public class PreferenceWithLongSummary extends Preference{
public PreferenceWithLongSummary(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PreferenceWithLongSummary(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}

View file

@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;

View file

@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;

View file

@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;

View file

@ -21,10 +21,10 @@
package com.owncloud.android.ui.activity;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.ui.helpers.FileOperationsHelper;
import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
import com.owncloud.android.ui.helpers.FileOperationsHelper;
public interface ComponentsGetter {

View file

@ -20,16 +20,16 @@
package com.owncloud.android.ui.activity;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
import android.app.Activity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Intent;
import android.os.Bundle;
import android.content.ClipboardManager;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
/**
* Activity copying the text of the received Intent into the system clibpoard.
*/

View file

@ -39,7 +39,6 @@ import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
@ -137,7 +136,7 @@ public class ErrorsWhileCopyingHandlerActivity extends AppCompatActivity
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
/**

View file

@ -42,7 +42,6 @@ import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.authentication.AuthenticatorActivity;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.files.services.FileDownloader;
import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;

View file

@ -40,7 +40,6 @@ import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.operations.RemoteOperation;
@ -237,7 +236,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
super.onResume();
Log_OC.e(TAG, "onResume() start");
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
// refresh list of files
refreshListOfFilesFragment(false);

View file

@ -102,7 +102,7 @@ public class FolderSyncActivity extends FileActivity implements FolderSyncAdapte
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
/**

View file

@ -32,7 +32,6 @@ import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import java.util.ArrayList;
@ -88,7 +87,7 @@ public class GenericExplanationActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
public class ExplanationListAdapterView extends ArrayAdapter<String> {

View file

@ -36,7 +36,6 @@ import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.dialog.LoadingDialog;
@ -122,7 +121,7 @@ public class LogHistoryActivity extends ToolbarActivity {
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
@Override

View file

@ -134,7 +134,7 @@ public class ManageAccountsActivity extends FileActivity
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
@Override

View file

@ -32,7 +32,6 @@ import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
@ -72,7 +71,7 @@ public class ManageSpaceActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
@Override

View file

@ -30,7 +30,6 @@ import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
/**
@ -60,7 +59,7 @@ public class ParticipateActivity extends FileActivity {
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
private void setupContent() {

View file

@ -38,7 +38,6 @@ import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
@ -144,7 +143,7 @@ public class PassCodeActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
/**

View file

@ -612,7 +612,7 @@ public class Preferences extends PreferenceActivity
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());

View file

@ -22,8 +22,8 @@ package com.owncloud.android.ui.activity;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.ProgressDialog;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;

View file

@ -41,7 +41,6 @@ import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.lib.common.utils.Log_OC;
@ -323,7 +322,7 @@ public class UploadFilesActivity extends FileActivity implements
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
/**

View file

@ -41,7 +41,6 @@ import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.OCFile;
@ -129,7 +128,7 @@ public class UploadListActivity extends FileActivity implements UploadListFragme
Log_OC.v(TAG, "onResume() start");
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
// Listen for upload messages
mUploadMessagesReceiver = new UploadMessagesReceiver();

View file

@ -23,7 +23,6 @@ import android.accounts.Account;
import android.os.Bundle;
import android.view.View.OnClickListener;
import com.owncloud.android.MainApp;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.ui.fragment.OCFileListFragment;
@ -52,7 +51,7 @@ public class UploadPathActivity extends FolderPickerActivity implements FileFrag
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
/**

View file

@ -132,7 +132,7 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
@Override

View file

@ -20,13 +20,13 @@
*/
package com.owncloud.android.ui.adapter;
import android.view.View;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.network.CertificateCombinedException;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import android.view.View;
import android.widget.TextView;
/**
* TODO
*

View file

@ -19,14 +19,6 @@
package com.owncloud.android.ui.adapter;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
@ -35,6 +27,14 @@ import com.jakewharton.disklrucache.DiskLruCache;
import com.owncloud.android.BuildConfig;
import com.owncloud.android.lib.common.utils.Log_OC;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class DiskLruImageCache {
private DiskLruCache mDiskCache;

View file

@ -20,15 +20,16 @@
*/
package com.owncloud.android.ui.adapter;
import java.text.DateFormat;
import java.util.Date;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import android.net.http.SslCertificate;
import android.view.View;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import java.text.DateFormat;
import java.util.Date;
/**
* TODO
*/

View file

@ -20,12 +20,13 @@
*/
package com.owncloud.android.ui.adapter;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import android.net.http.SslError;
import android.view.View;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
/**
* Dialog to show an Untrusted Certificate
*/

View file

@ -20,6 +20,13 @@
*/
package com.owncloud.android.ui.adapter;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateEncodingException;
@ -31,13 +38,6 @@ import java.util.Map;
import javax.security.auth.x500.X500Principal;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
/**
*
*/

View file

@ -19,11 +19,11 @@
package com.owncloud.android.ui.dialog;
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.webkit.WebView;
import com.owncloud.android.R;

View file

@ -20,11 +20,11 @@
package com.owncloud.android.ui.dialog;
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import com.owncloud.android.R;

View file

@ -21,13 +21,13 @@
package com.owncloud.android.ui.dialog;
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import com.owncloud.android.R;

View file

@ -20,16 +20,11 @@
package com.owncloud.android.ui.dialog;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.resources.files.FileUtils;
import com.owncloud.android.ui.activity.ComponentsGetter;
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager.LayoutParams;
@ -37,6 +32,11 @@ import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.resources.files.FileUtils;
import com.owncloud.android.ui.activity.ComponentsGetter;
/**
* Dialog to input the name for a new folder to create.
*

View file

@ -19,15 +19,12 @@
package com.owncloud.android.ui.dialog;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AuthenticatorActivity;
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.support.v7.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AlertDialog.Builder;
import android.text.InputType;
import android.view.WindowManager.LayoutParams;
import android.webkit.HttpAuthHandler;
@ -35,6 +32,9 @@ import android.webkit.WebView;
import android.widget.EditText;
import android.widget.LinearLayout;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AuthenticatorActivity;
/**

View file

@ -18,8 +18,6 @@
*/
package com.owncloud.android.ui.dialog;
import com.owncloud.android.R;
import android.app.Dialog;
import android.graphics.PorterDuff;
import android.os.Bundle;
@ -31,6 +29,8 @@ import android.view.Window;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.owncloud.android.R;
public class LoadingDialog extends DialogFragment {
private String mMessage;

View file

@ -25,11 +25,12 @@ package com.owncloud.android.ui.dialog;
*
* Triggers the rename operation.
*/
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager.LayoutParams;

View file

@ -28,8 +28,8 @@ import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View file

@ -20,12 +20,6 @@
package com.owncloud.android.ui.dialog;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.content.ComponentName;
import android.content.Context;
@ -36,6 +30,7 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -47,6 +42,11 @@ import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.activity.CopyToClipboardActivity;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
* Dialog showing a list activities able to resolve a given Intent,
* filtering out the activities matching give package names.

View file

@ -18,11 +18,11 @@
*/
package com.owncloud.android.ui.dialog;
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;

View file

@ -20,10 +20,6 @@
*/
package com.owncloud.android.ui.dialog;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.cert.X509Certificate;
import android.app.Activity;
import android.app.Dialog;
import android.net.http.SslError;
@ -31,9 +27,9 @@ import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.Window;
import android.view.View.OnClickListener;
import android.webkit.SslErrorHandler;
import android.widget.Button;
@ -46,6 +42,10 @@ import com.owncloud.android.ui.adapter.SslCertificateViewAdapter;
import com.owncloud.android.ui.adapter.SslErrorViewAdapter;
import com.owncloud.android.ui.adapter.X509CertificateViewAdapter;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.cert.X509Certificate;
/**
* Dialog to show information about an untrusted certificate and allow the user
* to decide trust on it or not.

View file

@ -20,6 +20,20 @@
package com.owncloud.android.ui.dialog;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.network.CertificateCombinedException;
import com.owncloud.android.lib.common.network.NetworkUtils;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.KeyStoreException;
@ -32,21 +46,6 @@ import java.util.Map;
import javax.security.auth.x500.X500Principal;
import com.owncloud.android.R;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import com.owncloud.android.lib.common.network.CertificateCombinedException;
import com.owncloud.android.lib.common.network.NetworkUtils;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
/**
* Dialog to request the user about a certificate that could not be validated with the certificates store in the system.
*/

View file

@ -20,13 +20,13 @@
package com.owncloud.android.ui.dialog;
import android.accounts.Account;
import android.support.v7.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;

View file

@ -19,14 +19,14 @@
*/
package com.owncloud.android.ui.errorhandling;
import java.io.PrintWriter;
import java.io.StringWriter;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.util.Log;
import java.io.PrintWriter;
import java.io.StringWriter;
public class ExceptionHandler implements java.lang.Thread.UncaughtExceptionHandler {
private final Activity mContext;

View file

@ -32,7 +32,6 @@ import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.TextView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
@ -381,7 +380,7 @@ public class EditShareFragment extends Fragment {
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
}

View file

@ -111,7 +111,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
}

View file

@ -32,7 +32,6 @@ import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.adapter.LocalFileListAdapter;
@ -69,7 +68,7 @@ public class LocalFileListFragment extends ExtendedListFragment {
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
}

View file

@ -254,7 +254,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
}
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
}

View file

@ -35,7 +35,6 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.ListView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.utils.Log_OC;
@ -109,7 +108,7 @@ public class SearchShareesFragment extends Fragment implements ShareUserListAdap
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
}

View file

@ -44,7 +44,6 @@ import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.OCFile;
@ -182,7 +181,7 @@ public class ShareFileFragment extends Fragment implements ShareUserListAdapter.
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
}

View file

@ -27,7 +27,6 @@ import android.view.ViewGroup;
import android.widget.ExpandableListView;
import android.widget.ListView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.db.OCUpload;
import com.owncloud.android.lib.common.utils.Log_OC;
@ -77,7 +76,7 @@ public class UploadListFragment extends ExpandableListFragment {
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
}

View file

@ -63,9 +63,6 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static com.owncloud.android.R.drawable.file;
import static com.owncloud.android.R.layout.files;
/**
*
*/

View file

@ -19,17 +19,19 @@
package com.owncloud.android.ui.notifications;
import java.util.Random;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Process;
import android.support.v4.app.NotificationCompat;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import com.owncloud.android.R;
import java.util.Random;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
public class NotificationUtils {
/**

View file

@ -19,12 +19,6 @@
*/
package com.owncloud.android.ui.preview;
import java.lang.ref.WeakReference;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.ui.fragment.FileFragment;
import android.accounts.Account;
import android.os.Bundle;
import android.support.v4.app.Fragment;
@ -36,10 +30,15 @@ import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.utils.DisplayUtils;
import java.lang.ref.WeakReference;
/**
* This Fragment is used to monitor the progress of a file downloading.

View file

@ -51,8 +51,6 @@ import android.widget.TextView;
import com.caverock.androidsvg.SVG;
import com.caverock.androidsvg.SVGParseException;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.FileMenuFilter;
@ -380,7 +378,7 @@ public class PreviewImageFragment extends FileFragment {
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
}

View file

@ -19,13 +19,6 @@
*/
package com.owncloud.android.ui.preview;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
import android.accounts.Account;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
@ -37,6 +30,13 @@ import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.utils.FileStorageUtils;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
/**
* Adapter class that provides Fragment instances
*/

View file

@ -54,7 +54,6 @@ import android.widget.TextView;
import android.widget.Toast;
import android.widget.VideoView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.FileMenuFilter;
@ -566,7 +565,7 @@ public class PreviewMediaFragment extends FileFragment implements
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
Log_OC.v(TAG, "onResume");
}

View file

@ -34,7 +34,6 @@ import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.FileMenuFilter;
@ -418,7 +417,7 @@ public class PreviewTextFragment extends FileFragment {
public void onResume() {
super.onResume();
if (getActivity() != null) {
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(getActivity(), SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(getActivity(), SCREEN_NAME, TAG);
}
Log_OC.e(TAG, "onResume");
}

View file

@ -33,7 +33,6 @@ import android.support.v7.app.AlertDialog;
import android.widget.MediaController;
import android.widget.VideoView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.accounts.AccountUtils;
@ -109,7 +108,7 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
@Override
protected void onResume() {
super.onResume();
MainApp.getFirebaseAnalyticsInstance().setCurrentScreen(this, SCREEN_NAME, TAG);
AnalyticsUtils.setCurrentScreenName(this, SCREEN_NAME, TAG);
}
/**

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;
@ -118,11 +117,10 @@ public class BitmapUtils {
* @param storagePath Path to source file of bitmap. Needed for EXIF information.
* @return correctly EXIF-rotated bitmap
*/
public static Bitmap rotateImage(Bitmap bitmap, String storagePath){
public static Bitmap rotateImage(Bitmap bitmap, String storagePath) {
Bitmap resultBitmap = bitmap;
try
{
try {
ExifInterface exifInterface = new ExifInterface(storagePath);
int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1);
@ -131,40 +129,33 @@ public class BitmapUtils {
// 1: nothing to do
// 2
if (orientation == ExifInterface.ORIENTATION_FLIP_HORIZONTAL)
{
if (orientation == ExifInterface.ORIENTATION_FLIP_HORIZONTAL) {
matrix.postScale(-1.0f, 1.0f);
}
// 3
else if (orientation == ExifInterface.ORIENTATION_ROTATE_180)
{
else if (orientation == ExifInterface.ORIENTATION_ROTATE_180) {
matrix.postRotate(180);
}
// 4
else if (orientation == ExifInterface.ORIENTATION_FLIP_VERTICAL)
{
else if (orientation == ExifInterface.ORIENTATION_FLIP_VERTICAL) {
matrix.postScale(1.0f, -1.0f);
}
// 5
else if (orientation == ExifInterface.ORIENTATION_TRANSPOSE)
{
else if (orientation == ExifInterface.ORIENTATION_TRANSPOSE) {
matrix.postRotate(-90);
matrix.postScale(1.0f, -1.0f);
}
// 6
else if (orientation == ExifInterface.ORIENTATION_ROTATE_90)
{
else if (orientation == ExifInterface.ORIENTATION_ROTATE_90) {
matrix.postRotate(90);
}
// 7
else if (orientation == ExifInterface.ORIENTATION_TRANSVERSE)
{
else if (orientation == ExifInterface.ORIENTATION_TRANSVERSE) {
matrix.postRotate(90);
matrix.postScale(1.0f, -1.0f);
}
// 8
else if (orientation == ExifInterface.ORIENTATION_ROTATE_270)
{
else if (orientation == ExifInterface.ORIENTATION_ROTATE_270) {
matrix.postRotate(270);
}
@ -173,9 +164,7 @@ public class BitmapUtils {
if (!resultBitmap.equals(bitmap)) {
bitmap.recycle();
}
}
catch (Exception exception)
{
} catch (Exception exception) {
Log_OC.e("BitmapUtil", "Could not rotate the image: " + storagePath);
}
return resultBitmap;
@ -192,24 +181,20 @@ public class BitmapUtils {
* gfxbuilder-core/src/main/com/camick/awt/HSLColor.java
*/
@SuppressWarnings("PMD.MethodNamingConventions")
public static int[] HSLtoRGB(float h, float s, float l, float alpha)
{
if (s <0.0f || s > 100.0f)
{
public static int[] HSLtoRGB(float h, float s, float l, float alpha) {
if (s < 0.0f || s > 100.0f) {
String message = "Color parameter outside of expected range - Saturation";
throw new IllegalArgumentException( message );
throw new IllegalArgumentException(message);
}
if (l <0.0f || l > 100.0f)
{
if (l < 0.0f || l > 100.0f) {
String message = "Color parameter outside of expected range - Luminance";
throw new IllegalArgumentException( message );
throw new IllegalArgumentException(message);
}
if (alpha <0.0f || alpha > 1.0f)
{
if (alpha < 0.0f || alpha > 1.0f) {
String message = "Color parameter outside of expected range - Alpha";
throw new IllegalArgumentException( message );
throw new IllegalArgumentException(message);
}
// Formula needs all values between 0 - 1.
@ -237,12 +222,12 @@ public class BitmapUtils {
}
@SuppressWarnings("PMD.MethodNamingConventions")
private static float HueToRGB(float p, float q, float h){
private static float HueToRGB(float p, float q, float h) {
if (h < 0) {
h += 1;
}
if (h > 1 ) {
if (h > 1) {
h -= 1;
}
@ -250,12 +235,12 @@ public class BitmapUtils {
return p + ((q - p) * 6 * h);
}
if (2 * h < 1 ) {
if (2 * h < 1) {
return q;
}
if (3 * h < 2) {
return p + ( (q - p) * 6 * ((2.0f / 3.0f) - h) );
return p + ((q - p) * 6 * ((2.0f / 3.0f) - h));
}
return p;

View file

@ -24,8 +24,8 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.v4.net.ConnectivityManagerCompat;
import android.os.BatteryManager;
import android.support.v4.net.ConnectivityManagerCompat;
import com.owncloud.android.lib.common.utils.Log_OC;
@ -49,7 +49,7 @@ public class ConnectivityUtils {
return cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isConnected();
}
public static boolean isCharging(Context context){
public static boolean isCharging(Context context) {
IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent batteryStatus = context.registerReceiver(null, ifilter);

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;

View file

@ -97,8 +97,8 @@ import java.util.Set;
public class DisplayUtils {
private static final String TAG = DisplayUtils.class.getSimpleName();
private static final String[] sizeSuffixes = { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
private static final int[] sizeScales = { 0, 0, 1, 1, 1, 2, 2, 2, 2 };
private static final String[] sizeSuffixes = {"B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"};
private static final int[] sizeScales = {0, 0, 1, 1, 1, 2, 2, 2, 2};
private static final int RELATIVE_THRESHOLD_WARNING = 90;
private static final int RELATIVE_THRESHOLD_CRITICAL = 95;
private static final String MIME_TYPE_UNKNOWN = "Unknown type";
@ -231,7 +231,7 @@ public class DisplayUtils {
public static String convertIdn(String url, boolean toASCII) {
String urlNoDots = url;
String dots="";
String dots = "";
while (urlNoDots.startsWith(".")) {
urlNoDots = url.substring(1);
dots = dots + ".";
@ -360,8 +360,8 @@ public class DisplayUtils {
public static String getPathWithoutLastSlash(String path) {
// Remove last slash from path
if (path.length() > 1 && path.charAt(path.length()-1) == OCFile.PATH_SEPARATOR.charAt(0)) {
path = path.substring(0, path.length()-1);
if (path.length() > 1 && path.charAt(path.length() - 1) == OCFile.PATH_SEPARATOR.charAt(0)) {
path = path.substring(0, path.length() - 1);
}
return path;
}
@ -424,7 +424,7 @@ public class DisplayUtils {
if (seekBar != null && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
colorPreLollipopHorizontalProgressBar(seekBar);
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
int color = seekBar.getResources().getColor(R.color.color_accent);
seekBar.getThumb().setColorFilter(color, PorterDuff.Mode.SRC_IN);
seekBar.getThumb().setColorFilter(color, PorterDuff.Mode.SRC_IN);
@ -484,6 +484,7 @@ public class DisplayUtils {
public interface AvatarGenerationListener {
void avatarGenerated(Drawable avatarDrawable, Object callContext);
boolean shouldCallGeneratedCallback(String tag, Object callContext);
}

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;
@ -218,7 +217,7 @@ public class FileStorageUtils {
public static OCFile fillOCFile(RemoteFile remote) {
OCFile file = new OCFile(remote.getRemotePath());
file.setCreationTimestamp(remote.getCreationTimestamp());
if (remote.getMimeType().equalsIgnoreCase(MimeType.DIRECTORY)){
if (remote.getMimeType().equalsIgnoreCase(MimeType.DIRECTORY)) {
file.setFileLength(remote.getSize());
} else {
file.setFileLength(remote.getLength());
@ -238,7 +237,7 @@ public class FileStorageUtils {
* @param ocFile OCFile
* @return New RemoteFile instance representing the resource described by ocFile.
*/
public static RemoteFile fillRemoteFile(OCFile ocFile){
public static RemoteFile fillRemoteFile(OCFile ocFile) {
RemoteFile file = new RemoteFile(ocFile.getRemotePath());
file.setCreationTimestamp(ocFile.getCreationTimestamp());
file.setLength(ocFile.getFileLength());
@ -267,8 +266,8 @@ public class FileStorageUtils {
/**
* Sorts all filenames, regarding last user decision
*/
public static Vector<OCFile> sortOcFolder(Vector<OCFile> files){
switch (mSortOrder){
public static Vector<OCFile> sortOcFolder(Vector<OCFile> files) {
switch (mSortOrder) {
case 0:
files = FileStorageUtils.sortOCFilesByName(files);
break;
@ -290,8 +289,8 @@ public class FileStorageUtils {
*
* @param files of files to sort
*/
public static File[] sortLocalFolder(File[] files){
switch (mSortOrder){
public static File[] sortLocalFolder(File[] files) {
switch (mSortOrder) {
case 0:
files = FileStorageUtils.sortLocalFilesByName(files);
break;
@ -311,7 +310,7 @@ public class FileStorageUtils {
*
* @param files list of files to sort
*/
public static Vector<OCFile> sortOCFilesByDate(Vector<OCFile> files){
public static Vector<OCFile> sortOCFilesByDate(Vector<OCFile> files) {
final int multiplier = mSortAscending ? 1 : -1;
Collections.sort(files, new Comparator<OCFile>() {
@ -330,7 +329,7 @@ public class FileStorageUtils {
*
* @param filesArray list of files to sort
*/
public static File[] sortLocalFilesByDate(File[] filesArray){
public static File[] sortLocalFilesByDate(File[] filesArray) {
final int multiplier = mSortAscending ? 1 : -1;
List<File> files = new ArrayList<File>(Arrays.asList(filesArray));
@ -352,7 +351,7 @@ public class FileStorageUtils {
*
* @param files list of files to sort
*/
public static Vector<OCFile> sortOCFilesBySize(Vector<OCFile> files){
public static Vector<OCFile> sortOCFilesBySize(Vector<OCFile> files) {
final int multiplier = mSortAscending ? 1 : -1;
Collections.sort(files, new Comparator<OCFile>() {
@ -414,7 +413,7 @@ public class FileStorageUtils {
* @param files files to sort
*/
@SuppressFBWarnings(value = "Bx")
public static Vector<OCFile> sortOCFilesByName(Vector<OCFile> files){
public static Vector<OCFile> sortOCFilesByName(Vector<OCFile> files) {
final int multiplier = mSortAscending ? 1 : -1;
Collections.sort(files, new Comparator<OCFile>() {
@ -466,7 +465,7 @@ public class FileStorageUtils {
*
* @param files files to sort
*/
public static Vector<OCFile> sortOCFilesByFavourite(Vector<OCFile> files){
public static Vector<OCFile> sortOCFilesByFavourite(Vector<OCFile> files) {
Collections.sort(files, new Comparator<OCFile>() {
public int compare(OCFile o1, OCFile o2) {
if (o1.getIsFavorite() && o2.getIsFavorite()) {

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;
@ -86,11 +85,9 @@ public class GetShareWithUsersAsyncTask extends AsyncTask<Object, Void, Pair<Rem
@Override
protected void onPostExecute(Pair<RemoteOperation, RemoteOperationResult> result) {
if (result!= null)
{
if (result != null) {
OnRemoteOperationListener listener = mListener.get();
if (listener!= null)
{
if (listener != null) {
listener.onRemoteOperationFinish(result.first, result.second);
}
}

View file

@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;

View file

@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;

View file

@ -16,7 +16,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;

View file

@ -20,7 +20,6 @@ public class PermissionUtil {
* Determine whether <em>the app</em> has been granted a particular permission.
*
* @param permission The name of the permission being checked.
*
* @return <code>true</code> if app has the permission, or <code>false</code> if not.
*/
public static boolean checkSelfPermission(Context context, String permission) {

View file

@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;

View file

@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.utils;
@ -60,7 +59,7 @@ public class UriUtils {
Cursor cursor = null;
final String column = "_data";
final String[] projection = { column };
final String[] projection = {column};
try {
cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null);
@ -167,7 +166,7 @@ public class UriUtils {
}
final String selection = "_id=?";
final String[] selectionArgs = new String[] { split[1] };
final String[] selectionArgs = new String[]{split[1]};
return UriUtils.getDataColumn(context, contentUri, selection, selectionArgs);
}
@ -194,7 +193,6 @@ public class UriUtils {
}
public static String getDisplayNameForUri(Uri uri, Context context) {
if (uri == null || context == null) {

View file

@ -15,17 +15,10 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.widgets;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@ -36,6 +29,12 @@ import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.EditText;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class ActionEditText extends EditText {
private String s;
private String optionOneString;

View file

@ -39,7 +39,7 @@
<bool name="show_whats_new">true</bool>
<bool name="show_external_links">true</bool>
// Contacts backup
<!-- Contacts backup -->
<bool name="contacts_backup">true</bool>
<string name="contacts_backup_folder">/Contacts-Backup</string>
<integer name="contacts_backup_expire">-1</integer>
@ -119,7 +119,7 @@
<string name="report_issue_link" translatable="false">https://github.com/nextcloud/android/issues</string>
<!-- login data links -->
<string name="login_data_own_scheme" translatable="false">cloud</string>
<string name="login_data_own_scheme" translatable="false">nc</string>
<!-- url for webview login, with the protocol prefix
If set, will replace all other login methods available -->
<string name="webview_login_url" translatable="false"></string>

View file

@ -23,12 +23,15 @@
android:versionName="1.4.2">
<application
android:name=".MainApp"
android:name=".ModifiedMainApp"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:fullBackupContent="@xml/backup_config"
android:theme="@style/Theme.ownCloud.Toolbar"
tools:node="replace"
android:manageSpaceActivity="com.owncloud.android.ui.activity.ManageSpaceActivity">
<activity
android:name=".ui.activity.ModifiedFileDisplayActivity"
android:label="@string/app_name"

View file

@ -0,0 +1,40 @@
/**
* Nextcloud Android client application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.owncloud.android;
import com.google.firebase.analytics.FirebaseAnalytics;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
public class ModifiedMainApp extends MainApp {
@SuppressFBWarnings("ST")
public void onCreate() {
super.onCreate();
if (!getResources().getBoolean(R.bool.analytics_enabled)) {
FirebaseAnalytics.getInstance(this).setAnalyticsCollectionEnabled(false);
}
}
}

View file

@ -0,0 +1,32 @@
/**
* Nextcloud Android client application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.owncloud.android.utils;
import android.app.Activity;
import com.google.firebase.analytics.FirebaseAnalytics;
public class AnalyticsUtils {
public static void setCurrentScreenName(Activity activity, String s, String s1) {
FirebaseAnalytics.getInstance(activity).setCurrentScreen(activity, s, s1);
}
}

View file

@ -39,7 +39,7 @@
<!-- To fill if you want to show webviews instead of regular welcome views -->
<array name="whatsnew_urls"></array>
// Contacts backup
<!-- Contacts backup -->
<bool name="contacts_backup">true</bool>
<string name="contacts_backup_folder">/Contacts-Backup</string>
<integer name="contacts_backup_expire">30</integer>

Some files were not shown because too many files have changed in this diff Show more