Exemplo n.º 1
0
        public override void OnSaveRequest(SaveRequest request, SaveCallback callback)
        {
            var context     = request.FillContexts;
            var structure   = context[context.Count - 1].Structure;
            var packageName = structure.ActivityComponent.PackageName;

            if (!SharedPrefsPackageVerificationRepository.GetInstance()
                .PutPackageSignatures(ApplicationContext, packageName))
            {
                callback.OnFailure(
                    ApplicationContext.GetString(Resource.String.invalid_package_signature));
                return;
            }

            var data = request.ClientState;

            if (CommonUtil.VERBOSE)
            {
                Log.Verbose(CommonUtil.TAG, "onSaveRequest(): data=" + CommonUtil.BundleToString(data));
                CommonUtil.DumpStructure(structure);
            }

            var parser = new StructureParser(ApplicationContext, structure);

            parser.ParseForSave();
            var filledAutofillFieldCollection = parser.GetClientFormData();

            SharedPrefsAutofillRepository.GetInstance()
            .SaveFilledAutofillFieldCollection(this, filledAutofillFieldCollection);
        }
Exemplo n.º 2
0
        public override void OnSaveRequest(SaveRequest request, SaveCallback callback)
        {
            var structure = request.FillContexts?.LastOrDefault()?.Structure;

            if (structure == null)
            {
                return;
            }

            var parser = new StructureParser(this, structure);
            var query  = parser.ParseForSave();

            try
            {
                HandleSaveRequest(parser, query);
                callback.OnSuccess();
            }
            catch (Exception e)
            {
                callback.OnFailure(e.Message);
            }
        }
Exemplo n.º 3
0
 public override void OnSaveRequest(SaveRequest request, SaveCallback callback)
 {
     //TODO implement save
     callback.OnFailure("Saving data is currently not implemented in Keepass2Android.");
 }