ConversationActions Config installer.

This installs model updates for smart reply/actions
aka conversation actions.

Test: none
Bug: 111437455
Bug: 111406942
Change-Id: I9cb04e7b20b565ac5d128475a90bd065c805e95e
This commit is contained in:
Abodunrinwa Toki
2018-10-30 19:13:04 +00:00
parent abbcfb2dba
commit f438e14dfd
7 changed files with 63 additions and 2 deletions

View File

@@ -3938,6 +3938,7 @@ package android.os {
public final class ConfigUpdate {
field public static final java.lang.String ACTION_UPDATE_CARRIER_ID_DB = "android.os.action.UPDATE_CARRIER_ID_DB";
field public static final java.lang.String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS";
field public static final java.lang.String ACTION_UPDATE_CONVERSATION_ACTIONS = "android.intent.action.UPDATE_CONVERSATION_ACTIONS";
field public static final java.lang.String ACTION_UPDATE_CT_LOGS = "android.intent.action.UPDATE_CT_LOGS";
field public static final java.lang.String ACTION_UPDATE_INTENT_FIREWALL = "android.intent.action.UPDATE_INTENT_FIREWALL";
field public static final java.lang.String ACTION_UPDATE_LANG_ID = "android.intent.action.UPDATE_LANG_ID";

View File

@@ -82,6 +82,14 @@ public final class ConfigUpdate {
public static final String ACTION_UPDATE_SMART_SELECTION
= "android.intent.action.UPDATE_SMART_SELECTION";
/**
* Update conversation actions model file.
* @hide
*/
@SystemApi
public static final String ACTION_UPDATE_CONVERSATION_ACTIONS
= "android.intent.action.UPDATE_CONVERSATION_ACTIONS";
/**
* Update network watchlist config file.
* @hide

View File

@@ -12128,6 +12128,20 @@ public final class Settings {
public static final String SMART_SELECTION_UPDATE_METADATA_URL =
"smart_selection_metadata_url";
/**
* URL for conversation actions model updates
* @hide
*/
public static final String CONVERSATION_ACTIONS_UPDATE_CONTENT_URL =
"conversation_actions_content_url";
/**
* URL for conversation actions model update metadata
* @hide
*/
public static final String CONVERSATION_ACTIONS_UPDATE_METADATA_URL =
"conversation_actions_metadata_url";
/**
* SELinux enforcement status. If 0, permissive; if 1, enforcing.
* @hide

View File

@@ -4500,6 +4500,14 @@
</intent-filter>
</receiver>
<receiver android:name="com.android.server.updates.ConversationActionsInstallReceiver"
android:permission="android.permission.UPDATE_CONFIG">
<intent-filter>
<action android:name="android.intent.action.ACTION_UPDATE_CONVERSATION_ACTIONS" />
<data android:scheme="content" android:host="*" android:mimeType="*/*" />
</intent-filter>
</receiver>
<receiver android:name="com.android.server.updates.CarrierIdInstallReceiver"
android:permission="android.permission.UPDATE_CONFIG">
<intent-filter>

View File

@@ -181,6 +181,8 @@ public class SettingsBackupTest {
Settings.Global.CONNECTIVITY_METRICS_BUFFER_SIZE,
Settings.Global.CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS,
Settings.Global.CONTACT_METADATA_SYNC_ENABLED,
Settings.Global.CONVERSATION_ACTIONS_UPDATE_CONTENT_URL,
Settings.Global.CONVERSATION_ACTIONS_UPDATE_METADATA_URL,
Settings.Global.CONTACTS_DATABASE_WAL_ENABLED,
Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE,
Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI,

View File

@@ -0,0 +1,28 @@
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.server.updates;
public class ConversationActionsInstallReceiver extends ConfigUpdateInstallReceiver {
public ConversationActionsInstallReceiver() {
super(
"/data/misc/textclassifier/",
"actions_suggestions.model",
"metadata/actions_suggestions",
"version");
}
}

View File

@@ -21,8 +21,8 @@ public class LangIdInstallReceiver extends ConfigUpdateInstallReceiver {
public LangIdInstallReceiver() {
super(
"/data/misc/textclassifier/",
"textclassifier.langid.model",
"metadata/langid",
"lang_id.model",
"metadata/lang_id",
"version");
}
}