Skip to content

Commit

Permalink
SystemUI: Import smartspace proto
Browse files Browse the repository at this point in the history
Signed-off-by: NurKeinNeid <[email protected]>
  • Loading branch information
NurKeinNeid committed Dec 20, 2024
1 parent 220b3dd commit b040574
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/SystemUI/proto/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
java_library {
name: "smartspace-proto-java",
proto: {
type: "nano",
},
srcs: [
"smartspace.proto",
],
sdk_version: "current",
}
104 changes: 104 additions & 0 deletions packages/SystemUI/proto/smartspace.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
syntax = "proto2";

package SmartspaceProto;

option java_package = "com.android.systemui.smartspace";
option java_outer_classname = "SmartspaceProto";

message CardWrapper {
required bytes icon = 1;
required SmartspaceUpdate.SmartspaceCard card = 2;
required int64 publishTime = 3;
required int32 gsaVersionCode = 4;
required int64 gsaUpdateTime = 5;
required bool isIconGrayscale = 6;
}

message SmartSpaceCardMetadata {
required int32 instanceId = 1;
required int32 cardTypeId = 2;
}

message SmartSpaceSubcards {
required int32 clickedSubcardIndex = 1;
repeated SmartSpaceCardMetadata subcards = 2;
}

message SmartspaceUpdate {
message SmartspaceCard {
message ExpiryCriteria {
required int64 expirationTimeMillis = 1;
required int32 maxImpressions = 2;
}

message Image {
required string key = 1;
required string gsaResourceName = 2;
required string uri = 3;
}

message Message {
message FormattedText {
message FormatParam {
enum FormatParamArgs {
SOMETHING0 = 0;
SOMETHING1 = 1;
SOMETHING2 = 2;
SOMETHING3 = 3;
}

required string text = 1;
required int32 truncateLocation = 2;
required FormatParamArgs formatParamArgs = 3;
required bool updateTimeLocally = 4;
}

required string text = 1;
required int32 truncateLocation = 2;
repeated FormatParam formatParam = 3;
}

required FormattedText title = 1;
required FormattedText subtitle = 2;
}

message TapAction {
enum ActionType {
ACTION0 = 0;
ACTION1 = 1;
ACTION2 = 2;
}

required ActionType actionType = 1;
required string intent = 2;
}

enum CardType {
CARD0 = 0;
CARD1 = 1;
CARD2 = 2;
CARD3 = 3;
CARD4 = 4;
CARD5 = 5;
CARD6 = 6;
}

required bool shouldDiscard = 1;
required int32 cardId = 2;
required Message preEvent = 3;
required Message duringEvent = 4;
required Message postEvent = 5;
required Image icon = 6;
required CardType cardType = 7;
required TapAction tapAction = 8;
required int64 updateTimeMillis = 9;
required int64 eventTimeMillis = 10;
required int64 eventDurationMillis = 11;
required ExpiryCriteria expiryCriteria = 12;
required int32 cardPriority = 13;
required bool isSensitive = 14;
required bool isWorkProfile = 15;
}

repeated SmartspaceCard card = 1;
}

0 comments on commit b040574

Please sign in to comment.