Commit 225ea61b authored by fallenstardust's avatar fallenstardust
parent 4505c049
...@@ -3,28 +3,29 @@ ...@@ -3,28 +3,29 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="cn.garymb.ygomobile.lite"> package="cn.garymb.ygomobile.lite">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_LOGS" <uses-permission
android:name="android.permission.READ_LOGS"
tools:ignore="ProtectedPermissions" /> tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" <uses-permission
android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions" /> tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.GET_TASKS"/> <uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR"/> <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-sdk <uses-sdk tools:overrideLibrary="com.toptoche.searchablespinnerlibrary" />
tools:overrideLibrary="com.toptoche.searchablespinnerlibrary"/>
<application <application
android:name="cn.garymb.ygomobile.App" android:name="cn.garymb.ygomobile.App"
android:allowBackup="false" android:allowBackup="false"
...@@ -32,8 +33,8 @@ ...@@ -32,8 +33,8 @@
android:label="@string/app_name" android:label="@string/app_name"
android:largeHeap="true" android:largeHeap="true"
android:supportsRtl="false" android:supportsRtl="false"
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup,android:supportsRtl"> tools:replace="android:allowBackup,android:supportsRtl">
<activity <activity
...@@ -42,71 +43,71 @@ ...@@ -42,71 +43,71 @@
android:taskAffinity="cn.garymb.logo" android:taskAffinity="cn.garymb.logo"
android:theme="@style/TranslucentTheme"> android:theme="@style/TranslucentTheme">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
<meta-data <meta-data
android:name="android.app.shortcuts" android:name="android.app.shortcuts"
android:resource="@xml/shortcuts"/> android:resource="@xml/shortcuts" />
</activity> </activity>
<activity <activity
android:name="cn.garymb.ygomobile.ui.home.MainActivity" android:name="cn.garymb.ygomobile.ui.home.MainActivity"
android:excludeFromRecents="false"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:excludeFromRecents="false"
android:exported="true" android:exported="true"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:stateNotNeeded="true" android:stateNotNeeded="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"> android:windowSoftInputMode="stateAlwaysHidden|adjustResize">
<intent-filter> <intent-filter>
<action android:name="ygomobile.intent.action.DECK"/> <action android:name="ygomobile.intent.action.DECK" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="ygomobile.intent.action.GAME"/> <action android:name="ygomobile.intent.action.GAME" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW"/> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.BROWSABLE" />
<!--android:pathPrefix="/deck"--> <!--android:pathPrefix="/deck"-->
<data <data
android:host="deck" android:host="deck"
android:scheme="ygo"/> android:scheme="ygo" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW"/> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file"/> <data android:scheme="file" />
<data android:host="*"/> <data android:host="*" />
<!--data android:mimeType="*/*" /--> <!--data android:mimeType="*/*" /-->
<data android:pathPattern=".*\\.ydk"/> <data android:pathPattern=".*\\.ydk" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW"/> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content"/> <data android:scheme="content" />
<data android:host="*"/> <data android:host="*" />
<data android:mimeType="*/*" /> <data android:mimeType="*/*" />
<data android:pathPattern=".*\\.ydk"/> <data android:pathPattern=".*\\.ydk" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name="cn.garymb.ygomobile.YGOMobileActivity" android:name="cn.garymb.ygomobile.YGOMobileActivity"
android:theme="@style/AppTheme.Game" android:theme="@style/AppTheme.Game"
tools:replace="android:theme"/> tools:replace="android:theme" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.activities.AboutActivity" android:name="cn.garymb.ygomobile.ui.activities.AboutActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
...@@ -114,7 +115,7 @@ ...@@ -114,7 +115,7 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/> android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.preference.SettingsActivity" android:name="cn.garymb.ygomobile.ui.preference.SettingsActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
...@@ -122,7 +123,7 @@ ...@@ -122,7 +123,7 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/> android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.cards.CardSearchAcitivity" android:name="cn.garymb.ygomobile.ui.cards.CardSearchAcitivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
...@@ -130,7 +131,7 @@ ...@@ -130,7 +131,7 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"/> android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.cards.DeckManagerActivity" android:name="cn.garymb.ygomobile.ui.cards.DeckManagerActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
...@@ -138,7 +139,7 @@ ...@@ -138,7 +139,7 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"/> android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.cards.DeckManagerActivity2" android:name="cn.garymb.ygomobile.ui.cards.DeckManagerActivity2"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"/> android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.cards.DeckManagerActivity3" android:name="cn.garymb.ygomobile.ui.cards.DeckManagerActivity3"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
...@@ -154,43 +155,42 @@ ...@@ -154,43 +155,42 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"/> android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.file.FileActivity" android:name="cn.garymb.ygomobile.ui.file.FileActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/> android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.activities.WebActivity" android:name="cn.garymb.ygomobile.ui.activities.WebActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/> android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.activities.PhotoViewActivity" android:name="cn.garymb.ygomobile.ui.activities.PhotoViewActivity"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme"/> android:theme="@style/AppTheme" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.mycard.MyCardActivity" android:name="cn.garymb.ygomobile.ui.mycard.MyCardActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/AppTheme.Mycard" android:theme="@style/AppTheme.Mycard"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/> android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.mycard.mcchat.McchatActivity" android:name="cn.garymb.ygomobile.ui.mycard.mcchat.McchatActivity"
android:windowSoftInputMode="stateHidden|adjustResize" android:label="@string/app_name"
android:label="@string/app_name"/> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity android:name="cn.garymb.ygomobile.ui.mycard.mcchat.SplashActivity" />
android:name="cn.garymb.ygomobile.ui.mycard.mcchat.SplashActivity"/> <activity android:name="cn.garymb.ygomobile.ui.activities.FileLogActivity" />
<activity android:name="cn.garymb.ygomobile.ui.activities.FileLogActivity"/> <activity android:name="cn.garymb.ygomobile.ui.activities.PermissionsActivity" />
<activity android:name="cn.garymb.ygomobile.ui.activities.PermissionsActivity"/>
<service <service
android:name="cn.garymb.ygomobile.ui.plus.ServiceDuelAssistant" android:name="cn.garymb.ygomobile.ui.plus.ServiceDuelAssistant"
android:priority="1000"/> android:priority="1000" />
<!-- 为防止Service被系统回收,可以尝试通过提高服务的优先级解决,1000是最高优先级,数字越小,优先级越低 --> <!-- 为防止Service被系统回收,可以尝试通过提高服务的优先级解决,1000是最高优先级,数字越小,优先级越低 -->
<!--android:priority="1000"--> <!--android:priority="1000"-->
...@@ -200,23 +200,29 @@ ...@@ -200,23 +200,29 @@
android:exported="true" android:exported="true"
android:launchMode="singleTask" android:launchMode="singleTask"
android:screenOrientation="behind" android:screenOrientation="behind"
android:windowSoftInputMode="adjustResize|stateHidden" > android:windowSoftInputMode="adjustResize|stateHidden"></activity>
</activity>
<activity <activity
android:name="com.base.bj.paysdk.TrPayUnionAcitivity" android:name="com.base.bj.paysdk.TrPayUnionAcitivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:exported="true" android:exported="true"
android:windowSoftInputMode="adjustResize|stateHidden" > android:windowSoftInputMode="adjustResize|stateHidden"></activity>
</activity>
<activity <activity
android:name="com.base.bj.paysdk.TrSelectListActivity" android:name="com.base.bj.paysdk.TrSelectListActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:exported="true" android:exported="true"
android:windowSoftInputMode="adjustResize|stateHidden" > android:windowSoftInputMode="adjustResize|stateHidden"></activity>
</activity>
<meta-data <meta-data
android:name="PGYER_APPID" android:name="PGYER_APPID"
android:value="${PGYER_APPID}" > android:value="${PGYER_APPID}"></meta-data>
</meta-data> <provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fallenstardust"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -9,13 +9,17 @@ import android.net.Uri; ...@@ -9,13 +9,17 @@ import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.preference.Preference; import android.preference.Preference;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import androidx.core.content.FileProvider;
import java.io.File; import java.io.File;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import cn.garymb.ygomobile.Constants; import cn.garymb.ygomobile.Constants;
import cn.garymb.ygomobile.lite.BuildConfig;
import cn.garymb.ygomobile.lite.R; import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.file.FileActivity; import cn.garymb.ygomobile.ui.file.FileActivity;
import cn.garymb.ygomobile.ui.file.FileOpenType; import cn.garymb.ygomobile.ui.file.FileOpenType;
...@@ -28,18 +32,6 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -28,18 +32,6 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
private Preference curPreference; private Preference curPreference;
private CurImageInfo mCurImageInfo; private CurImageInfo mCurImageInfo;
private class CurImageInfo {
public String mOutFile;
public String mCurTitle;
public boolean mJpeg;
public int width;
public int height;
public CurImageInfo() {
}
}
protected void onChooseFileOk(Preference preference, String file) { protected void onChooseFileOk(Preference preference, String file) {
onPreferenceChange(preference, file); onPreferenceChange(preference, file);
} }
...@@ -47,6 +39,7 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -47,6 +39,7 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
protected void onChooseFileFail(Preference preference) { protected void onChooseFileFail(Preference preference) {
} }
protected void showFolderChooser(Preference preference, String defPath, String title) { protected void showFolderChooser(Preference preference, String defPath, String title) {
curPreference = preference; curPreference = preference;
Intent intent = FileActivity.getIntent(getActivity(), title, null, defPath, false, FileOpenType.SelectFolder); Intent intent = FileActivity.getIntent(getActivity(), title, null, defPath, false, FileOpenType.SelectFolder);
...@@ -76,9 +69,9 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -76,9 +69,9 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
} }
public Context getContext() { public Context getContext() {
if(Build.VERSION.SDK_INT>=23) { if (Build.VERSION.SDK_INT >= 23) {
return super.getContext(); return super.getContext();
}else{ } else {
return super.getActivity(); return super.getActivity();
} }
} }
...@@ -126,8 +119,9 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -126,8 +119,9 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
onChooseFileFail(preference); onChooseFileFail(preference);
return; return;
} }
Log.i("我是srcfile", srcfile + "");
File file = new File(info.mOutFile); File file = new File(info.mOutFile);
Uri saveimgUri = Uri.fromFile(file); Uri saveimgUri = FileProvider.getUriForFile(getContext(), BuildConfig.APPLICATION_ID + ".fallenstardust", file);
Intent intent = new Intent("com.android.camera.action.CROP"); Intent intent = new Intent("com.android.camera.action.CROP");
intent.setDataAndType(srcfile, "image/*"); intent.setDataAndType(srcfile, "image/*");
// 下面这个crop=true是设置在开启的Intent中设置显示的VIEW可裁剪 // 下面这个crop=true是设置在开启的Intent中设置显示的VIEW可裁剪
...@@ -143,9 +137,11 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -143,9 +137,11 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
intent.putExtra("return-data", false); intent.putExtra("return-data", false);
intent.putExtra(MediaStore.EXTRA_OUTPUT, saveimgUri); intent.putExtra(MediaStore.EXTRA_OUTPUT, saveimgUri);
intent.putExtra("outputFormat", info.mJpeg ? Bitmap.CompressFormat.JPEG.toString() : Bitmap.CompressFormat.PNG.toString()); intent.putExtra("outputFormat", info.mJpeg ? Bitmap.CompressFormat.JPEG.toString() : Bitmap.CompressFormat.PNG.toString());
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
try { try {
startActivityForResult(Intent.createChooser(intent, info.mCurTitle), Constants.REQUEST_CUT_IMG); startActivityForResult(Intent.createChooser(intent, info.mCurTitle), Constants.REQUEST_CUT_IMG);
} catch (Exception e) { } catch (Exception e) {
Log.i("我是e",e +"");
Toast.makeText(getActivity(), R.string.no_find_image_cutor, Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), R.string.no_find_image_cutor, Toast.LENGTH_SHORT).show();
} }
} }
...@@ -155,6 +151,7 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -155,6 +151,7 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
// Log.i("kk", "result "+requestCode+",data="+data); // Log.i("kk", "result "+requestCode+",data="+data);
if (requestCode == Constants.REQUEST_CHOOSE_IMG) { if (requestCode == Constants.REQUEST_CHOOSE_IMG) {
Log.i("我是“data.getData”", "“" + data.getData() + "”");
if (resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) {
Uri file = data.getData(); Uri file = data.getData();
// onChooseFileOk(curPreference, mOutFile); // onChooseFileOk(curPreference, mOutFile);
...@@ -181,7 +178,7 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -181,7 +178,7 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
} }
} }
onChooseFileFail(curPreference); onChooseFileFail(curPreference);
}else if(requestCode==Constants.REQUEST_CHOOSE_FOLDER){ } else if (requestCode == Constants.REQUEST_CHOOSE_FOLDER) {
//选择文件 //选择文件
if (data != null) { if (data != null) {
Uri uri = data.getData(); Uri uri = data.getData();
...@@ -199,14 +196,6 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -199,14 +196,6 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
public static class SharedPreferencesPlus implements SharedPreferences { public static class SharedPreferencesPlus implements SharedPreferences {
public static SharedPreferencesPlus create(Context context, String name) {
return create(context, name, Context.MODE_PRIVATE|Context.MODE_MULTI_PROCESS);
}
public static SharedPreferencesPlus create(Context context, String name, int mode) {
return new SharedPreferencesPlus(context, name, mode);
}
private SharedPreferences mSharedPreferences; private SharedPreferences mSharedPreferences;
private boolean autoSave = false; private boolean autoSave = false;
private boolean isMultiProess = false; private boolean isMultiProess = false;
...@@ -216,6 +205,14 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -216,6 +205,14 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
isMultiProess = (mode & Context.MODE_MULTI_PROCESS) == Context.MODE_MULTI_PROCESS; isMultiProess = (mode & Context.MODE_MULTI_PROCESS) == Context.MODE_MULTI_PROCESS;
} }
public static SharedPreferencesPlus create(Context context, String name) {
return create(context, name, Context.MODE_PRIVATE | Context.MODE_MULTI_PROCESS);
}
public static SharedPreferencesPlus create(Context context, String name, int mode) {
return new SharedPreferencesPlus(context, name, mode);
}
public SharedPreferences getSharedPreferences() { public SharedPreferences getSharedPreferences() {
return mSharedPreferences; return mSharedPreferences;
} }
...@@ -370,4 +367,16 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment { ...@@ -370,4 +367,16 @@ public abstract class PreferenceFragmentPlus extends BasePreferenceFragment {
mSharedPreferences.unregisterOnSharedPreferenceChangeListener(listener); mSharedPreferences.unregisterOnSharedPreferenceChangeListener(listener);
} }
} }
private class CurImageInfo {
public String mOutFile;
public String mCurTitle;
public boolean mJpeg;
public int width;
public int height;
public CurImageInfo() {
}
}
} }
<?xml version="1.0" encoding="utf-8"?>
<paths>
<files-path
name="fallenstardust"
path="." />
<cache-path
name="keyoyu"
path="." />
<external-cache-path
name="feihuaduo"
path="." />
<external-files-path
name="mercury"
path="." />
<external-path
name="garymb"
path="." />
</paths>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment