コード例 #1
0
 public Fragment login() {
   final DatabaseLoginFragment fragment = new DatabaseLoginFragment();
   Bundle arguments = new Bundle();
   arguments.putSerializable(
       BaseTitledFragment.AUTHENTICATION_PARAMETER_ARGUMENT,
       new HashMap<>(lock.getAuthenticationParameters()));
   arguments.putBoolean(
       BaseTitledFragment.AUTHENTICATION_USES_EMAIL_ARGUMENT, lock.shouldUseEmail());
   fragment.setArguments(arguments);
   return fragment;
 }
コード例 #2
0
 public Fragment loginWithSocial() {
   final SocialDBFragment fragment = new SocialDBFragment();
   if (lock.getConfiguration() != null) {
     Bundle bundle = new Bundle();
     bundle.putStringArrayList(
         SocialDBFragment.SOCIAL_FRAGMENT_STRATEGIES_ARGUMENT, activeSocialStrategies());
     bundle.putBoolean(
         BaseTitledFragment.AUTHENTICATION_USES_EMAIL_ARGUMENT, lock.shouldUseEmail());
     bundle.putSerializable(
         BaseTitledFragment.AUTHENTICATION_PARAMETER_ARGUMENT,
         new HashMap<>(lock.getAuthenticationParameters()));
     fragment.setArguments(bundle);
   }
   return fragment;
 }
コード例 #3
0
 private Fragment enterpriseLoginWithConnection(Connection connection, boolean isRoot) {
   final DatabaseLoginFragment fragment = new DatabaseLoginFragment();
   Bundle arguments = new Bundle();
   arguments.putSerializable(
       BaseTitledFragment.AUTHENTICATION_PARAMETER_ARGUMENT,
       new HashMap<>(lock.getAuthenticationParameters()));
   arguments.putBoolean(
       BaseTitledFragment.AUTHENTICATION_USES_EMAIL_ARGUMENT, lock.shouldUseEmail());
   if (connection != null) {
     arguments.putParcelable(DatabaseLoginFragment.AD_ENTERPRISE_CONNECTION_ARGUMENT, connection);
   }
   arguments.putBoolean(DatabaseLoginFragment.IS_MAIN_LOGIN_ARGUMENT, isRoot);
   fragment.setArguments(arguments);
   return fragment;
 }