diff --git a/android/pom.xml b/android/pom.xml
deleted file mode 100644
index c12f743..0000000
--- a/android/pom.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
- 4.0.0
-
-
- org.seamless
- parent
- 1.0.0
-
-
- Seamless Android
- seamless-android
- apklib
-
-
-
-
-
- maven-surefire-plugin
- 2.5
-
- true
-
-
-
-
- com.jayway.maven.plugins.android.generation2
- android-maven-plugin
- ${android.maven.plugin.version}
- true
-
-
-
- ${env.ANDROID_HOME}
- 15
-
- ${project.basedir}/src/android/AndroidManifest.xml
- ${project.basedir}/src/android/res
- ${project.basedir}/src/android/assets
- ${project.basedir}/src/android/native
- ${project.basedir}/src/android/overlay
- true
-
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- 1.7
-
-
- package
-
- attach-artifact
-
-
-
-
- jar
- ${project.build.directory}/${project.build.finalName}.jar
-
-
-
-
-
-
-
-
-
-
-
-
-
- com.google.android
- android
- ${android.version}
- provided
-
-
-
- commons-logging
- commons-logging
-
-
- org.apache.httpcomponents
- httpclient
-
-
- org.khronos
- opengl-api
-
-
- org.json
- json
-
-
- xerces
- xmlParserAPIs
-
-
-
-
-
- com.android.support
- support-v13
- ${android.support.version}
-
-
-
-
-
\ No newline at end of file
diff --git a/android/src/android/AndroidManifest.xml b/android/src/android/AndroidManifest.xml
deleted file mode 100644
index c61499a..0000000
--- a/android/src/android/AndroidManifest.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/src/android/res/drawable-hdpi/file.png b/android/src/android/res/drawable-hdpi/file.png
deleted file mode 100644
index 1a8331e..0000000
Binary files a/android/src/android/res/drawable-hdpi/file.png and /dev/null differ
diff --git a/android/src/android/res/drawable-hdpi/folder_closed.png b/android/src/android/res/drawable-hdpi/folder_closed.png
deleted file mode 100644
index d020ca3..0000000
Binary files a/android/src/android/res/drawable-hdpi/folder_closed.png and /dev/null differ
diff --git a/android/src/android/res/drawable-hdpi/folder_open.png b/android/src/android/res/drawable-hdpi/folder_open.png
deleted file mode 100644
index 0b868c8..0000000
Binary files a/android/src/android/res/drawable-hdpi/folder_open.png and /dev/null differ
diff --git a/android/src/android/res/layout/chooser.xml b/android/src/android/res/layout/chooser.xml
deleted file mode 100644
index aa1b5ae..0000000
--- a/android/src/android/res/layout/chooser.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/src/android/res/layout/file.xml b/android/src/android/res/layout/file.xml
deleted file mode 100644
index 49203f3..0000000
--- a/android/src/android/res/layout/file.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/src/android/res/values/dimens.xml b/android/src/android/res/values/dimens.xml
deleted file mode 100644
index 3ce23ff..0000000
--- a/android/src/android/res/values/dimens.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- 0dp
- 4dp
-
\ No newline at end of file
diff --git a/android/src/android/res/values/strings.xml b/android/src/android/res/values/strings.xml
deleted file mode 100644
index c574bc0..0000000
--- a/android/src/android/res/values/strings.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
- Empty Directory
- Storage was removed or unmounted.
- Select a file
- Error selecting File
- Select current directory
-
\ No newline at end of file
diff --git a/android/src/android/res/values/styles.xml b/android/src/android/res/values/styles.xml
deleted file mode 100644
index f8863a5..0000000
--- a/android/src/android/res/values/styles.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
diff --git a/android/src/main/java/org/seamless/android/FixedAndroidLogHandler.java b/android/src/main/java/org/seamless/android/FixedAndroidLogHandler.java
deleted file mode 100644
index 00cf9d4..0000000
--- a/android/src/main/java/org/seamless/android/FixedAndroidLogHandler.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.seamless.android;
-
-import android.util.Log;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.logging.Formatter;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.LogRecord;
-
-/*
-Taken from: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/java/com/android/internal/logging/AndroidHandler.java;hb=c2ad241504fcaa12d4579d3b0b4038d1ca8d08c9
- */
-public class FixedAndroidLogHandler extends Handler {
- /**
- * Holds the formatter for all Android log handlers.
- */
- private static final Formatter THE_FORMATTER = new Formatter() {
- @Override
- public String format(LogRecord r) {
- Throwable thrown = r.getThrown();
- if (thrown != null) {
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw);
- sw.write(r.getMessage());
- sw.write("\n");
- thrown.printStackTrace(pw);
- pw.flush();
- return sw.toString();
- } else {
- return r.getMessage();
- }
- }
- };
-
- /**
- * Constructs a new instance of the Android log handler.
- */
- public FixedAndroidLogHandler() {
- setFormatter(THE_FORMATTER);
- }
-
- @Override
- public void close() {
- // No need to close, but must implement abstract method.
- }
-
- @Override
- public void flush() {
- // No need to flush, but must implement abstract method.
- }
-
- @Override
- public void publish(LogRecord record) {
- try {
- int level = getAndroidLevel(record.getLevel());
- String tag = record.getLoggerName();
-
- if (tag == null) {
- // Anonymous logger.
- tag = "null";
- } else {
- // Tags must be <= 23 characters.
- int length = tag.length();
- if (length > 23) {
- // Most loggers use the full class name. Try dropping the
- // package.
- int lastPeriod = tag.lastIndexOf(".");
- if (length - lastPeriod - 1 <= 23) {
- tag = tag.substring(lastPeriod + 1);
- } else {
- // Use last 23 chars.
- tag = tag.substring(tag.length() - 23);
- }
- }
- }
-
- /* ############################################################################################
-
- Instead of using the perfectly fine java.util.logging API for setting the
- loggable levels, this call relies on a totally obscure "local.prop" file which you have to place on
- your device. By default, if you do not have that file and if you do not execute some magic
- "setprop" commands on your device, only INFO/WARN/ERROR is loggable. So whatever you do with
- java.util.logging.Logger.setLevel(...) doesn't have any effect. The debug messages might arrive
- here but they are dropped because you _also_ have to set the Android internal logging level with
- the aforementioned magic switches.
-
- Also, consider that you have to understand how a JUL logger name is mapped to the "tag" of
- the Android log. Basically, the whole cutting and cropping procedure above is what you have to
- memorize if you want to log with JUL and configure Android for debug output.
-
- I actually admire the pure evil of this setup, even Mr. Ceki can learn something!
-
- Commenting out these lines makes it all work as expected:
-
- if (!Log.isLoggable(tag, level)) {
- return;
- }
-
- ############################################################################################### */
-
- String message = getFormatter().format(record);
- Log.println(level, tag, message);
- } catch (RuntimeException e) {
- Log.e("AndroidHandler", "Error logging message.", e);
- }
- }
-
- /**
- * Converts a {@link java.util.logging.Logger} logging level into an Android one.
- *
- * @param level The {@link java.util.logging.Logger} logging level.
- *
- * @return The resulting Android logging level.
- */
- static int getAndroidLevel(Level level) {
- int value = level.intValue();
- if (value >= 1000) { // SEVERE
- return Log.ERROR;
- } else if (value >= 900) { // WARNING
- return Log.WARN;
- } else if (value >= 800) { // INFO
- return Log.INFO;
- } else {
- return Log.DEBUG;
- }
- }
-
-}
\ No newline at end of file
diff --git a/android/src/main/java/org/seamless/android/filechooser/FileChooserActivity.java b/android/src/main/java/org/seamless/android/filechooser/FileChooserActivity.java
deleted file mode 100644
index 7fc9019..0000000
--- a/android/src/main/java/org/seamless/android/filechooser/FileChooserActivity.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright (C) 2012 Paul Burke
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.seamless.android.filechooser;
-
-import java.io.File;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Environment;
-import android.support.v4.app.FragmentActivity;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentManager.BackStackEntry;
-import android.support.v4.app.FragmentManager.OnBackStackChangedListener;
-import android.support.v4.app.FragmentTransaction;
-import android.view.View;
-import android.widget.Button;
-import android.widget.Toast;
-import org.seamless.android.R;
-
-/**
- * Main Activity that handles the FileListFragments
- *
- * @author paulburke (ipaulpro)
- * @author Christian Bauer
- */
-public class FileChooserActivity
- extends FragmentActivity
- implements OnBackStackChangedListener {
-
- public static final String EXTRA_SELECT_DIRECTORY = FileChooserActivity.class.getName() + "_EXTRA_SELECT_DIRECTORY";
-
- protected static final String STATE_PATH = "path";
- protected static final String STATE_SELECT_DIRECTORY = "selectDirectory";
-
- public static final String EXTERNAL_BASE_PATH =
- Environment.getExternalStorageDirectory().getAbsolutePath();
-
- protected FragmentManager fragmentManager;
-
- protected BroadcastReceiver storageListener = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- Toast.makeText(context, R.string.storage_removed, Toast.LENGTH_LONG).show();
- finishWithResult(null);
- }
- };
-
- protected String path;
- protected boolean selectDirectory;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setContentView(R.layout.chooser);
-
- fragmentManager = getSupportFragmentManager();
- fragmentManager.addOnBackStackChangedListener(this);
-
- if (savedInstanceState == null) {
- path = EXTERNAL_BASE_PATH;
- selectDirectory = getIntent().getExtras() != null && getIntent().getExtras().getBoolean(EXTRA_SELECT_DIRECTORY);
- addFragment(path);
- } else {
- path = savedInstanceState.getString(STATE_PATH);
- selectDirectory = savedInstanceState.getBoolean(STATE_SELECT_DIRECTORY);
- }
-
- setTitle(path);
-
- Button selectDirectoryButton = (Button) findViewById(R.id.select_directory_button);
- selectDirectoryButton.setVisibility(selectDirectory ? View.VISIBLE : View.GONE);
- selectDirectoryButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- onCurrentDirectorySelected();
- }
- });
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- unregisterStorageListener();
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- registerStorageListener();
- }
-
- @Override
- protected void onSaveInstanceState(Bundle outState) {
- super.onSaveInstanceState(outState);
- outState.putString(STATE_PATH, path);
- outState.putBoolean(STATE_SELECT_DIRECTORY, selectDirectory);
- }
-
- public void onBackStackChanged() {
- path = EXTERNAL_BASE_PATH;
- int count = fragmentManager.getBackStackEntryCount();
- if (count > 0) {
- BackStackEntry fragment = fragmentManager.getBackStackEntryAt(count - 1);
- path = fragment.getName();
- }
- setTitle(path);
- }
-
- /**
- * Add the initial Fragment with given path.
- *
- * @param path The absolute path of the file (directory) to display.
- */
- private void addFragment(String path) {
- FileListFragment explorerFragment = FileListFragment.newInstance(this.path);
- fragmentManager.beginTransaction()
- .add(R.id.explorer_fragment, explorerFragment).commit();
- }
-
- /**
- * "Replace" the existing Fragment with a new one using given path.
- * We're really adding a Fragment to the back stack.
- *
- * @param path The absolute path of the file (directory) to display.
- */
- private void replaceFragment(String path) {
- FileListFragment explorerFragment = FileListFragment.newInstance(path);
- fragmentManager.beginTransaction()
- .replace(R.id.explorer_fragment, explorerFragment)
- .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
- .addToBackStack(path).commit();
- }
-
- /**
- * Finish this Activity with a result code and URI of the selected file.
- *
- * @param file The file selected.
- */
- private void finishWithResult(File file) {
- if (file != null) {
- Uri uri = Uri.fromFile(file);
- setResult(RESULT_OK, new Intent().setData(uri));
- finish();
- } else {
- setResult(RESULT_CANCELED);
- finish();
- }
- }
-
- /**
- * Called when the user selects a File
- *
- * @param file The file that was selected
- */
- protected void onFileSelected(File file) {
- if (file != null) {
- path = file.getAbsolutePath();
-
- if (file.isDirectory()) {
- replaceFragment(path);
- } else if (!selectDirectory) {
- finishWithResult(file);
- }
- } else {
- Toast.makeText(FileChooserActivity.this, R.string.error_selecting_file, Toast.LENGTH_SHORT).show();
- }
- }
-
- protected void onCurrentDirectorySelected() {
- File file = new File(path);
- if (!file.isDirectory())
- file = file.getParentFile();
- finishWithResult(file);
- }
-
- /**
- * Register the external storage BroadcastReceiver.
- */
- private void registerStorageListener() {
- IntentFilter filter = new IntentFilter();
- filter.addAction(Intent.ACTION_MEDIA_REMOVED);
- registerReceiver(storageListener, filter);
- }
-
- /**
- * Unregister the external storage BroadcastReceiver.
- */
- private void unregisterStorageListener() {
- unregisterReceiver(storageListener);
- }
-}
diff --git a/android/src/main/java/org/seamless/android/filechooser/FileListAdapter.java b/android/src/main/java/org/seamless/android/filechooser/FileListAdapter.java
deleted file mode 100644
index 6271224..0000000
--- a/android/src/main/java/org/seamless/android/filechooser/FileListAdapter.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2012 Paul Burke
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.seamless.android.filechooser;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-import org.seamless.android.R;
-
-/**
- * List adapter for Files.
- *
- * @author paulburke (ipaulpro)
- * @author Christian Bauer
- *
- */
-public class FileListAdapter extends BaseAdapter {
-
- protected List files = new ArrayList();
- protected LayoutInflater inflater;
-
- public FileListAdapter(Context context) {
- inflater = LayoutInflater.from(context);
- }
-
- public ArrayList getListItems() {
- return (ArrayList) files;
- }
-
- public void setListItems(List files) {
- this.files = files;
- notifyDataSetChanged();
- }
-
- public int getCount() {
- return files.size();
- }
-
- public void add(File file) {
- files.add(file);
- }
-
- public void clear() {
- files.clear();
- }
-
- public Object getItem(int position) {
- return files.get(position);
- }
-
- public long getItemId(int position) {
- return position;
- }
-
- public View getView(int position, View convertView, ViewGroup parent) {
- View row = convertView;
- ViewHolder holder;
-
- if (row == null) {
- row = inflater.inflate(R.layout.file, parent, false);
- holder = new ViewHolder(row);
- row.setTag(holder);
- } else {
- // Reduce, reuse, recycle!
- holder = (ViewHolder) row.getTag();
- }
-
- // Get the file at the current position
- final File file = (File) getItem(position);
-
- // Set the TextView as the file name
- holder.nameView.setText(file.getName());
-
- // If the item is not a directory, use the file icon
- holder.iconView.setImageResource(file.isDirectory()
- ? R.drawable.folder_closed
- : R.drawable.file);
-
- return row;
- }
-
- static class ViewHolder {
- TextView nameView;
- ImageView iconView;
-
- ViewHolder(View row) {
- nameView = (TextView) row.findViewById(R.id.file_name);
- iconView = (ImageView) row.findViewById(R.id.file_icon);
- }
- }
-}
\ No newline at end of file
diff --git a/android/src/main/java/org/seamless/android/filechooser/FileListFragment.java b/android/src/main/java/org/seamless/android/filechooser/FileListFragment.java
deleted file mode 100644
index 8c18540..0000000
--- a/android/src/main/java/org/seamless/android/filechooser/FileListFragment.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2012 Paul Burke
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.seamless.android.filechooser;
-
-import java.io.File;
-import java.util.List;
-
-import android.os.Bundle;
-import android.os.Environment;
-import android.support.v4.app.ListFragment;
-import android.support.v4.app.LoaderManager;
-import android.support.v4.content.Loader;
-import android.view.View;
-import android.widget.ListView;
-import org.seamless.android.R;
-
-/**
- * Fragment that displays a list of Files in a given path.
- *
- * @author paulburke (ipaulpro)
- * @author Christian Bauer
- *
- */
-public class FileListFragment
- extends ListFragment
- implements LoaderManager.LoaderCallbacks> {
-
- private static final int LOADER_ID = 0;
-
- protected FileListAdapter adapter;
- protected String path;
-
- /**
- * Create a new instance with the given file path.
- *
- * @param path The absolute path of the file (directory) to display.
- * @return A new Fragment with the given file path.
- */
- public static FileListFragment newInstance(String path) {
- FileListFragment fragment = new FileListFragment();
- Bundle args = new Bundle();
- args.putString(FileChooserActivity.STATE_PATH, path);
- fragment.setArguments(args);
- return fragment;
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- adapter = new FileListAdapter(getActivity());
- path = getArguments() != null
- ? getArguments().getString(FileChooserActivity.STATE_PATH)
- : Environment.getExternalStorageDirectory().getAbsolutePath();
- }
-
- @Override
- public void onActivityCreated(Bundle savedInstanceState) {
- setEmptyText(getString(R.string.empty_directory));
- setListAdapter(adapter);
- setListShown(false);
- getLoaderManager().initLoader(LOADER_ID, null, this);
- super.onActivityCreated(savedInstanceState);
- }
-
- @Override
- public void onListItemClick(ListView l, View v, int position, long id) {
- FileListAdapter adapter = (FileListAdapter) l.getAdapter();
- if (adapter != null) {
- File file = (File) adapter.getItem(position);
- path = file.getAbsolutePath();
- ((FileChooserActivity) getActivity()).onFileSelected(file);
- }
- }
-
- public Loader> onCreateLoader(int id, Bundle args) {
- return new FileLoader(getActivity(), path);
- }
-
- public void onLoadFinished(Loader> loader, List data) {
- adapter.setListItems(data);
- if (isResumed())
- setListShown(true);
- else
- setListShownNoAnimation(true);
- }
-
- public void onLoaderReset(Loader> loader) {
- adapter.clear();
- }
-}
\ No newline at end of file
diff --git a/android/src/main/java/org/seamless/android/filechooser/FileLoader.java b/android/src/main/java/org/seamless/android/filechooser/FileLoader.java
deleted file mode 100644
index 9578081..0000000
--- a/android/src/main/java/org/seamless/android/filechooser/FileLoader.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2012 Paul Burke
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.seamless.android.filechooser;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import android.content.Context;
-import android.os.FileObserver;
-import android.support.v4.content.AsyncTaskLoader;
-
-/**
- * Loader that returns a list of Files in a given file path.
- *
- * @author paulburke (ipaulpro)
- * @author Christian Bauer
- */
-public class FileLoader extends AsyncTaskLoader> {
-
- public static final String HIDDEN_PREFIX = ".";
-
- protected static final int FILE_OBSERVER_MASK = FileObserver.CREATE
- | FileObserver.DELETE | FileObserver.DELETE_SELF
- | FileObserver.MOVED_FROM | FileObserver.MOVED_TO
- | FileObserver.MODIFY | FileObserver.MOVE_SELF;
-
- protected static FileFilter mDirFilter = new FileFilter() {
- public boolean accept(File file) {
- final String fileName = file.getName();
- // Return directories only and skip hidden directories
- return file.isDirectory() && !fileName.startsWith(HIDDEN_PREFIX);
- }
- };
-
- protected static FileFilter mFileFilter = new FileFilter() {
- public boolean accept(File file) {
- final String fileName = file.getName();
- // Return files only (not directories) and skip hidden files
- return file.isFile() && !fileName.startsWith(HIDDEN_PREFIX);
- }
- };
-
- protected static Comparator mComparator = new Comparator() {
- public int compare(File f1, File f2) {
- // Sort alphabetically by lower case, which is much cleaner
- return f1.getName().toLowerCase().compareTo(
- f2.getName().toLowerCase()
- );
- }
- };
-
- final protected String path;
- protected FileObserver fileObserver;
- protected List data;
-
- public FileLoader(Context context, String path) {
- super(context);
- this.path = path;
- }
-
- @Override
- public List loadInBackground() {
- ArrayList list = new ArrayList();
-
- // Current directory File instance
- final File pathDir = new File(path);
-
- // List file in this directory with the directory filter
- final File[] dirs = pathDir.listFiles(mDirFilter);
- if (dirs != null) {
- // Sort the folders alphabetically
- Arrays.sort(dirs, mComparator);
- // Add each folder to the File list for the list adapter
- Collections.addAll(list, dirs);
- }
-
- // List file in this directory with the file filter
- final File[] files = pathDir.listFiles(mFileFilter);
- if (files != null) {
- // Sort the files alphabetically
- Arrays.sort(files, mComparator);
- // Add each file to the File list for the list adapter
- Collections.addAll(list, files);
- }
-
- return list;
- }
-
- @Override
- public void deliverResult(List data) {
- if (isReset()) {
- releaseResources();
- return;
- }
-
- List oldData = this.data;
- this.data = data;
-
- if (isStarted())
- super.deliverResult(data);
-
- if (oldData != null && oldData != data)
- releaseResources();
- }
-
- @Override
- protected void onStartLoading() {
- if (data != null)
- deliverResult(data);
-
- if (fileObserver == null) {
- fileObserver = new FileObserver(path, FILE_OBSERVER_MASK) {
- @Override
- public void onEvent(int event, String path) {
- onContentChanged();
- }
- };
- }
- fileObserver.startWatching();
-
- if (takeContentChanged() || data == null)
- forceLoad();
- }
-
- @Override
- protected void onStopLoading() {
- cancelLoad();
- }
-
- @Override
- protected void onReset() {
- onStopLoading();
- if (data != null) {
- releaseResources();
- data = null;
- }
- }
-
- @Override
- public void onCanceled(List data) {
- super.onCanceled(data);
- releaseResources();
- }
-
- protected void releaseResources() {
- if (fileObserver != null) {
- fileObserver.stopWatching();
- fileObserver = null;
- }
- }
-}
\ No newline at end of file
diff --git a/cdi/pom.xml b/cdi/pom.xml
index 7ce8bd3..ce83953 100644
--- a/cdi/pom.xml
+++ b/cdi/pom.xml
@@ -7,7 +7,7 @@
org.seamless
parent
- 1.0.0
+ 1.1.0
Seamless CDI
diff --git a/gwt/pom.xml b/gwt/pom.xml
index cc0891d..9fe1aa3 100644
--- a/gwt/pom.xml
+++ b/gwt/pom.xml
@@ -7,7 +7,7 @@
org.seamless
parent
- 1.0.0
+ 1.1.0
Seamless GWT
diff --git a/http/pom.xml b/http/pom.xml
index a33e0c0..e89b98b 100644
--- a/http/pom.xml
+++ b/http/pom.xml
@@ -7,7 +7,7 @@
org.seamless
parent
- 1.0.0
+ 1.1.0
Seamless HTTP
diff --git a/javadoc/pom.xml b/javadoc/pom.xml
index d4c49a3..36f0485 100644
--- a/javadoc/pom.xml
+++ b/javadoc/pom.xml
@@ -7,7 +7,7 @@
org.seamless
parent
- 1.0.0
+ 1.1.0
Seamless Javadoc
diff --git a/mock/pom.xml b/mock/pom.xml
index 7b10b92..45eaccb 100644
--- a/mock/pom.xml
+++ b/mock/pom.xml
@@ -7,7 +7,7 @@
org.seamless
parent
- 1.0.0
+ 1.1.0
Seamless Mock
diff --git a/pom.xml b/pom.xml
index 6f4485d..759dc66 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
org.seamless
parent
pom
- 1.0.0
+ 1.1.0
util
@@ -20,7 +20,6 @@
swing
gwt
cdi
- android
@@ -84,9 +83,6 @@
2.2
1.1.10.Final
2.3.0
- 4.0.1.2
- 18.0.0
- 3.8.2
diff --git a/swing/pom.xml b/swing/pom.xml
index 54823c4..e9db15f 100644
--- a/swing/pom.xml
+++ b/swing/pom.xml
@@ -7,7 +7,7 @@
org.seamless
parent
- 1.0.0
+ 1.1.0
Seamless Swing
diff --git a/util/pom.xml b/util/pom.xml
index fb1e39b..2de66f4 100644
--- a/util/pom.xml
+++ b/util/pom.xml
@@ -7,7 +7,7 @@
org.seamless
parent
- 1.0.0
+ 1.1.0
Seamless Utilities
diff --git a/xml/pom.xml b/xml/pom.xml
index d846fdc..bb71720 100644
--- a/xml/pom.xml
+++ b/xml/pom.xml
@@ -7,7 +7,7 @@
org.seamless
parent
- 1.0.0
+ 1.1.0
Seamless XML