mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Merge branch 'develop' into fixForCrashedSharedContents
Conflicts: src/com/owncloud/android/Uploader.java
This commit is contained in:
commit
65f403bf99
206 changed files with 7246 additions and 6043 deletions
|
@ -1,166 +1,173 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
ownCloud Android client application
|
||||
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<manifest package="com.owncloud.android"
|
||||
android:versionCode="104000"
|
||||
android:versionName="1.4.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
||||
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.READ_SYNC_STATS" />
|
||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="13" />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
|
||||
</uses-permission>
|
||||
|
||||
<application
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.ownCloud">
|
||||
<activity
|
||||
android:name=".ui.activity.FileDisplayActivity"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.UploadFilesActivity">
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.InstantUploadActivity">
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.FailedUploadActivity" android:theme="@android:style/Theme.Dialog" android:excludeFromRecents="true"/>
|
||||
<activity android:name=".Uploader" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" >
|
||||
</action>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" >
|
||||
</category>
|
||||
|
||||
<data android:mimeType="*/*" >
|
||||
</data>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND_MULTIPLE" >
|
||||
</action>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" >
|
||||
</category>
|
||||
|
||||
<data android:mimeType="*/*" >
|
||||
</data>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activity.Preferences"
|
||||
android:theme="@style/Theme.ownCloud" >
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.PreferencesNewSessionewSession" >
|
||||
</activity>
|
||||
|
||||
<activity android:name="com.owncloud.android.ui.preview.PreviewImageActivity" />
|
||||
|
||||
<activity android:name="com.owncloud.android.ui.preview.PreviewVideoActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name=".authenticator.AccountAuthenticatorService"
|
||||
android:exported="true">
|
||||
<intent-filter android:priority="100">
|
||||
<action android:name="android.accounts.AccountAuthenticator" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.accounts.AccountAuthenticator"
|
||||
android:resource="@xml/authenticator" />
|
||||
</service>
|
||||
<service
|
||||
android:name=".syncadapter.FileSyncService"
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="android.content.SyncAdapter" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.content.SyncAdapter"
|
||||
android:resource="@xml/syncadapter_files" />
|
||||
</service>
|
||||
|
||||
<provider
|
||||
android:name=".providers.FileContentProvider"
|
||||
android:authorities="org.owncloud"
|
||||
android:enabled="true"
|
||||
android:exported="false"
|
||||
android:label="@string/sync_string_files"
|
||||
android:syncable="true" >
|
||||
</provider>
|
||||
|
||||
<activity
|
||||
android:name=".ui.activity.AuthenticatorActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.ownCloud.noActionBar" >
|
||||
<intent-filter>
|
||||
<action android:name="com.owncloud.android.workaround.accounts.CREATE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service android:name=".files.services.FileDownloader" />
|
||||
<service android:name=".files.services.FileUploader" />
|
||||
<service android:name=".media.MediaService" />
|
||||
|
||||
<activity android:name=".ui.activity.FileDetailActivity" />
|
||||
<activity android:name=".ui.activity.PinCodeActivity" />
|
||||
<activity android:name=".extensions.ExtensionsAvailableActivity"></activity>
|
||||
<activity android:name=".extensions.ExtensionsListActivity"></activity>
|
||||
<activity android:name=".ui.activity.AccountSelectActivity" android:uiOptions="none" android:label="@string/prefs_accounts"></activity>
|
||||
<activity android:name=".ui.activity.ConflictsResolveActivity"/>
|
||||
<activity android:name=".ui.activity.GenericExplanationActivity"/>
|
||||
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
ownCloud Android client application
|
||||
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<manifest package="com.owncloud.android"
|
||||
android:versionCode="104000"
|
||||
android:versionName="1.4.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
||||
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.READ_SYNC_STATS" />
|
||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="13" />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
|
||||
</uses-permission>
|
||||
|
||||
<application
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.ownCloud">
|
||||
<activity
|
||||
android:name=".ui.activity.FileDisplayActivity"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.UploadFilesActivity">
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.InstantUploadActivity">
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.FailedUploadActivity" android:theme="@android:style/Theme.Dialog" android:excludeFromRecents="true"/>
|
||||
<activity android:name=".Uploader" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" >
|
||||
</action>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" >
|
||||
</category>
|
||||
|
||||
<data android:mimeType="*/*" >
|
||||
</data>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND_MULTIPLE" >
|
||||
</action>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" >
|
||||
</category>
|
||||
|
||||
<data android:mimeType="*/*" >
|
||||
</data>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activity.Preferences"
|
||||
android:theme="@style/Theme.ownCloud" >
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.PreferencesNewSessionewSession" >
|
||||
</activity>
|
||||
|
||||
<activity android:name="com.owncloud.android.ui.preview.PreviewImageActivity" />
|
||||
|
||||
<activity android:name="com.owncloud.android.ui.preview.PreviewVideoActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name=".authentication.AccountAuthenticatorService"
|
||||
android:exported="true">
|
||||
<intent-filter android:priority="100">
|
||||
<action android:name="android.accounts.AccountAuthenticator" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.accounts.AccountAuthenticator"
|
||||
android:resource="@xml/authenticator" />
|
||||
</service>
|
||||
<service
|
||||
android:name=".syncadapter.FileSyncService"
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="android.content.SyncAdapter" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.content.SyncAdapter"
|
||||
android:resource="@xml/syncadapter_files" />
|
||||
</service>
|
||||
|
||||
<provider
|
||||
android:name=".providers.FileContentProvider"
|
||||
android:authorities="org.owncloud"
|
||||
android:enabled="true"
|
||||
android:exported="false"
|
||||
android:label="@string/sync_string_files"
|
||||
android:syncable="true" >
|
||||
</provider>
|
||||
|
||||
<activity
|
||||
android:name=".authentication.AuthenticatorActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.ownCloud.noActionBar"
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="@string/oauth2_redirect_scheme" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="com.owncloud.android.workaround.accounts.CREATE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service android:name=".files.services.FileDownloader" />
|
||||
<service android:name=".files.services.FileUploader" />
|
||||
<service android:name=".media.MediaService" />
|
||||
|
||||
<activity android:name=".ui.activity.FileDetailActivity" />
|
||||
<activity android:name=".ui.activity.PinCodeActivity" />
|
||||
<activity android:name=".extensions.ExtensionsAvailableActivity"></activity>
|
||||
<activity android:name=".extensions.ExtensionsListActivity"></activity>
|
||||
<activity android:name=".ui.activity.AccountSelectActivity" android:uiOptions="none" android:label="@string/prefs_accounts"></activity>
|
||||
<activity android:name=".ui.activity.ConflictsResolveActivity"/>
|
||||
<activity android:name=".ui.activity.GenericExplanationActivity"/>
|
||||
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
|
||||
|
||||
<activity android:name=".ui.activity.LogHistoryActivity"/>
|
||||
|
||||
<service android:name=".files.services.InstantUploadService" />
|
||||
<receiver android:name=".files.InstantUploadBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.camera.NEW_PICTURE" />
|
||||
<data android:mimeType="image/*" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".files.BootupBroadcastReceiver">
|
||||
|
@ -169,6 +176,7 @@
|
|||
</intent-filter>
|
||||
</receiver>
|
||||
<service android:name=".files.services.FileObserverService"/>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
|
|
@ -294,10 +294,9 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
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
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
###########
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License verions 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
* Copyright (C) 2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
ownCloud Android client application
|
||||
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -17,177 +16,223 @@
|
|||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:oc="http://schemas.android.com/apk/res/com.owncloud.android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:focusable="true"
|
||||
android:gravity="center|fill"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="7dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/owncloud_logo" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/LinearLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/host_URL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_host_url"
|
||||
android:inputType="textNoSuggestions">
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/refreshButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:src="@drawable/ic_action_refresh_black"
|
||||
android:visibility="invisible" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/action_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:src="@android:drawable/stat_notify_sync"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/auth_login_details"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_username"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_password"
|
||||
android:inputType="textPassword"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/viewPassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:src="@android:drawable/ic_menu_view"
|
||||
android:visibility="invisible" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonCancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".5"
|
||||
android:onClick="onCancelClick"
|
||||
android:text="@string/common_cancel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonOK"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".5"
|
||||
android:enabled="false"
|
||||
android:onClick="onOkClick"
|
||||
android:text="@string/setup_btn_connect"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/account_register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/buttons_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:onClick="onRegisterClick"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textColor="#0000FF"
|
||||
android:background="@android:color/transparent" />
|
||||
<!-- android:text="@string/app_name @string/auth_register" /-->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:oc="http://schemas.android.com/apk/res/com.owncloud.android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:focusable="true"
|
||||
android:gravity="center|fill"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="7dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/owncloud_logo" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/LinearLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/hostUrlInput"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_host_url"
|
||||
android:inputType="textNoSuggestions">
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/refreshButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:src="@drawable/ic_action_refresh_black"
|
||||
android:onClick="onRefreshClick"
|
||||
android:visibility="invisible" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/action_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:src="@android:drawable/stat_notify_sync"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/oauth_onOff_check"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:onClick="onCheckClick"
|
||||
android:text="@string/oauth_check_onoff"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/auth_login_details"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/oAuthEntryPoint_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:text="@string/oauth2_url_endpoint_auth"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/oAuthEntryPoint_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:text="@string/oauth2_url_endpoint_access"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_username"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_password"
|
||||
android:inputType="textPassword"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/viewPasswordButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:src="@android:drawable/ic_menu_view"
|
||||
android:onClick="onViewPasswordClick"
|
||||
android:visibility="invisible" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/auth_status_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_placeholder"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:drawableLeft="@android:drawable/stat_notify_sync"
|
||||
android:drawablePadding="5dip"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonOK"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".5"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:enabled="false"
|
||||
android:onClick="onOkClick"
|
||||
android:text="@string/setup_btn_connect"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/account_register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/buttons_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:onClick="onRegisterClick"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textColor="#0000FF"
|
||||
android:background="@android:color/transparent" />
|
||||
<!-- android:text="@string/app_name @string/auth_register" /-->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
ownCloud Android client application
|
||||
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -17,175 +16,238 @@
|
|||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:focusable="true"
|
||||
android:gravity="center|fill"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/LinearLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/owncloud_logo" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/host_URL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_host_url"
|
||||
android:inputType="textNoSuggestions" >
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/refreshButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_action_refresh_black"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/action_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:src="@android:drawable/stat_notify_sync"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/auth_login_details"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_username"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_password"
|
||||
android:inputType="textPassword"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/viewPassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:src="@android:drawable/ic_menu_view"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="1" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonCancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".5"
|
||||
android:onClick="onCancelClick"
|
||||
android:text="@string/common_cancel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonOK"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".5"
|
||||
android:enabled="false"
|
||||
android:onClick="onOkClick"
|
||||
android:text="@string/setup_btn_connect"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/account_register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/buttons_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:onClick="onRegisterClick"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textColor="#0000FF"
|
||||
android:background="@android:color/transparent" />
|
||||
<!-- android:text="@string/app_name @string/auth_register" /-->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
-->
|
||||
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="50dip"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/LinearLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/owncloud_logo" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/hostUrlInput"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_host_url"
|
||||
android:inputType="textNoSuggestions" >
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/refreshButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_action_refresh_black"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/action_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:src="@android:drawable/stat_notify_sync"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/oauth_onOff_check"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:onClick="onCheckClick"
|
||||
android:text="@string/oauth_check_onoff"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/auth_login_details"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/oAuthEntryPoint_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:text="@string/oauth2_url_endpoint_auth"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/oAuthEntryPoint_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:text="@string/oauth2_url_endpoint_access"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_username"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/auth_password"
|
||||
android:inputType="textPassword"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/viewPasswordButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:src="@android:drawable/ic_menu_view"
|
||||
android:onClick="onViewPasswordClick"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/auth_status_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_placeholder"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:drawableLeft="@android:drawable/stat_notify_sync"
|
||||
android:drawablePadding="5dip"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonOK"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:enabled="false"
|
||||
android:onClick="onOkClick"
|
||||
android:text="@string/setup_btn_connect"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/account_register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/buttons_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:onClick="onRegisterClick"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textColor="#0000FF"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/account_register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/buttons_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:onClick="onRegisterClick"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textColor="#0000FF"
|
||||
android:background="@android:color/transparent" />
|
||||
<!-- android:text="@string/app_name @string/auth_register" /-->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
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
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
19
res/layout/log_item.xml
Normal file
19
res/layout/log_item.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView android:id="@+id/log_item_single"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:textStyle="bold"
|
||||
android:textSize="22dp"
|
||||
android:textColor="#000000"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp" />
|
||||
|
||||
</LinearLayout>
|
34
res/layout/log_send_file.xml
Normal file
34
res/layout/log_send_file.xml
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp">
|
||||
|
||||
|
||||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<TextView android:id="@android:id/empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FF0000"
|
||||
android:text="No data"/>
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="bottom">
|
||||
|
||||
<Button android:id="@+id/deleteLogHistoryButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/prefs_log_delete_history_button"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
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
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -24,7 +23,6 @@
|
|||
<item android:id="@+id/action_create_dir" android:title="@string/actionbar_mkdir" android:icon="@drawable/ic_action_create_dir" android:orderInCategory="2" />
|
||||
<item android:id="@+id/action_upload" android:title="@string/actionbar_upload" android:icon="@drawable/ic_action_upload" android:orderInCategory="2" />
|
||||
<item android:id="@+id/action_settings" android:title="@string/actionbar_settings" android:icon="@android:drawable/ic_menu_preferences" android:orderInCategory="2" />
|
||||
<item android:id="@+id/action_about_app" android:title="@string/about_title" android:icon="@android:drawable/ic_menu_info_details" android:orderInCategory="2" />
|
||||
|
||||
<!-- <item android:id="@+id/search" android:title="@string/actionbar_search" android:icon="@drawable/ic_action_search"></item>-->
|
||||
</menu>
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
23
res/values/oauth2_configuration.xml
Normal file
23
res/values/oauth2_configuration.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Flag to configure OAuth availability in the app.
|
||||
3 valid values now: on, off, optional
|
||||
-->
|
||||
<string name="oauth2_mode">off</string>
|
||||
|
||||
<!-- constants that must be respected by the authorization server; if changed, the app must be rebuild -->
|
||||
<string name="oauth2_redirect_scheme">owncloud</string>
|
||||
<string name="oauth2_redirect_uri">owncloud://callback</string>
|
||||
|
||||
<!-- values that should be provided by ownCloud server -->
|
||||
<string name="oauth2_url_endpoint_auth">http://oauth2.authorization.server.org/paht/to/endpoint/for/authorization</string>
|
||||
<string name="oauth2_url_endpoint_access">http://oauth2.authorization.server.org/paht/to/endporint/for/access/token</string>
|
||||
<string name="oauth2_scope">owncloud</string>
|
||||
<string name="oauth2_grant_type">authorization_code</string> <!-- the only one supported right now -->
|
||||
<string name="oauth2_response_type">code</string> <!-- depends on oauth2_grant_type -->
|
||||
|
||||
<!-- values that should be pre-agreed between app and authorization server, but can be loaded without rebuilding the app -->
|
||||
<string name="oauth2_client_id">com.owncloud.android</string> <!-- preferable that client decides this -->
|
||||
<string name="oauth2_client_secret"></string> <!-- preferable that client decides this -->
|
||||
|
||||
</resources>
|
|
@ -14,7 +14,8 @@
|
|||
<string name="main_settings">Settings</string>
|
||||
<string name="main_tit_accsetup">Setup Account</string>
|
||||
<string name="main_wrn_accsetup">There is no account set up on your device. In order to use this App, you need to create one.</string>
|
||||
<string name="about_message">%1$s Android App\n\nversion: %2$s</string>
|
||||
<string name="about_android">%1$s Android App</string>
|
||||
<string name="about_version">version %1$s</string>
|
||||
<string name="actionbar_sync">Refresh</string>
|
||||
<string name="actionbar_upload">Upload</string>
|
||||
<string name="actionbar_upload_from_apps">Content from other apps</string>
|
||||
|
@ -40,7 +41,13 @@
|
|||
<string name="prefs_pincode_summary">Protect your client</string>
|
||||
<string name="prefs_instant_upload">Enable instant uploads</string>
|
||||
<string name="prefs_instant_upload_summary">Instantly upload photos taken by camera</string>
|
||||
<string name="auth_host_url">URL</string>
|
||||
<string name="prefs_log_title">Enable Logging</string>
|
||||
<string name="prefs_log_summary">This is used to log problems</string>
|
||||
<string name="prefs_log_title_history">Logging History</string>
|
||||
<string name="prefs_log_summary_history">This shows the recorded logs</string>
|
||||
<string name="prefs_log_delete_history_button">Delete History</string>
|
||||
|
||||
<string name="auth_host_url">Server address</string>
|
||||
<string name="auth_username">Username</string>
|
||||
<string name="auth_password">Password</string>
|
||||
<string name="auth_register">I am new to %1$s</string>
|
||||
|
@ -111,8 +118,9 @@
|
|||
<string name="sync_string_contacts">Contacts</string>
|
||||
<string name="sync_fail_ticker">Synchronization failed</string>
|
||||
<string name="sync_fail_content">Synchronization of %1$s could not be completed</string>
|
||||
<string name="sync_conflicts_in_favourites_ticker">Conflicts found</string>
|
||||
<string name="sync_conflicts_in_favourites_content">%1$d kept-in-sync files could not be sync\'ed</string>
|
||||
<string name="sync_fail_content_unauthorized">Invalid credentials for %1$s</string>
|
||||
<string name="sync_conflicts_in_favourites_ticker">Conflicts found</string>
|
||||
<string name="sync_conflicts_in_favourites_content">%1$d kept-in-sync files could not be sync\'ed</string>
|
||||
<string name="sync_fail_in_favourites_ticker">Kept-in-sync files failed</string>
|
||||
<string name="sync_fail_in_favourites_content">Contents of %1$d files could not be sync\'ed (%2$d conflicts)</string>
|
||||
<string name="sync_foreign_files_forgotten_ticker">Some local files were forgotten</string>
|
||||
|
@ -169,14 +177,14 @@
|
|||
<item>60</item>
|
||||
</string-array>
|
||||
|
||||
<string name="auth_trying_to_login">Trying to login…</string>
|
||||
<string name="auth_trying_to_login">Trying to login...</string>
|
||||
<string name="auth_no_net_conn_title">No network connection</string>
|
||||
<string name="auth_no_net_conn_message">No network connection has been detected, check your Internet connection and try again.</string>
|
||||
<string name="auth_connect_anyway">Connect anyway</string>
|
||||
<string name="auth_nossl_plain_ok_title">Secure connection unavailable.</string>
|
||||
<string name="auth_nossl_plain_ok_message">The Application cannot establish a secure connection to the server. A non secure connection is available. You may continue or cancel.</string>
|
||||
<string name="auth_connection_established">Connection established</string>
|
||||
<string name="auth_testing_connection">Testing connection…</string>
|
||||
<string name="auth_testing_connection">Testing connection...</string>
|
||||
<string name="auth_not_configured_title">Malformed server configuration</string>
|
||||
<string name="auth_not_configured_message">It seems that your server instance is not correctly configured. Contact your administrator for more details.</string>
|
||||
<string name="auth_unknown_error_title">Unknown error occurred!</string>
|
||||
|
@ -193,9 +201,15 @@
|
|||
<string name="auth_wrong_connection_title">Couldn\'t establish connection</string>
|
||||
<string name="auth_secure_connection">Secure connection established</string>
|
||||
<string name="auth_login_details">Login details</string>
|
||||
<string name="auth_unauthorized">Invalid login / password</string>
|
||||
<string name="auth_unauthorized">Invalid credentials</string>
|
||||
<string name="auth_oauth_error">Unsuccessful authorization</string>
|
||||
<string name="auth_oauth_error_access_denied">Access denied by authorization server</string>
|
||||
<string name="auth_not_found">Wrong path given</string>
|
||||
<string name="auth_internal">Internal server error, code %1$d</string>
|
||||
<string name="auth_wtf_reenter_URL">Unexpected state; please, enter the server URL again</string>
|
||||
<string name="auth_expired_oauth_token_toast">Your authorization expired.\nPlease, authorize again</string>
|
||||
<string name="auth_expired_basic_auth_toast">Your saved credentials are invalid.\nPlease, enter the current credentials</string>
|
||||
|
||||
<string name="crashlog_message">Application terminated unexpectedly. Would you like to submit a crash report?</string>
|
||||
<string name="crashlog_send_report">Send report</string>
|
||||
<string name="crashlog_dont_send_report">Don\'t send report</string>
|
||||
|
@ -222,6 +236,13 @@
|
|||
<string name="wait_a_moment">Wait a moment</string>
|
||||
<string name="filedisplay_unexpected_bad_get_content">"Unexpected problem ; please select the file from a different app"</string>
|
||||
<string name="filedisplay_no_file_selected">No file was selected</string>
|
||||
|
||||
<string name="oauth_host_url">oAuth2 URL</string>
|
||||
<string name="oauth_check_onoff">Login with oAuth2.</string>
|
||||
<string name="oauth_login_connection">Connecting to oAuth2 server…</string>
|
||||
<string name="oauth_code_validation_message">Please, open a web browser and go to:\n%1$s.\nValidate this code there:\n%2$s</string>
|
||||
<string name="oauth_connection_url_unavailable">Connection to this URL not available.</string>
|
||||
|
||||
<string name="ssl_validator_title">Warning</string>
|
||||
<string name="ssl_validator_header">The identity of the site could not be verified</string>
|
||||
<string name="ssl_validator_reason_cert_not_trusted">- The server certificate is not trusted</string>
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -102,6 +101,10 @@
|
|||
<item name="android:singleLine">true</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="OAuthDialog" parent="@android:style/Theme.Dialog">
|
||||
<item name="android:windowNoTitle">false</item>
|
||||
</style>
|
||||
|
||||
<color name="setup_text_hint">#777777</color>
|
||||
<color name="setup_text_typed">#000000</color>
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -32,8 +31,19 @@
|
|||
<CheckBoxPreference android:key="instant_uploading"
|
||||
android:title="@string/prefs_instant_upload"
|
||||
android:summary="@string/prefs_instant_upload_summary"/>
|
||||
<CheckBoxPreference android:dependency="instant_uploading" android:disableDependentsState="true" android:title="@string/instant_upload_on_wifi" android:key="instant_upload_on_wifi"/>
|
||||
|
||||
<CheckBoxPreference android:dependency="instant_uploading"
|
||||
android:disableDependentsState="true"
|
||||
android:title="@string/instant_upload_on_wifi"
|
||||
android:key="instant_upload_on_wifi"/>
|
||||
<CheckBoxPreference android:key="log_to_file"
|
||||
android:title="@string/prefs_log_title"
|
||||
android:summary="@string/prefs_log_summary"/>
|
||||
<Preference android:key="log_history"
|
||||
android:title="@string/prefs_log_title_history"
|
||||
android:summary="@string/prefs_log_summary_history"/>
|
||||
<Preference android:id="@+id/about_app"
|
||||
android:title="@string/about_title"
|
||||
android:key="about_app" />
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -19,7 +18,7 @@
|
|||
|
||||
package com.owncloud.android;
|
||||
|
||||
import com.owncloud.android.authenticator.AccountAuthenticator;
|
||||
import com.owncloud.android.authentication.AccountAuthenticator;
|
||||
import com.owncloud.android.utils.OwnCloudVersion;
|
||||
|
||||
import android.accounts.Account;
|
||||
|
@ -32,6 +31,7 @@ public class AccountUtils {
|
|||
public static final String WEBDAV_PATH_1_2 = "/webdav/owncloud.php";
|
||||
public static final String WEBDAV_PATH_2_0 = "/files/webdav.php";
|
||||
public static final String WEBDAV_PATH_4_0 = "/remote.php/webdav";
|
||||
private static final String ODAV_PATH = "/remote.php/odav";
|
||||
public static final String CARDDAV_PATH_2_0 = "/apps/contacts/carddav.php";
|
||||
public static final String CARDDAV_PATH_4_0 = "/remote/carddav.php";
|
||||
public static final String STATUS_PATH = "/status.php";
|
||||
|
@ -113,8 +113,11 @@ public class AccountUtils {
|
|||
* @param version version of owncloud
|
||||
* @return webdav path for given OC version, null if OC version unknown
|
||||
*/
|
||||
public static String getWebdavPath(OwnCloudVersion version) {
|
||||
public static String getWebdavPath(OwnCloudVersion version, boolean supportsOAuth) {
|
||||
if (version != null) {
|
||||
if (supportsOAuth) {
|
||||
return ODAV_PATH;
|
||||
}
|
||||
if (version.compareTo(OwnCloudVersion.owncloud_v4) >= 0)
|
||||
return WEBDAV_PATH_4_0;
|
||||
if (version.compareTo(OwnCloudVersion.owncloud_v3) >= 0
|
||||
|
@ -137,8 +140,9 @@ public class AccountUtils {
|
|||
AccountManager ama = AccountManager.get(context);
|
||||
String baseurl = ama.getUserData(account, AccountAuthenticator.KEY_OC_BASE_URL);
|
||||
String strver = ama.getUserData(account, AccountAuthenticator.KEY_OC_VERSION);
|
||||
boolean supportsOAuth = (ama.getUserData(account, AccountAuthenticator.KEY_SUPPORTS_OAUTH2) != null);
|
||||
OwnCloudVersion ver = new OwnCloudVersion(strver);
|
||||
String webdavpath = getWebdavPath(ver);
|
||||
String webdavpath = getWebdavPath(ver, supportsOAuth);
|
||||
|
||||
if (webdavpath == null) return null;
|
||||
return baseurl + webdavpath;
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -25,8 +24,6 @@ import java.util.HashMap;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* A helper class for some string operations.
|
||||
*
|
||||
|
|
127
src/com/owncloud/android/Log_OC.java
Normal file
127
src/com/owncloud/android/Log_OC.java
Normal file
|
@ -0,0 +1,127 @@
|
|||
package com.owncloud.android;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
|
||||
public class Log_OC {
|
||||
|
||||
|
||||
private static boolean isEnabled = false;
|
||||
private static File logFile;
|
||||
private static File folder;
|
||||
private static BufferedWriter buf;
|
||||
|
||||
public static void i(String TAG, String message){
|
||||
// Printing the message to LogCat console
|
||||
Log.i(TAG, message);
|
||||
// Write the log message to the file
|
||||
appendLog(TAG+" : "+message);
|
||||
}
|
||||
|
||||
public static void d(String TAG, String message){
|
||||
Log.d(TAG, message);
|
||||
appendLog(TAG+" : "+message);
|
||||
}
|
||||
public static void d(String TAG, String message, Exception e) {
|
||||
Log.d(TAG, message, e);
|
||||
appendLog(TAG+" : "+ message+" Exception : "+e.getStackTrace());
|
||||
}
|
||||
public static void e(String TAG, String message){
|
||||
Log.e(TAG, message);
|
||||
appendLog(TAG+" : "+message);
|
||||
}
|
||||
|
||||
public static void e(String TAG, String message, Throwable e) {
|
||||
Log.e(TAG, message, e);
|
||||
appendLog(TAG+" : "+ message+" Exception : "+e.getStackTrace());
|
||||
}
|
||||
|
||||
public static void v(String TAG, String message){
|
||||
Log.v(TAG, message);
|
||||
appendLog(TAG+" : "+message);
|
||||
}
|
||||
|
||||
public static void w(String TAG, String message) {
|
||||
Log.w(TAG,message);
|
||||
appendLog(TAG+" : "+message);
|
||||
}
|
||||
|
||||
public static void wtf(String TAG, String message) {
|
||||
Log.wtf(TAG,message);
|
||||
appendLog(TAG+" : "+message);
|
||||
}
|
||||
|
||||
public static void startLogging(String logPath) {
|
||||
folder = new File(logPath);
|
||||
logFile = new File(folder+File.separator+"log.txt");
|
||||
|
||||
if (!folder.exists()) {
|
||||
folder.mkdirs();
|
||||
}
|
||||
if (logFile.exists()) {
|
||||
logFile.delete();
|
||||
}
|
||||
try {
|
||||
logFile.createNewFile();
|
||||
buf = new BufferedWriter(new FileWriter(logFile, true));
|
||||
isEnabled = true;
|
||||
appendPhoneInfo();
|
||||
}catch (IOException e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void stopLogging() {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss",Locale.getDefault());
|
||||
String currentDateandTime = sdf.format(new Date());
|
||||
if (logFile != null) {
|
||||
logFile.renameTo(new File(folder+File.separator+"Owncloud_"+currentDateandTime+".log"));
|
||||
|
||||
isEnabled = false;
|
||||
try {
|
||||
buf.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void appendPhoneInfo() {
|
||||
appendLog("Model : " + android.os.Build.MODEL);
|
||||
appendLog("Brand : " + android.os.Build.BRAND);
|
||||
appendLog("Product : " + android.os.Build.PRODUCT);
|
||||
appendLog("Device : " + android.os.Build.DEVICE);
|
||||
appendLog("Version-Codename : " + android.os.Build.VERSION.CODENAME);
|
||||
appendLog("Version-Release : " + android.os.Build.VERSION.RELEASE);
|
||||
}
|
||||
|
||||
private static void appendLog(String text) {
|
||||
if (isEnabled) {
|
||||
try {
|
||||
buf.append(text);
|
||||
buf.newLine();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -3,9 +3,8 @@
|
|||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -16,6 +15,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.owncloud.android;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -45,7 +45,6 @@ import android.os.Parcelable;
|
|||
import android.provider.MediaStore.Audio;
|
||||
import android.provider.MediaStore.Images;
|
||||
import android.provider.MediaStore.Video;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.AdapterView;
|
||||
|
@ -55,14 +54,13 @@ import android.widget.EditText;
|
|||
import android.widget.SimpleAdapter;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.authenticator.AccountAuthenticator;
|
||||
import com.owncloud.android.authentication.AccountAuthenticator;
|
||||
import com.owncloud.android.datamodel.DataStorageManager;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.files.services.FileUploader;
|
||||
import com.owncloud.android.network.OwnCloudClientUtils;
|
||||
|
||||
import eu.alefzero.webdav.WebdavClient;
|
||||
import com.owncloud.android.R;
|
||||
|
||||
/**
|
||||
* This can be used to upload things to an ownCloud instance.
|
||||
|
@ -86,7 +84,6 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
private final static int DIALOG_WAITING = 1;
|
||||
private final static int DIALOG_NO_STREAM = 2;
|
||||
private final static int DIALOG_MULTIPLE_ACCOUNT = 3;
|
||||
//private final static int DIALOG_GET_DIRNAME = 4;
|
||||
|
||||
private final static int REQUEST_CODE_SETUP_ACCOUNT = 0;
|
||||
|
||||
|
@ -96,16 +93,14 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||
mParents = new Stack<String>();
|
||||
mParents.add("");
|
||||
/*if (getIntent().hasExtra(Intent.EXTRA_STREAM)) {
|
||||
prepareStreamsToUpload();*/
|
||||
if (prepareStreamsToUpload()) {
|
||||
mAccountManager = (AccountManager) getSystemService(Context.ACCOUNT_SERVICE);
|
||||
Account[] accounts = mAccountManager.getAccountsByType(AccountAuthenticator.ACCOUNT_TYPE);
|
||||
if (accounts.length == 0) {
|
||||
Log.i(TAG, "No ownCloud account is available");
|
||||
Log_OC.i(TAG, "No ownCloud account is available");
|
||||
showDialog(DIALOG_NO_ACCOUNT);
|
||||
} else if (accounts.length > 1) {
|
||||
Log.i(TAG, "More then one ownCloud is available");
|
||||
Log_OC.i(TAG, "More then one ownCloud is available");
|
||||
showDialog(DIALOG_MULTIPLE_ACCOUNT);
|
||||
} else {
|
||||
mAccount = accounts[0];
|
||||
|
@ -141,8 +136,8 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
// in API7 < this constatant is defined in
|
||||
// Settings.ADD_ACCOUNT_SETTINGS
|
||||
// and Settings.EXTRA_AUTHORITIES
|
||||
Intent intent = new Intent("android.settings.ADD_ACCOUNT_SETTINGS");
|
||||
intent.putExtra("authorities", new String[] { AccountAuthenticator.AUTH_TOKEN_TYPE });
|
||||
Intent intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT);
|
||||
intent.putExtra("authorities", new String[] { AccountAuthenticator.AUTHORITY });
|
||||
startActivityForResult(intent, REQUEST_CODE_SETUP_ACCOUNT);
|
||||
} else {
|
||||
// since in API7 there is no direct call for
|
||||
|
@ -234,7 +229,7 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
// click on folder in the list
|
||||
Log.d(TAG, "on item click");
|
||||
Log_OC.d(TAG, "on item click");
|
||||
Vector<OCFile> tmpfiles = mStorageManager.getDirectoryContent(mFile);
|
||||
if (tmpfiles.size() <= 0) return;
|
||||
// filter on dirtype
|
||||
|
@ -257,7 +252,7 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
mUploadPath = ""; // first element in mParents is root dir, represented by ""; init mUploadPath with "/" results in a "//" prefix
|
||||
for (String p : mParents)
|
||||
mUploadPath += p + OCFile.PATH_SEPARATOR;
|
||||
Log.d(TAG, "Uploading file to dir " + mUploadPath);
|
||||
Log_OC.d(TAG, "Uploading file to dir " + mUploadPath);
|
||||
|
||||
uploadFiles();
|
||||
|
||||
|
@ -270,7 +265,7 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
Log.i(TAG, "result received. req: " + requestCode + " res: " + resultCode);
|
||||
Log_OC.i(TAG, "result received. req: " + requestCode + " res: " + resultCode);
|
||||
if (requestCode == REQUEST_CODE_SETUP_ACCOUNT) {
|
||||
dismissDialog(DIALOG_NO_ACCOUNT);
|
||||
if (resultCode == RESULT_CANCELED) {
|
||||
|
@ -296,7 +291,7 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
for (String a : mParents)
|
||||
full_path += a + "/";
|
||||
|
||||
Log.d(TAG, "Populating view with content of : " + full_path);
|
||||
Log_OC.d(TAG, "Populating view with content of : " + full_path);
|
||||
|
||||
mFile = mStorageManager.getFileByPath(full_path);
|
||||
if (mFile != null) {
|
||||
|
@ -333,15 +328,19 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
|
||||
public void uploadFiles() {
|
||||
try {
|
||||
WebdavClient webdav = OwnCloudClientUtils.createOwnCloudClient(mAccount, getApplicationContext());
|
||||
//WebdavClient webdav = OwnCloudClientUtils.createOwnCloudClient(mAccount, getApplicationContext());
|
||||
|
||||
ArrayList<String> local = new ArrayList<String>();
|
||||
ArrayList<String> remote = new ArrayList<String>();
|
||||
|
||||
/* TODO - mCreateDir can never be true at this moment; we will replace wdc.createDirectory by CreateFolderOperation when that is fixed
|
||||
WebdavClient wdc = OwnCloudClientUtils.createOwnCloudClient(mAccount, getApplicationContext());
|
||||
// create last directory in path if necessary
|
||||
if (mCreateDir) {
|
||||
webdav.createDirectory(mUploadPath);
|
||||
wdc.createDirectory(mUploadPath);
|
||||
}
|
||||
*/
|
||||
|
||||
// this checks the mimeType
|
||||
for (Parcelable mStream : mStreamsToUpload) {
|
||||
|
||||
|
@ -419,6 +418,7 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
startService(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
} catch (SecurityException e) {
|
||||
String message = String.format(getString(R.string.uploader_error_forbidden_content), getString(R.string.app_name));
|
||||
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
|
||||
|
|
|
@ -1,103 +1,122 @@
|
|||
/* ownCloud Android client application
|
||||
* Copyright (C) 2012 Bartek Przybylski
|
||||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 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 General Public License for more details.
|
||||
*
|
||||
* 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.authenticator;
|
||||
|
||||
import com.owncloud.android.ui.activity.AuthenticatorActivity;
|
||||
|
||||
import android.accounts.*;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
public class AccountAuthenticator extends AbstractAccountAuthenticator {
|
||||
/**
|
||||
* Is used by android system to assign accounts to authenticators. Should be
|
||||
* used by application and all extensions.
|
||||
*/
|
||||
public static final String ACCOUNT_TYPE = "owncloud";
|
||||
public static final String AUTH_TOKEN_TYPE = "org.owncloud";
|
||||
|
||||
public static final String KEY_AUTH_TOKEN_TYPE = "authTokenType";
|
||||
public static final String KEY_REQUIRED_FEATURES = "requiredFeatures";
|
||||
public static final String KEY_LOGIN_OPTIONS = "loginOptions";
|
||||
public static final String KEY_ACCOUNT = "account";
|
||||
/**
|
||||
* Value under this key should handle path to webdav php script. Will be
|
||||
* removed and usage should be replaced by combining
|
||||
* {@link com.owncloud.android.authenticator.AuthenticatorActivity.KEY_OC_BASE_URL} and
|
||||
* {@link com.owncloud.android.utils.OwnCloudVersion}
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public static final String KEY_OC_URL = "oc_url";
|
||||
/**
|
||||
* Version should be 3 numbers separated by dot so it can be parsed by
|
||||
* {@link com.owncloud.android.utils.OwnCloudVersion}
|
||||
*/
|
||||
public static final String KEY_OC_VERSION = "oc_version";
|
||||
/**
|
||||
* Base url should point to owncloud installation without trailing / ie:
|
||||
* http://server/path or https://owncloud.server
|
||||
*/
|
||||
public static final String KEY_OC_BASE_URL = "oc_base_url";
|
||||
|
||||
private static final String TAG = "AccountAuthenticator";
|
||||
private Context mContext;
|
||||
|
||||
public AccountAuthenticator(Context context) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Bundle addAccount(AccountAuthenticatorResponse response,
|
||||
String accountType, String authTokenType,
|
||||
String[] requiredFeatures, Bundle options)
|
||||
throws NetworkErrorException {
|
||||
Log.i(TAG, "Adding account with type " + accountType
|
||||
+ " and auth token " + authTokenType);
|
||||
try {
|
||||
validateAccountType(accountType);
|
||||
} catch (AuthenticatorException e) {
|
||||
Log.e(TAG, "Failed to validate account type " + accountType + ": "
|
||||
+ e.getMessage());
|
||||
e.printStackTrace();
|
||||
return e.getFailureBundle();
|
||||
}
|
||||
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
|
||||
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE,
|
||||
response);
|
||||
intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);
|
||||
intent.putExtra(KEY_REQUIRED_FEATURES, requiredFeatures);
|
||||
intent.putExtra(KEY_LOGIN_OPTIONS, options);
|
||||
|
||||
setIntentFlags(intent);
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putParcelable(AccountManager.KEY_INTENT, intent);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
/* ownCloud Android client application
|
||||
* Copyright (C) 2012 Bartek Przybylski
|
||||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* 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 General Public License for more details.
|
||||
*
|
||||
* 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.authentication;
|
||||
|
||||
import android.accounts.*;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import com.owncloud.android.Log_OC;
|
||||
|
||||
/**
|
||||
* Authenticator for ownCloud accounts.
|
||||
*
|
||||
* Controller class accessed from the system AccountManager, providing integration of ownCloud accounts with the Android system.
|
||||
*
|
||||
* TODO - better separation in operations for OAuth-capable and regular ownCloud accounts.
|
||||
* TODO - review completeness
|
||||
*
|
||||
* @author David A. Velasco
|
||||
*/
|
||||
public class AccountAuthenticator extends AbstractAccountAuthenticator {
|
||||
|
||||
/**
|
||||
* Is used by android system to assign accounts to authenticators. Should be
|
||||
* used by application and all extensions.
|
||||
*/
|
||||
public static final String ACCOUNT_TYPE = "owncloud";
|
||||
public static final String AUTHORITY = "org.owncloud";
|
||||
public static final String AUTH_TOKEN_TYPE = "org.owncloud";
|
||||
public static final String AUTH_TOKEN_TYPE_PASSWORD = "owncloud.password";
|
||||
public static final String AUTH_TOKEN_TYPE_ACCESS_TOKEN = "owncloud.oauth2.access_token";
|
||||
public static final String AUTH_TOKEN_TYPE_REFRESH_TOKEN = "owncloud.oauth2.refresh_token";
|
||||
|
||||
public static final String KEY_AUTH_TOKEN_TYPE = "authTokenType";
|
||||
public static final String KEY_REQUIRED_FEATURES = "requiredFeatures";
|
||||
public static final String KEY_LOGIN_OPTIONS = "loginOptions";
|
||||
public static final String KEY_ACCOUNT = "account";
|
||||
|
||||
/**
|
||||
* Value under this key should handle path to webdav php script. Will be
|
||||
* removed and usage should be replaced by combining
|
||||
* {@link com.owncloud.android.authentication.AuthenticatorActivity.KEY_OC_BASE_URL} and
|
||||
* {@link com.owncloud.android.utils.OwnCloudVersion}
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public static final String KEY_OC_URL = "oc_url";
|
||||
/**
|
||||
* Version should be 3 numbers separated by dot so it can be parsed by
|
||||
* {@link com.owncloud.android.utils.OwnCloudVersion}
|
||||
*/
|
||||
public static final String KEY_OC_VERSION = "oc_version";
|
||||
/**
|
||||
* Base url should point to owncloud installation without trailing / ie:
|
||||
* http://server/path or https://owncloud.server
|
||||
*/
|
||||
public static final String KEY_OC_BASE_URL = "oc_base_url";
|
||||
/**
|
||||
* Flag signaling if the ownCloud server can be accessed with OAuth2 access tokens.
|
||||
*/
|
||||
public static final String KEY_SUPPORTS_OAUTH2 = "oc_supports_oauth2";
|
||||
|
||||
private static final String TAG = AccountAuthenticator.class.getSimpleName();
|
||||
|
||||
private Context mContext;
|
||||
|
||||
public AccountAuthenticator(Context context) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Bundle addAccount(AccountAuthenticatorResponse response,
|
||||
String accountType, String authTokenType,
|
||||
String[] requiredFeatures, Bundle options)
|
||||
throws NetworkErrorException {
|
||||
Log_OC.i(TAG, "Adding account with type " + accountType
|
||||
+ " and auth token " + authTokenType);
|
||||
try {
|
||||
validateAccountType(accountType);
|
||||
} catch (AuthenticatorException e) {
|
||||
Log_OC.e(TAG, "Failed to validate account type " + accountType + ": "
|
||||
+ e.getMessage());
|
||||
e.printStackTrace();
|
||||
return e.getFailureBundle();
|
||||
}
|
||||
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
|
||||
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
|
||||
intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);
|
||||
intent.putExtra(KEY_REQUIRED_FEATURES, requiredFeatures);
|
||||
intent.putExtra(KEY_LOGIN_OPTIONS, options);
|
||||
intent.putExtra(AuthenticatorActivity.EXTRA_ACTION, AuthenticatorActivity.ACTION_CREATE);
|
||||
|
||||
setIntentFlags(intent);
|
||||
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putParcelable(AccountManager.KEY_INTENT, intent);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
@ -107,7 +126,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
|
|||
try {
|
||||
validateAccountType(account.type);
|
||||
} catch (AuthenticatorException e) {
|
||||
Log.e(TAG, "Failed to validate account type " + account.type + ": "
|
||||
Log_OC.e(TAG, "Failed to validate account type " + account.type + ": "
|
||||
+ e.getMessage());
|
||||
e.printStackTrace();
|
||||
return e.getFailureBundle();
|
||||
|
@ -131,96 +150,110 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle getAuthToken(AccountAuthenticatorResponse response,
|
||||
Account account, String authTokenType, Bundle options)
|
||||
throws NetworkErrorException {
|
||||
try {
|
||||
validateAccountType(account.type);
|
||||
validateAuthTokenType(authTokenType);
|
||||
} catch (AuthenticatorException e) {
|
||||
Log.e(TAG, "Failed to validate account type " + account.type + ": "
|
||||
+ e.getMessage());
|
||||
e.printStackTrace();
|
||||
return e.getFailureBundle();
|
||||
}
|
||||
final AccountManager am = AccountManager.get(mContext);
|
||||
final String password = am.getPassword(account);
|
||||
if (password != null) {
|
||||
final Bundle result = new Bundle();
|
||||
result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
|
||||
result.putString(AccountManager.KEY_ACCOUNT_TYPE, ACCOUNT_TYPE);
|
||||
result.putString(AccountManager.KEY_AUTHTOKEN, password);
|
||||
return result;
|
||||
}
|
||||
|
||||
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
|
||||
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE,
|
||||
response);
|
||||
intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);
|
||||
intent.putExtra(KEY_LOGIN_OPTIONS, options);
|
||||
intent.putExtra(AuthenticatorActivity.PARAM_USERNAME, account.name);
|
||||
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putParcelable(AccountManager.KEY_INTENT, intent);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuthTokenLabel(String authTokenType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle hasFeatures(AccountAuthenticatorResponse response,
|
||||
Account account, String[] features) throws NetworkErrorException {
|
||||
final Bundle result = new Bundle();
|
||||
result.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle updateCredentials(AccountAuthenticatorResponse response,
|
||||
Account account, String authTokenType, Bundle options)
|
||||
throws NetworkErrorException {
|
||||
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
|
||||
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE,
|
||||
response);
|
||||
intent.putExtra(KEY_ACCOUNT, account);
|
||||
intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);
|
||||
intent.putExtra(KEY_LOGIN_OPTIONS, options);
|
||||
setIntentFlags(intent);
|
||||
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putParcelable(AccountManager.KEY_INTENT, intent);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle getAccountRemovalAllowed(
|
||||
AccountAuthenticatorResponse response, Account account)
|
||||
throws NetworkErrorException {
|
||||
return super.getAccountRemovalAllowed(response, account);
|
||||
}
|
||||
|
||||
private void setIntentFlags(Intent intent) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
||||
intent.addFlags(Intent.FLAG_FROM_BACKGROUND);
|
||||
}
|
||||
|
||||
private void validateAccountType(String type)
|
||||
throws UnsupportedAccountTypeException {
|
||||
if (!type.equals(ACCOUNT_TYPE)) {
|
||||
throw new UnsupportedAccountTypeException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Bundle getAuthToken(AccountAuthenticatorResponse response,
|
||||
Account account, String authTokenType, Bundle options)
|
||||
throws NetworkErrorException {
|
||||
/// validate parameters
|
||||
try {
|
||||
validateAccountType(account.type);
|
||||
validateAuthTokenType(authTokenType);
|
||||
} catch (AuthenticatorException e) {
|
||||
Log_OC.e(TAG, "Failed to validate account type " + account.type + ": "
|
||||
+ e.getMessage());
|
||||
e.printStackTrace();
|
||||
return e.getFailureBundle();
|
||||
}
|
||||
|
||||
/// check if required token is stored
|
||||
final AccountManager am = AccountManager.get(mContext);
|
||||
String accessToken;
|
||||
if (authTokenType.equals(AUTH_TOKEN_TYPE_PASSWORD)) {
|
||||
accessToken = am.getPassword(account);
|
||||
} else {
|
||||
accessToken = am.peekAuthToken(account, authTokenType);
|
||||
}
|
||||
if (accessToken != null) {
|
||||
final Bundle result = new Bundle();
|
||||
result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
|
||||
result.putString(AccountManager.KEY_ACCOUNT_TYPE, ACCOUNT_TYPE);
|
||||
result.putString(AccountManager.KEY_AUTHTOKEN, accessToken);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// if not stored, return Intent to access the AuthenticatorActivity and UPDATE the token for the account
|
||||
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
|
||||
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
|
||||
intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);
|
||||
intent.putExtra(KEY_LOGIN_OPTIONS, options);
|
||||
intent.putExtra(AuthenticatorActivity.EXTRA_ACCOUNT, account);
|
||||
intent.putExtra(AuthenticatorActivity.EXTRA_ACTION, AuthenticatorActivity.ACTION_UPDATE_TOKEN);
|
||||
|
||||
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putParcelable(AccountManager.KEY_INTENT, intent);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuthTokenLabel(String authTokenType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle hasFeatures(AccountAuthenticatorResponse response,
|
||||
Account account, String[] features) throws NetworkErrorException {
|
||||
final Bundle result = new Bundle();
|
||||
result.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle updateCredentials(AccountAuthenticatorResponse response,
|
||||
Account account, String authTokenType, Bundle options)
|
||||
throws NetworkErrorException {
|
||||
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
|
||||
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE,
|
||||
response);
|
||||
intent.putExtra(KEY_ACCOUNT, account);
|
||||
intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);
|
||||
intent.putExtra(KEY_LOGIN_OPTIONS, options);
|
||||
setIntentFlags(intent);
|
||||
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putParcelable(AccountManager.KEY_INTENT, intent);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle getAccountRemovalAllowed(
|
||||
AccountAuthenticatorResponse response, Account account)
|
||||
throws NetworkErrorException {
|
||||
return super.getAccountRemovalAllowed(response, account);
|
||||
}
|
||||
|
||||
private void setIntentFlags(Intent intent) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
||||
intent.addFlags(Intent.FLAG_FROM_BACKGROUND);
|
||||
}
|
||||
|
||||
private void validateAccountType(String type)
|
||||
throws UnsupportedAccountTypeException {
|
||||
if (!type.equals(ACCOUNT_TYPE)) {
|
||||
throw new UnsupportedAccountTypeException();
|
||||
}
|
||||
}
|
||||
|
||||
private void validateAuthTokenType(String authTokenType)
|
||||
throws UnsupportedAuthTokenTypeException {
|
||||
if (!authTokenType.equals(AUTH_TOKEN_TYPE)) {
|
||||
if (!authTokenType.equals(AUTH_TOKEN_TYPE) &&
|
||||
!authTokenType.equals(AUTH_TOKEN_TYPE_PASSWORD) &&
|
||||
!authTokenType.equals(AUTH_TOKEN_TYPE_ACCESS_TOKEN) &&
|
||||
!authTokenType.equals(AUTH_TOKEN_TYPE_REFRESH_TOKEN) ) {
|
||||
throw new UnsupportedAuthTokenTypeException();
|
||||
}
|
||||
}
|
|
@ -3,9 +3,8 @@
|
|||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -17,7 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.owncloud.android.authenticator;
|
||||
package com.owncloud.android.authentication;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
1085
src/com/owncloud/android/authentication/AuthenticatorActivity.java
Normal file
1085
src/com/owncloud/android/authentication/AuthenticatorActivity.java
Normal file
File diff suppressed because it is too large
Load diff
53
src/com/owncloud/android/authentication/OAuth2Constants.java
Normal file
53
src/com/owncloud/android/authentication/OAuth2Constants.java
Normal file
|
@ -0,0 +1,53 @@
|
|||
/* ownCloud Android client application
|
||||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* 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 General Public License for more details.
|
||||
*
|
||||
* 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.authentication;
|
||||
|
||||
/**
|
||||
* Constant values for OAuth 2 protocol.
|
||||
*
|
||||
* Includes required and optional parameter NAMES used in the 'authorization code' grant type.
|
||||
*
|
||||
* @author David A. Velasco
|
||||
*/
|
||||
|
||||
public class OAuth2Constants {
|
||||
|
||||
/// Parameters to send to the Authorization Endpoint
|
||||
public static final String KEY_RESPONSE_TYPE = "response_type";
|
||||
public static final String KEY_REDIRECT_URI = "redirect_uri";
|
||||
public static final String KEY_CLIENT_ID = "client_id";
|
||||
public static final String KEY_SCOPE = "scope";
|
||||
public static final String KEY_STATE = "state";
|
||||
|
||||
/// Additional parameters to send to the Token Endpoint
|
||||
public static final String KEY_GRANT_TYPE = "grant_type";
|
||||
public static final String KEY_CODE = "code";
|
||||
|
||||
/// Parameters received in an OK response from the Token Endpoint
|
||||
public static final String KEY_ACCESS_TOKEN = "access_token";
|
||||
public static final String KEY_TOKEN_TYPE = "token_type";
|
||||
public static final String KEY_EXPIRES_IN = "expires_in";
|
||||
public static final String KEY_REFRESH_TOKEN = "refresh_token";
|
||||
|
||||
/// Parameters in an ERROR response
|
||||
public static final String KEY_ERROR = "error";
|
||||
public static final String KEY_ERROR_DESCRIPTION = "error_description";
|
||||
public static final String KEY_ERROR_URI = "error_uri";
|
||||
public static final String VALUE_ERROR_ACCESS_DENIED = "access_denied";
|
||||
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/* ownCloud Android client application
|
||||
* Copyright (C) 2012 Bartek Przybylski
|
||||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 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 General Public License for more details.
|
||||
*
|
||||
* 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.authenticator;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.network.OwnCloudClientUtils;
|
||||
|
||||
import eu.alefzero.webdav.WebdavClient;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
|
||||
public class AuthenticationRunnable implements Runnable {
|
||||
|
||||
private OnAuthenticationResultListener mListener;
|
||||
private Handler mHandler;
|
||||
private URL mUrl;
|
||||
private String mUsername;
|
||||
private String mPassword;
|
||||
private Context mContext;
|
||||
|
||||
public AuthenticationRunnable(URL url, String username, String password, Context context) {
|
||||
mListener = null;
|
||||
mUrl = url;
|
||||
mUsername = username;
|
||||
mPassword = password;
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
public void setOnAuthenticationResultListener(
|
||||
OnAuthenticationResultListener listener, Handler handler) {
|
||||
mListener = listener;
|
||||
mHandler = handler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Uri uri;
|
||||
uri = Uri.parse(mUrl.toString());
|
||||
WebdavClient wdc = OwnCloudClientUtils.createOwnCloudClient(uri, mUsername, mPassword, mContext);
|
||||
int login_result = wdc.tryToLogin();
|
||||
switch (login_result) {
|
||||
case HttpStatus.SC_OK:
|
||||
postResult(true, uri.toString());
|
||||
break;
|
||||
case HttpStatus.SC_UNAUTHORIZED:
|
||||
postResult(false, mContext.getString(R.string.auth_unauthorized));
|
||||
break;
|
||||
case HttpStatus.SC_NOT_FOUND:
|
||||
postResult(false, mContext.getString(R.string.auth_not_found));
|
||||
break;
|
||||
default:
|
||||
postResult(false, String.format(mContext.getString(R.string.auth_internal), login_result));
|
||||
}
|
||||
}
|
||||
|
||||
private void postResult(final boolean success, final String message) {
|
||||
if (mHandler != null && mListener != null) {
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mListener.onAuthenticationResult(success, message);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
/* ownCloud Android client application
|
||||
* Copyright (C) 2012 Bartek Przybylski
|
||||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 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 General Public License for more details.
|
||||
*
|
||||
* 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.authenticator;
|
||||
|
||||
public interface OnAuthenticationResultListener {
|
||||
|
||||
public void onAuthenticationResult(boolean success, String message);
|
||||
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
/* ownCloud Android client application
|
||||
* Copyright (C) 2012 Bartek Przybylski
|
||||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 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 General Public License for more details.
|
||||
*
|
||||
* 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.authenticator;
|
||||
|
||||
public interface OnConnectCheckListener {
|
||||
|
||||
enum ResultType {
|
||||
OK_SSL, OK_NO_SSL, SSL_INIT_ERROR, HOST_NOT_AVAILABLE, TIMEOUT, NO_NETWORK_CONNECTION, INCORRECT_ADDRESS, INSTANCE_NOT_CONFIGURED, FILE_NOT_FOUND, UNKNOWN_ERROR, WRONG_CONNECTION, SSL_UNVERIFIED_SERVER, BAD_OC_VERSION
|
||||
}
|
||||
|
||||
public void onConnectionCheckResult(ResultType type);
|
||||
|
||||
}
|
|
@ -3,9 +3,8 @@
|
|||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -26,6 +25,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import com.owncloud.android.Log_OC;
|
||||
import com.owncloud.android.db.ProviderMeta;
|
||||
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
|
@ -40,7 +40,6 @@ import android.content.OperationApplicationException;
|
|||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
public class FileDataStorageManager implements DataStorageManager {
|
||||
|
||||
|
@ -156,7 +155,7 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
cv, ProviderTableMeta._ID + "=?",
|
||||
new String[] { String.valueOf(file.getFileId()) });
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG,
|
||||
Log_OC.e(TAG,
|
||||
"Fail to insert insert file to database "
|
||||
+ e.getMessage());
|
||||
}
|
||||
|
@ -171,7 +170,7 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
result_uri = getContentProvider().insert(
|
||||
ProviderTableMeta.CONTENT_URI_FILE, cv);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG,
|
||||
Log_OC.e(TAG,
|
||||
"Fail to insert insert file to database "
|
||||
+ e.getMessage());
|
||||
}
|
||||
|
@ -256,10 +255,10 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
}
|
||||
|
||||
} catch (OperationApplicationException e) {
|
||||
Log.e(TAG, "Fail to update/insert list of files to database " + e.getMessage());
|
||||
Log_OC.e(TAG, "Fail to update/insert list of files to database " + e.getMessage());
|
||||
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Fail to update/insert list of files to database " + e.getMessage());
|
||||
Log_OC.e(TAG, "Fail to update/insert list of files to database " + e.getMessage());
|
||||
}
|
||||
|
||||
// update new id in file objects for insertions
|
||||
|
@ -269,7 +268,7 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
if (results[i].uri != null) {
|
||||
newId = Long.parseLong(results[i].uri.getPathSegments().get(1));
|
||||
files.get(i).setFileId(newId);
|
||||
//Log.v(TAG, "Found and added id in insertion for " + files.get(i).getRemotePath());
|
||||
//Log_OC.v(TAG, "Found and added id in insertion for " + files.get(i).getRemotePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -321,7 +320,7 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?",
|
||||
new String[] { mAccount.name }, null);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, e.getMessage());
|
||||
Log_OC.e(TAG, e.getMessage());
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
|
@ -364,7 +363,7 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
+ ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?",
|
||||
new String[] { value, mAccount.name }, null);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG,
|
||||
Log_OC.e(TAG,
|
||||
"Couldn't determine file existance, assuming non existance: "
|
||||
+ e.getMessage());
|
||||
return false;
|
||||
|
@ -394,7 +393,7 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
+ "=?", new String[] { value, mAccount.name },
|
||||
null);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Could not get file details: " + e.getMessage());
|
||||
Log_OC.e(TAG, "Could not get file details: " + e.getMessage());
|
||||
c = null;
|
||||
}
|
||||
}
|
||||
|
@ -517,7 +516,7 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " + ProviderTableMeta.FILE_PATH + " LIKE ?",
|
||||
new String[] { mAccount.name, dir.getRemotePath() + "%" }, null);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, e.getMessage());
|
||||
Log_OC.e(TAG, e.getMessage());
|
||||
}
|
||||
} else {
|
||||
c = getContentResolver().query(ProviderTableMeta.CONTENT_URI,
|
||||
|
@ -558,10 +557,10 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
}
|
||||
|
||||
} catch (OperationApplicationException e) {
|
||||
Log.e(TAG, "Fail to update descendants of " + dir.getFileId() + " in database", e);
|
||||
Log_OC.e(TAG, "Fail to update descendants of " + dir.getFileId() + " in database", e);
|
||||
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Fail to update desendants of " + dir.getFileId() + " in database", e);
|
||||
Log_OC.e(TAG, "Fail to update desendants of " + dir.getFileId() + " in database", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
* Copyright (C) 2012-2013 ownCloud Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -21,11 +20,10 @@ package com.owncloud.android.datamodel;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import com.owncloud.android.Log_OC;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
public class OCFile implements Parcelable, Comparable<OCFile> {
|
||||
|
@ -265,7 +263,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
|
|||
* Does nothing if the new name is null, empty or includes "/" ; or if the file is the root directory
|
||||
*/
|
||||
public void setFileName(String name) {
|
||||
Log.d(TAG, "OCFile name changin from " + mRemotePath);
|
||||
Log_OC.d(TAG, "OCFile name changin from " + mRemotePath);
|
||||
if (name != null && name.length() > 0 && !name.contains(PATH_SEPARATOR) && !mRemotePath.equals(PATH_SEPARATOR)) {
|
||||
String parent = (new File(getRemotePath())).getParent();
|
||||
parent = (parent.endsWith(PATH_SEPARATOR)) ? parent : parent + PATH_SEPARATOR;
|
||||
|
@ -273,7 +271,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
|
|||
if (isDirectory()) {
|
||||
mRemotePath += PATH_SEPARATOR;
|
||||
}
|
||||
Log.d(TAG, "OCFile name changed to " + mRemotePath);
|
||||
Log_OC.d(TAG, "OCFile name changed to " + mRemotePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue