// Path: src/the/pdfviewer3/BookSettingsActivity.java
// public class BookSettingsActivity extends BaseSettingsActivity {
// 
//     private BookSettings current;
// 
//     @SuppressWarnings("deprecation")
//     @Override
//     protected void onCreate(final Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
// 
//         final Uri uri = getIntent().getData();
//         final String fileName = PathFromUri.retrieve(getContentResolver(), uri);
//         current = SettingsManager.getBookSettings(fileName);
//         if (current == null) {
//             finish();
//             return;
//         }
// 
//         setRequestedOrientation(current.getOrientation(AppSettings.current()));
// 
//         SettingsManager.onBookSettingsActivityCreated(current);
// 
//         try {
//             addPreferencesFromResource(R.xml.fragment_book);
//         } catch (final ClassCastException e) {
//             LCTX.e("Book preferences are corrupt! Resetting to default values.");
// 
//             final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
//             final SharedPreferences.Editor editor = preferences.edit();
//             editor.clear();
//             editor.commit();
// 
//             PreferenceManager.setDefaultValues(this, R.xml.fragment_book, true);
//             addPreferencesFromResource(R.xml.fragment_book);
//         }
// 
//         decorator.decoratePreference(getRoot());
//         decorator.decorateBooksSettings(current);
//     }
// 
//     @Override
//     protected void onPause() {
//         SettingsManager.onBookSettingsActivityClosed(current);
//         super.onPause();
//     }
// }
// 
// Path: src/the/pdfviewer3/FragmentedSettingsActivity.java
// @TargetApi(11)
// public class FragmentedSettingsActivity extends SettingsActivity {
// 
//     @Override
//     protected void onCreate() {
//     }
// 
//     @Override
//     public void onBuildHeaders(final List<Header> target) {
//         loadHeadersFromResource(R.xml.preferences_headers, target);
//     }
// 
//     @Override
//     public boolean onIsMultiPane() {
//         final Configuration c = this.getResources().getConfiguration();
//         if (0 != (Configuration.SCREENLAYOUT_SIZE_XLARGE & c.screenLayout)) {
//             return c.orientation == Configuration.ORIENTATION_LANDSCAPE;
//         }
//         return false;
//     }
// }
// 
// Path: src/the/pdfviewer3/SettingsActivity.java
// public class SettingsActivity extends BaseSettingsActivity {
// 
//     @Override
//     protected final void onCreate(final Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
// 
//         EBookDroidApp.initFonts();
// 
//         final Uri uri = getIntent().getData();
//         if (uri != null) {
//             final String fileName = PathFromUri.retrieve(getContentResolver(), uri);
//             BookSettings current = SettingsManager.getBookSettings(fileName);
//             if (current != null) {
//                 setRequestedOrientation(current.getOrientation(AppSettings.current()));
//             }
//         }
// 
//         onCreate();
//     }
// 
//     @Override
//     protected void onPause() {
//         SettingsManager.onSettingsChanged();
//         super.onPause();
//     }
// 
//     @SuppressWarnings("deprecation")
//     protected void onCreate() {
//         try {
//             setPreferenceScreen(createPreferences());
//         } catch (final ClassCastException e) {
//             LCTX.e("Shared preferences are corrupt! Resetting to default values.");
// 
//             final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
//             final SharedPreferences.Editor editor = preferences.edit();
//             editor.clear();
//             editor.commit();
// 
//             setPreferenceScreen(createPreferences());
//         }
// 
//         decorator.decorateSettings();
//     }
// 
//     @SuppressWarnings("deprecation")
//     PreferenceScreen createPreferences() {
//         final PreferenceScreen root = getPreferenceManager().createPreferenceScreen(this);
// 
//         root.setTitle(R.string.menu_settings);
// 
//         loadPreferences(root, R.xml.fragment_ui);
//         loadPreferences(root, R.xml.fragment_scroll);
//         loadPreferences(root, R.xml.fragment_navigation);
//         loadPreferences(root, R.xml.fragment_performance);
//         loadPreferences(root, R.xml.fragment_render);
//         loadPreferences(root, R.xml.fragment_typespec);
//         loadPreferences(root, R.xml.fragment_browser);
//         loadPreferences(root, R.xml.fragment_opds);
// 
//         loadPreferences(root, R.xml.fragment_backup);
// 
//         return root;
//     }
// 
//     @SuppressWarnings("deprecation")
//     void loadPreferences(final PreferenceScreen root, final int... resourceIds) {
//         for (final int id : resourceIds) {
//             setPreferenceScreen(null);
//             addPreferencesFromResource(id);
//             root.addPreference(getPreferenceScreen());
//             setPreferenceScreen(null);
//         }
//     }
// 
// }


import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import the.pdfviewer3.BookSettingsActivity;
import the.pdfviewer3.FragmentedSettingsActivity;
import the.pdfviewer3.SettingsActivity;
import java.io.File;
import org.emdev.common.android.AndroidVersion;
package org.ebookdroid.ui.settings;




public class SettingsUI {

