デバッグメニューのパス取得ボタンで直接呼び出すようにしてみた

This commit is contained in:
r-ca 2023-12-14 03:26:51 +09:00
parent 52049d599a
commit 6c1bd61240
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -18,6 +18,8 @@ import javax.inject.Inject;
import one.nem.lacerta.data.repository.DeviceMeta; import one.nem.lacerta.data.repository.DeviceMeta;
import one.nem.lacerta.utils.repository.DeviceInfoUtils;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
@ -32,6 +34,7 @@ public class DebugMenuFragment extends Fragment {
DeviceMeta deviceMeta; DeviceMeta deviceMeta;
@Inject @Inject
DeviceInfoUtils deviceInfoUtils;
public DebugMenuFragment() { public DebugMenuFragment() {
@ -80,7 +83,7 @@ public class DebugMenuFragment extends Fragment {
}); });
view.findViewById(R.id.btn_debug_menu_get_external_path).setOnClickListener( v -> { view.findViewById(R.id.btn_debug_menu_get_external_path).setOnClickListener( v -> {
Toast.makeText(getContext(), getContext().getExternalFilesDir(null).toPath().toString(), Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), deviceInfoUtils.getExternalStorageDirectory().toString(), Toast.LENGTH_SHORT).show();
}); });
view.findViewById(R.id.btn_debug_menu_file_write_test).setOnClickListener( v -> { view.findViewById(R.id.btn_debug_menu_file_write_test).setOnClickListener( v -> {