Skip to content

Commit 48a31d8

Browse files
committed
Remove ability for Android to use public storage
1 parent 092bc87 commit 48a31d8

File tree

4 files changed

+35
-38
lines changed

4 files changed

+35
-38
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ change on one device, overwriting a change on another device.
6262
## Optional and Self hosted Syncing
6363

6464
Syncing is entirely optional, you can install the client and use it on one device, or you can
65-
install the server and
66-
sync your data between devices. You could even use some other service to sync your data, like
67-
[syncthing](https://syncthing.net/). (_If you only care about Desktop platforms you could use
68-
Dropbox or Google Drive._)
65+
install the server and sync your data between devices. You could even use some other service to sync
66+
your data, like
67+
Dropbox, Google Drive or [syncthing](https://syncthing.net/). (_however these will only work for
68+
syncing between desktop
69+
computers. Mobile clients will have to use the built in syncing protocol._)
70+
6971
It's all up to you. Instructions can be found [here](docs/HOW-TO-RUN-A-SERVER.md).
7072

7173
If you don't know how, or just don't want to setup your own server, we're also running an official

android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
android:roundIcon="@mipmap/ic_launcher_round"
1313
android:supportsRtl="true"
1414
android:theme="@style/Theme.Hammer"
15-
android:usesCleartextTraffic="true"
16-
android:requestLegacyExternalStorage="true">
15+
android:usesCleartextTraffic="true">
1716

1817
<activity
1918
android:name=".ProjectSelectActivity"

common/src/androidMain/AndroidManifest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@
33

44
<uses-permission android:name="android.permission.INTERNET" />
55
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
6-
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
7-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
8-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
96
</manifest>

composeUi/src/androidMain/kotlin/com/darkrockstudios/apps/hammer/common/projectselection/settings/PlatformSettingsUi.android.kt

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.darkrockstudios.apps.hammer.common.projectselection.settings
22

33
import androidx.compose.foundation.layout.ColumnScope
44
import androidx.compose.foundation.layout.Row
5-
import androidx.compose.material3.Button
65
import androidx.compose.material3.Checkbox
76
import androidx.compose.material3.MaterialTheme
87
import androidx.compose.material3.Text
@@ -53,35 +52,35 @@ actual fun ColumnScope.PlatformSettingsUi(component: PlatformSettings) {
5352
color = MaterialTheme.colorScheme.onBackground,
5453
)
5554

56-
if (state.dataStorageInternal.not()) {
57-
Text(
58-
projectsPathText,
59-
style = MaterialTheme.typography.bodySmall,
60-
color = MaterialTheme.colorScheme.onBackground,
61-
)
62-
} else {
63-
Text(
64-
"Using Internal data storage",
65-
style = MaterialTheme.typography.bodySmall,
66-
color = MaterialTheme.colorScheme.onBackground,
67-
)
68-
}
55+
// if (state.dataStorageInternal.not()) {
56+
// Text(
57+
// projectsPathText,
58+
// style = MaterialTheme.typography.bodySmall,
59+
// color = MaterialTheme.colorScheme.onBackground,
60+
// )
61+
// } else {
62+
// Text(
63+
// "Using Internal data storage",
64+
// style = MaterialTheme.typography.bodySmall,
65+
// color = MaterialTheme.colorScheme.onBackground,
66+
// )
67+
// }
6968

70-
if (state.fileAccessGranted.not()) {
71-
Button(onClick = component::promptForFileAccess) {
72-
Text("Grant access")
73-
}
74-
} else {
75-
if (state.dataStorageInternal) {
76-
Button(onClick = component::setExternalStorage) {
77-
Text("Switch to External Storage")
78-
}
79-
} else {
80-
Button(onClick = component::setInternalStorage) {
81-
Text("Switch to Internal Storage")
82-
}
83-
}
84-
}
69+
// if (state.fileAccessGranted.not()) {
70+
// Button(onClick = component::promptForFileAccess) {
71+
// Text("Grant access")
72+
// }
73+
// } else {
74+
// if (state.dataStorageInternal) {
75+
// Button(onClick = component::setExternalStorage) {
76+
// Text("Switch to External Storage")
77+
// }
78+
// } else {
79+
// Button(onClick = component::setInternalStorage) {
80+
// Text("Switch to Internal Storage")
81+
// }
82+
// }
83+
// }
8584

8685
// TODO this isn't working yet, probably need a different directory picker
8786
// DirectoryPicker(showDirectoryPicker) { path ->

0 commit comments

Comments
 (0)