aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/zeapo/pwdstore/AutofillActivity.java
blob: d75610299335ed2d23db60e68be82f22406a9340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.zeapo.pwdstore;

import android.app.PendingIntent;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;


public class AutofillActivity extends AppCompatActivity {
    public static final int REQUEST_CODE_DECRYPT_AND_VERIFY = 9913;
    private boolean bound = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = getIntent();
        PendingIntent pi = intent.getExtras().getParcelable("pending_intent");
        try {
            startIntentSenderForResult(pi.getIntentSender()
                    , REQUEST_CODE_DECRYPT_AND_VERIFY, null, 0, 0, 0);
        } catch (IntentSender.SendIntentException e) {
            Log.e(AutofillService.Constants.TAG, "SendIntentException", e);
        }
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        finish();
        AutofillService.getService().decryptAndVerify();
    }
}