    public static void showBookSettings(final Context context, final String fileName) {
// Path: src/the/pdfviewer3/BookSettingsActivity.java
// public class BookSettingsActivity extends BaseSettingsActivity {
// 
//     private BookSettings current;
// 
//     @SuppressWarnings("deprecation")
//     @Override
//     protected void onCreate(final Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
// 
//         final Uri uri = getIntent().getData();
//         final String fileName = PathFromUri.retrieve(getContentResolver(), uri);
//         current = SettingsManager.getBookSettings(fileName);
//         if (current == null) {
//             finish();
//             return;
//         }
// 
//         setRequestedOrientation(current.getOrientation(AppSettings.current()));
// 
//         SettingsManager.onBookSettingsActivityCreated(current);
// 
//         try {
//             addPreferencesFromResource(R.xml.fragment_book);
//         } catch (final ClassCastException e) {
//             LCTX.e("Book preferences are corrupt! Resetting to default values.");
// 
//             final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
//             final SharedPreferences.Editor editor = preferences.edit();
//             editor.clear();
//             editor.commit();
// 
//             PreferenceManager.setDefaultValues(this, R.xml.fragment_book, true);
//             addPreferencesFromResource(R.xml.fragment_book);
//         }
// 
//         decorator.decoratePreference(getRoot());
//         decorator.decorateBooksSettings(current);
//     }
// 
//     @Override
//     protected void onPause() {
//         SettingsManager.onBookSettingsActivityClosed(current);
//         super.onPause();
//     }
// }
// 
// Path: src/the/pdfviewer3/FragmentedSettingsActivity.java
// @TargetApi(11)
// public class FragmentedSettingsActivity extends SettingsActivity {
// 
//     @Override
//     protected void onCreate() {
//     }
// 
//     @Override
//     public void onBuildHeaders(final List<Header> target) {
//         loadHeadersFromResource(R.xml.preferences_headers, target);
//     }
// 
//     @Override
//     public boolean onIsMultiPane() {
//         final Configuration c = this.getResources().getConfiguration();
//         if (0 != (Configuration.SCREENLAYOUT_SIZE_XLARGE & c.screenLayout)) {
//             return c.orientation == Configuration.ORIENTATION_LANDSCAPE;
//         }
//         return false;
//     }
// }
// 
// Path: src/the/pdfviewer3/SettingsActivity.java
// public class SettingsActivity extends BaseSettingsActivity {
// 
//     @Override
//     protected final void onCreate(final Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
// 
//         EBookDroidApp.initFonts();
// 
//         final Uri uri = getIntent().getData();
//         if (uri != null) {
//             final String fileName = PathFromUri.retrieve(getContentResolver(), uri);
//             BookSettings current = SettingsManager.getBookSettings(fileName);
//             if (current != null) {
//                 setRequestedOrientation(current.getOrientation(AppSettings.current()));
//             }
//         }
// 
//         onCreate();
//     }
// 
//     @Override
//     protected void onPause() {
//         SettingsManager.onSettingsChanged();
//         super.onPause();
//     }
// 
//     @SuppressWarnings("deprecation")
//     protected void onCreate() {
//         try {
//             setPreferenceScreen(createPreferences());
//         } catch (final ClassCastException e) {
//             LCTX.e("Shared preferences are corrupt! Resetting to default values.");
// 
//             final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
//             final SharedPreferences.Editor editor = preferences.edit();
//             editor.clear();
//             editor.commit();
// 
//             setPreferenceScreen(createPreferences());
//         }
// 
//         decorator.decorateSettings();
//     }
// 
//     @SuppressWarnings("deprecation")
//     PreferenceScreen createPreferences() {
//         final PreferenceScreen root = getPreferenceManager().createPreferenceScreen(this);
// 
//         root.setTitle(R.string.menu_settings);
// 
//         loadPreferences(root, R.xml.fragment_ui);
//         loadPreferences(root, R.xml.fragment_scroll);
//         loadPreferences(root, R.xml.fragment_navigation);
//         loadPreferences(root, R.xml.fragment_performance);
//         loadPreferences(root, R.xml.fragment_render);
//         loadPreferences(root, R.xml.fragment_typespec);
//         loadPreferences(root, R.xml.fragment_browser);
//         loadPreferences(root, R.xml.fragment_opds);
// 
//         loadPreferences(root, R.xml.fragment_backup);
// 
//         return root;
//     }
// 
//     @SuppressWarnings("deprecation")
//     void loadPreferences(final PreferenceScreen root, final int... resourceIds) {
//         for (final int id : resourceIds) {
//             setPreferenceScreen(null);
//             addPreferencesFromResource(id);
//             root.addPreference(getPreferenceScreen());
//             setPreferenceScreen(null);
//         }
//     }
// 
// }


// Path: src/org/ebookdroid/ui/settings/SettingsUI.java
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import the.pdfviewer3.BookSettingsActivity;
import the.pdfviewer3.FragmentedSettingsActivity;
import the.pdfviewer3.SettingsActivity;
import java.io.File;
import org.emdev.common.android.AndroidVersion;

package org.ebookdroid.ui.settings;




public class SettingsUI {

    public static void showBookSettings(final Context context, final String fileName) {
        final Intent intent = new Intent(context, BookSettingsActivity.class);