Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02941b68 authored by Seigo Nonaka's avatar Seigo Nonaka Committed by Android (Google) Code Review
Browse files

Merge "Hide software input when the Activity is closed." into mnc-dev

parents ac679af9 cbea0442
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.os.Bundle;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.RawContacts;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;

import java.util.ArrayList;

@@ -224,6 +225,15 @@ abstract public class ContactEditorBaseActivity extends ContactsActivity
        }
    }

    @Override
    protected void onPause() {
        super.onPause();
        InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
        if (imm != null) {
            imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
        }
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);