mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 04:22:18 -05:00
renamed to clarify necessity for two install dialog fragments
This commit is contained in:
parent
c05a958eaa
commit
8e0903d85e
@ -24,7 +24,7 @@ import android.support.v4.app.DialogFragment;
|
|||||||
|
|
||||||
import org.sufficientlysecure.keychain.ui.util.InstallDialogFragmentHelper;
|
import org.sufficientlysecure.keychain.ui.util.InstallDialogFragmentHelper;
|
||||||
|
|
||||||
public class InstallDialogFragment extends DialogFragment {
|
public class SupportInstallDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
public static final int MESSAGE_MIDDLE_CLICKED = 1;
|
public static final int MESSAGE_MIDDLE_CLICKED = 1;
|
||||||
|
|
||||||
@ -39,10 +39,10 @@ public class InstallDialogFragment extends DialogFragment {
|
|||||||
* @param middleButton if not null, adds a third button to the app with a call back
|
* @param middleButton if not null, adds a third button to the app with a call back
|
||||||
* @return The dialog to display
|
* @return The dialog to display
|
||||||
*/
|
*/
|
||||||
public static InstallDialogFragment newInstance(Messenger messenger, int title, int message,
|
public static SupportInstallDialogFragment newInstance(Messenger messenger, int title, int message,
|
||||||
String packageToInstall, int middleButton, boolean
|
String packageToInstall, int middleButton, boolean
|
||||||
useMiddleButton) {
|
useMiddleButton) {
|
||||||
InstallDialogFragment frag = new InstallDialogFragment();
|
SupportInstallDialogFragment frag = new SupportInstallDialogFragment();
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
|
|
||||||
InstallDialogFragmentHelper.wrapIntoArgs(messenger, title, message, packageToInstall, middleButton,
|
InstallDialogFragmentHelper.wrapIntoArgs(messenger, title, message, packageToInstall, middleButton,
|
||||||
@ -61,7 +61,7 @@ public class InstallDialogFragment extends DialogFragment {
|
|||||||
* @param packageToInstall
|
* @param packageToInstall
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static InstallDialogFragment newInstance(int title, int message,
|
public static SupportInstallDialogFragment newInstance(int title, int message,
|
||||||
String packageToInstall) {
|
String packageToInstall) {
|
||||||
return newInstance(null, title, message, packageToInstall, -1, false);
|
return newInstance(null, title, message, packageToInstall, -1, false);
|
||||||
}
|
}
|
@ -59,7 +59,7 @@ import android.support.v4.app.DialogFragment;
|
|||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
import org.sufficientlysecure.keychain.ui.dialog.InstallDialogFragment;
|
import org.sufficientlysecure.keychain.ui.dialog.SupportInstallDialogFragment;
|
||||||
import org.sufficientlysecure.keychain.ui.dialog.OrbotStartDialogFragment;
|
import org.sufficientlysecure.keychain.ui.dialog.OrbotStartDialogFragment;
|
||||||
import org.sufficientlysecure.keychain.ui.dialog.PreferenceInstallDialogFragment;
|
import org.sufficientlysecure.keychain.ui.dialog.PreferenceInstallDialogFragment;
|
||||||
import org.sufficientlysecure.keychain.util.Preferences;
|
import org.sufficientlysecure.keychain.util.Preferences;
|
||||||
@ -108,12 +108,12 @@ public class OrbotHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static DialogFragment getInstallDialogFragment() {
|
public static DialogFragment getInstallDialogFragment() {
|
||||||
return InstallDialogFragment.newInstance(R.string.orbot_install_dialog_title,
|
return SupportInstallDialogFragment.newInstance(R.string.orbot_install_dialog_title,
|
||||||
R.string.orbot_install_dialog_content, ORBOT_PACKAGE_NAME);
|
R.string.orbot_install_dialog_content, ORBOT_PACKAGE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DialogFragment getInstallDialogFragmentWithThirdButton(Messenger messenger, int middleButton) {
|
public static DialogFragment getInstallDialogFragmentWithThirdButton(Messenger messenger, int middleButton) {
|
||||||
return InstallDialogFragment.newInstance(messenger, R.string.orbot_install_dialog_title,
|
return SupportInstallDialogFragment.newInstance(messenger, R.string.orbot_install_dialog_title,
|
||||||
R.string.orbot_install_dialog_content, ORBOT_PACKAGE_NAME, middleButton, true);
|
R.string.orbot_install_dialog_content, ORBOT_PACKAGE_NAME, middleButton, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user