Removed unused flag from notifyTextChanged().

(and also fixed typo on hidden constant)

Test: m update-api
Test: atest CtsContentCaptureServiceTestCases
Fixes: 123598012

Change-Id: I63ccb60cf8eebe6b5ef6d7961dbb0ac8be088eda
diff --git a/core/java/android/view/contentcapture/ContentCaptureSession.java b/core/java/android/view/contentcapture/ContentCaptureSession.java
index c425e7b..7b8fb9c 100644
--- a/core/java/android/view/contentcapture/ContentCaptureSession.java
+++ b/core/java/android/view/contentcapture/ContentCaptureSession.java
@@ -54,7 +54,7 @@
      * @hide
      */
     // NOTE: not prefixed by STATE_ so it's not printed on getStateAsString()
-    public static final int UNKNWON_STATE = 0x0;
+    public static final int UNKNOWN_STATE = 0x0;
 
     /**
      * Service's startSession() was called, but server didn't confirm it was created yet.
@@ -159,7 +159,7 @@
     @Nullable
     protected final String mId;
 
-    private int mState = UNKNWON_STATE;
+    private int mState = UNKNOWN_STATE;
 
     // Lazily created on demand.
     private ContentCaptureSessionId mContentCaptureSessionId;
@@ -349,10 +349,8 @@
      *
      * @param id of the node.
      * @param text new text.
-     * @param flags currently ignored.
      */
-    public final void notifyViewTextChanged(@NonNull AutofillId id, @Nullable CharSequence text,
-            int flags) {
+    public final void notifyViewTextChanged(@NonNull AutofillId id, @Nullable CharSequence text) {
         Preconditions.checkNotNull(id);
 
         if (!isContentCaptureEnabled()) return;
@@ -438,7 +436,7 @@
     /** @hide */
     @NonNull
     protected static String getStateAsString(int state) {
-        return state + " (" + (state == UNKNWON_STATE ? "UNKNOWN"
+        return state + " (" + (state == UNKNOWN_STATE ? "UNKNOWN"
                 : DebugUtils.flagsToString(ContentCaptureSession.class, "STATE_", state)) + ")";
     }
 
diff --git a/core/java/android/view/contentcapture/MainContentCaptureSession.java b/core/java/android/view/contentcapture/MainContentCaptureSession.java
index 72aefb2..2eca51f 100644
--- a/core/java/android/view/contentcapture/MainContentCaptureSession.java
+++ b/core/java/android/view/contentcapture/MainContentCaptureSession.java
@@ -115,7 +115,7 @@
     @Nullable
     private DeathRecipient mDirectServiceVulture;
 
-    private int mState = UNKNWON_STATE;
+    private int mState = UNKNOWN_STATE;
 
     @Nullable
     private IBinder mApplicationToken;
@@ -367,7 +367,7 @@
     }
 
     private boolean handleHasStarted() {
-        return mState != UNKNWON_STATE;
+        return mState != UNKNOWN_STATE;
     }
 
     private void handleScheduleFlush(@FlushReason int reason, boolean checkExisting) {