mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Hide Transfer Data feature behind feature flag
This commit is contained in:
@@ -12,4 +12,6 @@ public interface FeatureFlags {
|
|||||||
boolean shouldEnableDisappearingMessages();
|
boolean shouldEnableDisappearingMessages();
|
||||||
|
|
||||||
boolean shouldEnableConnectViaBluetooth();
|
boolean shouldEnableConnectViaBluetooth();
|
||||||
|
|
||||||
|
boolean shouldEnableTransferData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ public class TestFeatureFlagModule {
|
|||||||
public boolean shouldEnableConnectViaBluetooth() {
|
public boolean shouldEnableConnectViaBluetooth() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldEnableTransferData() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,6 +307,11 @@ public class AppModule {
|
|||||||
public boolean shouldEnableConnectViaBluetooth() {
|
public boolean shouldEnableConnectViaBluetooth() {
|
||||||
return IS_DEBUG_BUILD;
|
return IS_DEBUG_BUILD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldEnableTransferData() {
|
||||||
|
return IS_DEBUG_BUILD;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ public class ConversationActivity extends BriarActivity
|
|||||||
menu.findItem(R.id.action_connect_via_bluetooth).setVisible(false);
|
menu.findItem(R.id.action_connect_via_bluetooth).setVisible(false);
|
||||||
}
|
}
|
||||||
// Transfer Data feature only supported on API 19+
|
// Transfer Data feature only supported on API 19+
|
||||||
if (SDK_INT >= 19) { // TODO also hide behind feature flag
|
if (SDK_INT >= 19 && featureFlags.shouldEnableTransferData()) {
|
||||||
menu.findItem(R.id.action_transfer_data).setVisible(true);
|
menu.findItem(R.id.action_transfer_data).setVisible(true);
|
||||||
}
|
}
|
||||||
// enable alias and bluetooth action once available
|
// enable alias and bluetooth action once available
|
||||||
|
|||||||
@@ -96,5 +96,6 @@ internal class HeadlessModule(private val appDir: File) {
|
|||||||
override fun shouldEnableProfilePictures() = false
|
override fun shouldEnableProfilePictures() = false
|
||||||
override fun shouldEnableDisappearingMessages() = false
|
override fun shouldEnableDisappearingMessages() = false
|
||||||
override fun shouldEnableConnectViaBluetooth() = false
|
override fun shouldEnableConnectViaBluetooth() = false
|
||||||
|
override fun shouldEnableTransferData() = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user