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

Commit 66c80f29 authored by Seigo Nonaka's avatar Seigo Nonaka Committed by Android Git Automerger
Browse files

am 254cc46e: am 02941b68: Merge "Hide software input when the Activity is closed." into mnc-dev

* commit '254cc46e':
  Hide software input when the Activity is closed.
parents aec68d53 254cc46e
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);