Google introduces a new API for protecting text data
Google has released the second developer preview of Android 16, showcasing a variety of new features, including enhanced haptic feedback, support for cloud search in the photo picker, and an adaptive refresh rate API. However, not all innovations were officially announced.
One of the hidden features is a system that restricts the use of artificial intelligence (AI) tools when entering text. Specifically, Google has added a new application programming interface (API) that allows developers to disable AI-generated text in critical scenarios.
Control over AI in text fields
The new API includes two functions: isWritingToolsEnabled() and setWritingToolsEnabled(), which have been added to the EditorInfo class. This class conveys information about the editable text field, such as its type and purpose.
The isWritingToolsEnabled() function allows developers to determine whether AI writing tools are enabled for a text field. By default, they are active for all fields. However, developers can disable them in specific cases, such as when entering passwords, phone numbers, or email addresses.
Using the setWritingToolsEnabled() function, applications can prohibit the use of AI for rewriting or editing entered text, providing additional data protection.
Reasons for restricting AI in text input
Modern keyboards, such as Gboard, are equipped with AI tools that assist in editing text, correcting spelling and grammar, and rephrasing sentences using cloud technologies. However, implementing such capabilities also carries certain risks.
Earlier in 2024, reports emerged about instances where lawyers in Canada and the U.S. faced penalties due to the use of AI-generated text. In one case, the system invented non-existent legal precedents, and in another, it produced fake quotes. These incidents highlight the importance of strict oversight in the application of AI in critical scenarios.
Android 16 addresses this issue by allowing developers to limit AI in text fields where accuracy and security are paramount. For instance, when entering sensitive information such as passwords or card numbers, the system can block any AI interventions.
New security standards in Android 16
Most text fields in applications will still be able to use AI to enhance usability. However, Google emphasizes that in critical cases, protecting user data remains a priority.
The new API capabilities are expected to help mitigate risks associated with AI implementation and increase trust in text processing technologies. The full release of Android 16 with these features is scheduled for 2024.