Skip to content

Commit

Permalink
migrate to androidx
Browse files Browse the repository at this point in the history
  • Loading branch information
friedger committed Feb 13, 2019
1 parent 554b4f3 commit 7f23480
Show file tree
Hide file tree
Showing 38 changed files with 118 additions and 127 deletions.
18 changes: 9 additions & 9 deletions FileManager/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ apply plugin: 'com.android.application'

dependencies {
implementation 'com.github.openintents:distribution:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'

androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
androidTestImplementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.2'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.1'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'androidx.annotation:annotation:1.0.1'
implementation 'androidx.test.espresso:espresso-idling-resource:3.1.1'
}

android {
Expand All @@ -24,7 +24,7 @@ android {
minSdkVersion min_sdk_version
targetSdkVersion target_sdk_version

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

sourceSets {
Expand Down
4 changes: 2 additions & 2 deletions FileManager/res/values/donottranslate.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (C) 2007-2012 OpenIntents.org
* Copyright (C) 2007-2019 OpenIntents.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@
<!-- ***************************
About information
*************************** -->
<string name="about_copyright">Copyright © 2008-2013 OpenIntents</string>
<string name="about_copyright">Copyright © 2008–2019 OpenIntents</string>
<string name="about_website_url">http://www.openintents.org/en/filemanager</string>
<string name="about_email">[email protected]</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.app.Dialog;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import androidx.fragment.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuItem;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.openintents.filemanager;

import android.content.Context;
import android.support.annotation.LayoutRes;
import androidx.annotation.LayoutRes;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.VisibleForTesting;
import androidx.annotation.VisibleForTesting;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.os.Environment;
import android.support.v4.app.FragmentActivity;
import androidx.fragment.app.FragmentActivity;
import android.view.KeyEvent;

import org.openintents.filemanager.lists.FileListFragment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.support.annotation.VisibleForTesting;
import androidx.annotation.VisibleForTesting;
import android.view.MenuItem;
import android.widget.Toast;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import androidx.fragment.app.FragmentActivity;
import android.view.MenuItem;

import org.openintents.filemanager.compatibility.HomeIconHelper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package org.openintents.filemanager.bookmarks;

import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import androidx.fragment.app.FragmentActivity;
import androidx.loader.app.LoaderManager;
import androidx.core.content.ContextCompat;
import androidx.loader.content.CursorLoader;
import androidx.loader.content.Loader;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.ListFragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.ListFragment;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.MenuInflater;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.inputmethod.EditorInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.inputmethod.EditorInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import android.widget.Toast;

import org.openintents.filemanager.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;

import org.openintents.filemanager.R;
import org.openintents.filemanager.util.UIUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.inputmethod.EditorInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.inputmethod.EditorInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import android.widget.Toast;

import org.openintents.filemanager.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.test.espresso.IdlingResource;
import android.support.v4.app.ListFragment;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.test.espresso.IdlingResource;
import androidx.fragment.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -34,7 +34,7 @@

import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.support.v4.content.ContextCompat.checkSelfPermission;
import static androidx.core.content.ContextCompat.checkSelfPermission;


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.openintents.filemanager.lists;

import android.os.Bundle;
import android.support.annotation.LayoutRes;
import androidx.annotation.LayoutRes;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.app.IntentService;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;

import org.openintents.intents.FileManagerIntents;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import android.os.Build;
import android.os.Bundle;
import android.provider.SearchRecentSuggestions;
import android.support.v4.content.LocalBroadcastManager;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class CompressManager {
/**
* TAG for log messages.
*/
static final String TAG = "CompressManager";
private static final String TAG = "CompressManager";

private static final int BUFFER_SIZE = 1024;
private Context mContext;
Expand Down Expand Up @@ -84,7 +84,6 @@ private class CompressTask extends
/**
* Recursively compress file or directory
*
* @returns 0 if successful, error value otherwise.
*/
private void compressFile(File file, String path) throws IOException {
progressDialog.setOnDismissListener(new OnDismissListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
Expand Down
9 changes: 0 additions & 9 deletions FileManager/template of local.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.test.rule.ActivityTestRule;
import androidx.annotation.NonNull;
import androidx.test.rule.ActivityTestRule;

import org.hamcrest.Description;
import org.hamcrest.Matcher;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.openintents.filemanager.test;

import android.support.test.espresso.ViewAssertion;
import android.support.test.espresso.matcher.BoundedMatcher;
import androidx.test.espresso.ViewAssertion;
import androidx.test.espresso.matcher.BoundedMatcher;
import android.view.View;
import android.widget.Adapter;
import android.widget.AdapterView;
Expand All @@ -17,10 +17,10 @@
import java.io.IOException;
import java.io.OutputStreamWriter;

import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.longClick;
import static android.support.test.espresso.action.ViewActions.pressBack;
import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.longClick;
import static androidx.test.espresso.action.ViewActions.pressBack;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.openintents.filemanager.test;

import android.support.test.espresso.IdlingResource;
import androidx.test.espresso.IdlingResource;

import org.openintents.filemanager.FileManagerActivity;
import org.openintents.filemanager.IntentFilterActivity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
import android.app.Activity;
import android.app.Instrumentation;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.test.InstrumentationRegistry;
import android.support.test.annotation.Beta;
import android.support.test.rule.UiThreadTestRule;
import androidx.annotation.Nullable;
import androidx.test.InstrumentationRegistry;
import androidx.test.annotation.Beta;
import androidx.test.rule.UiThreadTestRule;
import android.util.Log;

import org.junit.runner.Description;
import org.junit.runners.model.Statement;

import static android.support.test.internal.util.Checks.checkNotNull;
import static androidx.test.internal.util.Checks.checkNotNull;

/**
* This rule provides functional testing of a single activity. The activity under test will be
Expand Down
Loading

0 comments on commit 7f23480

Please sign in to comment.