android:gravity="center"\r
android:orientation="vertical"\r
android:padding="8dp" >\r
- \r
- <Button\r
- android:id="@+id/centeredRefreshButton"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_gravity="center_horizontal"\r
+\r
+ <android.support.v7.widget.AppCompatButton\r
+ android:id="@+id/centeredRefreshButton"\r
+ style="@style/ownCloud.Button"\r
+ android:layout_width="wrap_content"\r
+ android:layout_height="wrap_content"\r
+ android:layout_gravity="center_horizontal"\r
android:layout_marginBottom="10dp"\r
- android:text="@string/auth_check_server"\r
- android:visibility="gone"\r
- android:contentDescription="@string/auth_check_server"/>\r
+ android:text="@string/auth_check_server"\r
+ android:visibility="gone"\r
+ android:contentDescription="@string/auth_check_server"/>\r
+\r
<TextView\r
android:id="@+id/instructions_message"\r
android:layout_width="wrap_content"\r
<android.support.v7.widget.AppCompatButton\r
android:id="@+id/buttonOK"\r
android:theme="@style/Button.Primary"\r
+ style="@style/Button.Primary"\r
android:layout_width="match_parent"\r
android:layout_height="wrap_content"\r
android:layout_gravity="center_horizontal"\r
android:layout_height="wrap_content"\r
android:layout_marginBottom="20dp"\r
android:layout_marginTop="10dp"\r
+ android:background="@color/login_logo_background_color"\r
android:src="@drawable/logo"\r
android:contentDescription="@string/app_name"/>\r
\r
public void onAuthenticatorTaskCallback(RemoteOperationResult result) {\r
mWaitingForOpId = Long.MAX_VALUE;\r
dismissDialog(WAIT_DIALOG_TAG);\r
+ mAsyncTask = null;\r
\r
if (result.isSuccess()) {\r
Log_OC.d(TAG, "Successful access - time to save the account");\r
if (c != null && c.moveToFirst()) {
remoteId = c.getString(c.getColumnIndex(ProviderTableMeta.FILE_REMOTE_ID));
//ThumbnailsCacheManager.removeFileFromCache(remoteId);
+ c.close();
}
Log_OC.d(TAG, "Removing FILE " + remoteId);
+ uri.getPathSegments().get(1)
+ (!TextUtils.isEmpty(where) ? " AND (" + where
+ ")" : ""), whereArgs);
- /* just for log
- if (c!=null) {
- c.close();
- }
- */
break;
case DIRECTORY:
// deletion of folder is recursive
// ugly patch; serious refactorization is needed to reduce work in
// FileDataStorageManager and bring it to FileContentProvider
if (doubleCheck == null || !doubleCheck.moveToFirst()) {
+ if (doubleCheck != null) {
+ doubleCheck.close();
+ }
long rowId = db.insert(ProviderTableMeta.FILE_TABLE_NAME, null, values);
if (rowId > 0) {
Uri insertedFileUri =
// ugly patch; serious refactorization is needed to reduce work in
// FileDataStorageManager and bring it to FileContentProvider
if (doubleCheckShare == null || !doubleCheckShare.moveToFirst()) {
+ if (doubleCheckShare != null) {
+ doubleCheckShare.close();
+ }
long rowId = db.insert(ProviderTableMeta.OCSHARES_TABLE_NAME, null, values);
if (rowId >0) {
insertedShareUri =
@Override
protected void onCancelled(LoadImage result) {
- if (result.bitmap != null) {
+ if (result != null && result.bitmap != null) {
result.bitmap.recycle();
}
}
* Static methods to help in access to local file system.
*/
public class FileStorageUtils {
- public static Integer mSortOrder;
- public static Boolean mSortAscending;
public static final Integer SORT_NAME = 0;
public static final Integer SORT_DATE = 1;
public static final Integer SORT_SIZE = 2;
-
+ public static Integer mSortOrder = SORT_NAME;
+ public static Boolean mSortAscending = true;
+
//private static final String LOG_TAG = "FileStorageUtils";