|
37 | 37 | import com.mcal.mcpelauncher.R; |
38 | 38 | import com.mcal.mcpelauncher.activities.MCPkgPickerActivity; |
39 | 39 | import com.mcal.mcpelauncher.activities.SplashesActivity; |
| 40 | +import com.mcal.mcpelauncher.data.Constants; |
40 | 41 | import com.mcal.mcpelauncher.data.Preferences; |
41 | 42 | import com.mcal.mcpelauncher.services.BackgroundSoundPlayer; |
42 | 43 | import com.mcal.mcpelauncher.ui.AboutActivity; |
@@ -136,32 +137,32 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { |
136 | 137 | updatePreferences(); |
137 | 138 | } |
138 | 139 |
|
139 | | - /*@Override |
| 140 | + @Override |
140 | 141 | public void onActivityResult(int requestCode, int resultCode, Intent data) { |
141 | 142 | super.onActivityResult(requestCode, resultCode, data); |
142 | 143 |
|
143 | 144 | if (requestCode == DirPickerActivity.REQUEST_PICK_DIR && resultCode == AppCompatActivity.RESULT_OK) { |
144 | 145 | String dir = data.getExtras().getString(DirPickerActivity.TAG_DIR_PATH); |
145 | 146 | Preferences.setDataSavedPath(dir); |
146 | | - if (dir.equals(Constants.STRING_VALUE_DEFAULT)) { |
147 | | - Snackbar.make(requireActivity().getWindow().getDecorView(), getString(R.string.preferences_update_message_reset_data_path), 2500).show(); |
148 | | - } else { |
149 | | - Snackbar.make(requireActivity().getWindow().getDecorView(), getString(R.string.preferences_update_message_data_path, dir), 2500).show(); |
150 | | - } |
| 147 | +// if (dir.equals(Constants.STRING_VALUE_DEFAULT)) { |
| 148 | +// Snackbar.make(requireActivity().getWindow().getDecorView(), getString(R.string.preferences_update_message_reset_data_path), 2500).show(); |
| 149 | +// } else { |
| 150 | +// Snackbar.make(requireActivity().getWindow().getDecorView(), getString(R.string.preferences_update_message_data_path, dir), 2500).show(); |
| 151 | +// } |
151 | 152 | } else if (requestCode == MCPkgPickerActivity.REQUEST_PICK_PACKAGE && resultCode == AppCompatActivity.RESULT_OK) { |
152 | 153 | String pkgName = data.getExtras().getString("package_name"); |
153 | 154 | Preferences.setMinecraftPackageName(pkgName); |
154 | | - if (pkgName.equals(Constants.STRING_VALUE_DEFAULT)) { |
155 | | - Snackbar.make(requireActivity().getWindow().getDecorView(), getString(R.string.preferences_update_message_reset_pkg_name), 2500).show(); |
156 | | - } else { |
157 | | - Snackbar.make(requireActivity().getWindow().getDecorView(), getString(R.string.preferences_update_message_pkg_name, pkgName), 2500).show(); |
158 | | - } |
| 155 | +// if (pkgName.equals(Constants.STRING_VALUE_DEFAULT)) { |
| 156 | +// Snackbar.make(requireActivity().getWindow().getDecorView(), getString(R.string.preferences_update_message_reset_pkg_name), 2500).show(); |
| 157 | +// } else { |
| 158 | +// Snackbar.make(requireActivity().getWindow().getDecorView(), getString(R.string.preferences_update_message_pkg_name, pkgName), 2500).show(); |
| 159 | +// } |
159 | 160 | Intent intent = new Intent(getActivity(), SplashesActivity.class); |
160 | 161 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); |
161 | 162 | requireActivity().startActivity(intent); |
162 | 163 | } |
163 | 164 | updatePreferences(); |
164 | | - }*/ |
| 165 | + } |
165 | 166 |
|
166 | 167 | private void updatePreferences() { |
167 | 168 | if (Preferences.getDataSavedPath().equals("default")) { |
|
0 commit comments