fix: 引入Settings的Module
This commit is contained in:
44
Settings/protos/Android.bp
Normal file
44
Settings/protos/Android.bp
Normal file
@@ -0,0 +1,44 @@
|
||||
package {
|
||||
default_team: "trendy_team_android_settings_app",
|
||||
// See: http://go/android-license-faq
|
||||
// A large-scale-change added 'default_applicable_licenses' to import
|
||||
// all of the 'license_kinds' from "packages_apps_Settings_license"
|
||||
// to get the below license kinds:
|
||||
// SPDX-license-identifier-Apache-2.0
|
||||
default_applicable_licenses: ["packages_apps_Settings_license"],
|
||||
}
|
||||
|
||||
java_library_static {
|
||||
name: "settings-contextual-card-protos-lite",
|
||||
host_supported: true,
|
||||
proto: {
|
||||
type: "lite",
|
||||
},
|
||||
srcs: ["contextual_card_list.proto"],
|
||||
}
|
||||
|
||||
java_library_static {
|
||||
name: "settings-log-bridge-protos-lite",
|
||||
host_supported: true,
|
||||
proto: {
|
||||
type: "lite",
|
||||
},
|
||||
srcs: ["settings_log_bridge.proto"],
|
||||
}
|
||||
|
||||
java_library_static {
|
||||
name: "settings-telephony-protos-lite",
|
||||
host_supported: true,
|
||||
proto: {
|
||||
type: "lite",
|
||||
},
|
||||
srcs: ["network_mode_choices.proto"],
|
||||
}
|
||||
|
||||
java_library {
|
||||
name: "fuelgauge-log-protos-lite",
|
||||
proto: {
|
||||
type: "lite",
|
||||
},
|
||||
srcs: ["fuelgauge_log.proto"],
|
||||
}
|
||||
34
Settings/protos/contextual_card_list.proto
Normal file
34
Settings/protos/contextual_card_list.proto
Normal file
@@ -0,0 +1,34 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package com.android.settings.intelligence;
|
||||
option java_outer_classname = "ContextualCardProto";
|
||||
|
||||
message ContextualCardList {
|
||||
repeated ContextualCard card = 1;
|
||||
}
|
||||
|
||||
message ContextualCard {
|
||||
|
||||
/**
|
||||
* The category of a card: this is a hint for how a card should be collected,
|
||||
* ranked, and presented
|
||||
*/
|
||||
enum Category {
|
||||
DEFAULT = 0;
|
||||
SUGGESTION = 1;
|
||||
POSSIBLE = 2;
|
||||
IMPORTANT = 3;
|
||||
DEFERRED_SETUP = 5;
|
||||
STICKY = 6;
|
||||
}
|
||||
|
||||
/** Slice uri of the contextual card */
|
||||
optional string sliceUri = 1;
|
||||
|
||||
/** Name of the card. It should be identical in every app */
|
||||
optional string cardName = 3;
|
||||
|
||||
optional Category card_category = 4;
|
||||
|
||||
optional double card_score = 5;
|
||||
}
|
||||
52
Settings/protos/fuelgauge_log.proto
Normal file
52
Settings/protos/fuelgauge_log.proto
Normal file
@@ -0,0 +1,52 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package com.android.settings.intelligence;
|
||||
option java_multiple_files = true;
|
||||
option java_package = "com.android.settings.fuelgauge";
|
||||
option java_outer_classname = "FuelgaugeLogProto";
|
||||
|
||||
// Store history of setting optimize mode
|
||||
message BatteryOptimizeHistoricalLog {
|
||||
repeated BatteryOptimizeHistoricalLogEntry log_entry = 1;
|
||||
}
|
||||
|
||||
message BatteryOptimizeHistoricalLogEntry {
|
||||
// The action to set optimize mode
|
||||
enum Action {
|
||||
UNKNOWN = 0;
|
||||
LEAVE = 1;
|
||||
APPLY = 2;
|
||||
RESET = 3;
|
||||
RESTORE = 4;
|
||||
BACKUP = 5;
|
||||
FORCE_RESET = 6;
|
||||
}
|
||||
|
||||
optional string package_name = 1;
|
||||
optional Action action = 2;
|
||||
optional string action_description = 3;
|
||||
optional int64 timestamp = 4;
|
||||
}
|
||||
|
||||
|
||||
// Store history of battery usage periodic job
|
||||
message BatteryUsageHistoricalLog {
|
||||
repeated BatteryUsageHistoricalLogEntry log_entry = 1;
|
||||
}
|
||||
|
||||
message BatteryUsageHistoricalLogEntry {
|
||||
// The action to record battery usage job event
|
||||
enum Action {
|
||||
UNKNOWN = 0;
|
||||
SCHEDULE_JOB = 1;
|
||||
EXECUTE_JOB = 2;
|
||||
RECHECK_JOB = 3;
|
||||
FETCH_USAGE_DATA = 4;
|
||||
INSERT_USAGE_DATA = 5;
|
||||
TIME_UPDATED = 6;
|
||||
}
|
||||
|
||||
optional int64 timestamp = 1;
|
||||
optional Action action = 2;
|
||||
optional string action_description = 3;
|
||||
}
|
||||
130
Settings/protos/network_mode_choices.proto
Normal file
130
Settings/protos/network_mode_choices.proto
Normal file
@@ -0,0 +1,130 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package com.android.settings.intelligence;
|
||||
option java_multiple_files = false;
|
||||
option java_package = "com.android.settings.network.telephony";
|
||||
option java_outer_classname = "NetworkModeChoicesProto";
|
||||
|
||||
// EnabledNetworks is a list which tries to categorized the entries of popup menu
|
||||
// based on carrier network types available to the end user.
|
||||
|
||||
// Next tag: 15
|
||||
// TODO(b/268145152): rename the ENABLED_NETWORKS for good readability.
|
||||
enum EnabledNetworks {
|
||||
// No EnabledNetworks specified.
|
||||
ENABLED_NETWORKS_UNSPECIFIED = 0;
|
||||
|
||||
// For the case where either unsupported or unable to categorized properly.
|
||||
ENABLED_NETWORKS_UNKNOWN = 1;
|
||||
|
||||
// For the case where CDMA is supported and LTE is not prioritized over
|
||||
// CDMA (LTE, 3G, 1x, global).
|
||||
ENABLED_NETWORKS_CDMA_CHOICES = 2;
|
||||
|
||||
// For the case where CDMA is supported and LTE is not available.
|
||||
// CDMA (3G, 1x)
|
||||
ENABLED_NETWORKS_CDMA_NO_LTE_CHOICES = 3;
|
||||
|
||||
// For the case where CDMA is supported and LTE is available.
|
||||
// CDMA (LTE, Global)
|
||||
ENABLED_NETWORKS_CDMA_ONLY_LTE_CHOICES = 4;
|
||||
|
||||
// For the case where TDSCDMA is primary network type.
|
||||
// TDSCDMA (LTE, 3G, 2G)
|
||||
ENABLED_NETWORKS_TDSCDMA_CHOICES = 5;
|
||||
|
||||
// For the case where GSM and LTE options are removed from the menu.
|
||||
// (3G)
|
||||
ENABLED_NETWORKS_EXCEPT_GSM_LTE_CHOICES = 6;
|
||||
|
||||
// For the case where GSM option are removed from the menu. The wording of LTE is '4G'.
|
||||
// (4G, 3G)
|
||||
ENABLED_NETWORKS_EXCEPT_GSM_4G_CHOICES = 7;
|
||||
|
||||
// For the case where GSM option are removed from the menu. The wording of LTE is 'LTE'.
|
||||
// (LTE, 3G)
|
||||
ENABLED_NETWORKS_EXCEPT_GSM_CHOICES = 8;
|
||||
|
||||
// For the case where LTE is disabled.
|
||||
// (3G, 3G)
|
||||
ENABLED_NETWORKS_EXCEPT_LTE_CHOICES = 9;
|
||||
|
||||
// For the case where GSM related carrier with 4G/LTE supported. The wording of LTE is '4G'.
|
||||
// (2G, 3G, 4G)
|
||||
ENABLED_NETWORKS_4G_CHOICES = 10;
|
||||
|
||||
// For the case where GSM related carrier with 4G/LTE supported. The wording of LTE is 'LTE'.
|
||||
// (2G, 3G, LTE)
|
||||
ENABLED_NETWORKS_CHOICES = 11;
|
||||
|
||||
// For the case where world mode is enabled.
|
||||
// ("Global", "LTE / CDMA", "LTE / GSM / UMTS")
|
||||
PREFERRED_NETWORK_MODE_CHOICES_WORLD_MODE = 12;
|
||||
|
||||
// For the case where GSM, 3G options are removed from the menu. The wording of LTE is '4G'.
|
||||
// (4G)
|
||||
ENABLED_NETWORKS_4G_CHOICES_EXCEPT_GSM_3G = 13;
|
||||
|
||||
// For the case where GSM and 3G are removed from the menu. The wording of LTE is 'LTE'.
|
||||
// (LTE)
|
||||
ENABLED_NETWORKS_CHOICES_EXCEPT_GSM_3G = 14;
|
||||
}
|
||||
|
||||
// A request for popup menu.
|
||||
|
||||
// Next tag: 4
|
||||
message UiOptions {
|
||||
// Mapping to popup menu categories.
|
||||
required EnabledNetworks type = 1;
|
||||
|
||||
// Resource which provides a list of network type values for this popup menu.
|
||||
required int32 choices = 2;
|
||||
|
||||
// Presentation format of a continuous popop menu entries.
|
||||
// Each format may contains any numbers of popop menu entries.
|
||||
|
||||
// Next tag: 12
|
||||
enum PresentFormat {
|
||||
|
||||
// No PresentFormat specified.
|
||||
PRESENT_FORMAT_UNSPECIFIED = 0;
|
||||
|
||||
// Append a CDMA 1x network option into popup menu.
|
||||
add1xEntry = 1;
|
||||
|
||||
// Append a 2G network option into popup menu.
|
||||
add2gEntry = 2;
|
||||
|
||||
// Append a 3G network option into popup menu.
|
||||
add3gEntry = 3;
|
||||
|
||||
// Append a global mode option into popup menu.
|
||||
addGlobalEntry = 4;
|
||||
|
||||
// Append a CDMA/LTE global mode option into popup menu.
|
||||
addWorldModeCdmaEntry = 5;
|
||||
|
||||
// Append a GSM/LTE global mode option into popup menu.
|
||||
addWorldModeGsmEntry = 6;
|
||||
|
||||
// Append a 4G network option into popup menu.
|
||||
add4gEntry = 7;
|
||||
|
||||
// Append a LTE network option into popup menu.
|
||||
addLteEntry = 8;
|
||||
|
||||
// Append a 5G network option into popup menu.
|
||||
add5gEntry = 9;
|
||||
|
||||
// Append both 5G and 4G network options into popup menu.
|
||||
add5gAnd4gEntry = 10;
|
||||
|
||||
// Append both 5G and LTE network options into popup menu.
|
||||
add5gAndLteEntry = 11;
|
||||
}
|
||||
|
||||
// Format of popup menu entries.
|
||||
// The length of this entry need to be less than the network type values
|
||||
// referenced from "choices" field.
|
||||
repeated PresentFormat format = 3;
|
||||
}
|
||||
37
Settings/protos/settings_log_bridge.proto
Normal file
37
Settings/protos/settings_log_bridge.proto
Normal file
@@ -0,0 +1,37 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package com.android.settings.intelligence;
|
||||
option java_outer_classname = "LogProto";
|
||||
|
||||
message SettingsLog {
|
||||
/**
|
||||
* Where this SettingsUIChange event comes from. For example, if
|
||||
* it's a PAGE_VISIBLE event, where the page is opened from.
|
||||
*/
|
||||
optional int32 attribution = 1;
|
||||
|
||||
/**
|
||||
* What the UI action is.
|
||||
*/
|
||||
optional int32 action = 2;
|
||||
|
||||
/**
|
||||
* Where the action is happening
|
||||
*/
|
||||
optional int32 page_id = 3;
|
||||
|
||||
/**
|
||||
* What preference changed in this event.
|
||||
*/
|
||||
optional string changed_preference_key = 4;
|
||||
|
||||
/**
|
||||
* The new value of the changed preference.
|
||||
*/
|
||||
optional int32 changed_preference_int_value = 5;
|
||||
|
||||
/**
|
||||
* The timestamp of a log event
|
||||
*/
|
||||
optional string timestamp = 6;
|
||||
}
|
||||
Reference in New Issue
Block a user