From 736d7fb30d52b61e8ddfaf1ae18e3ff545546223 Mon Sep 17 00:00:00 2001 From: Zombo Date: Mon, 6 Feb 2023 18:32:42 -0600 Subject: [PATCH] new file: .gitattributes --- .gitattributes | 1 + .github/funding.yaml | 1 + .gitignore | 4 + .ignore | 1 + auth.go | 168 + auth_test.go | 37 + checkin.go | 172 + checkin_test.go | 47 + cmd/badging/badging.go | 42 + cmd/example/example.go | 22 + cmd/googleplay/googleplay.go | 110 + cmd/googleplay/main.go | 88 + cmd/googleplay/readme.md | 5 + delivery.go | 146 + delivery_test.go | 22 + details.go | 192 + details_test.go | 100 + .../finsky/protos/AndroidAppDeliveryData.java | 337 ++ .../android/finsky/protos/AppDetails.java | 597 ++++ .../finsky/protos/AppFileMetadata.java | 159 + .../google/android/finsky/protos/Common.java | 3124 +++++++++++++++++ .../android/finsky/protos/Containers.java | 271 ++ .../finsky/protos/DeliveryResponse.java | 78 + .../google/android/finsky/protos/Details.java | 851 +++++ .../finsky/protos/DeviceConfiguration.java | 438 +++ .../android/finsky/protos/DocDetails.java | 741 ++++ .../google/android/finsky/protos/DocV2.java | 628 ++++ .../android/finsky/protos/FileMetadata.java | 162 + .../finsky/protos/GetReviewsResponse.java | 108 + .../android/finsky/protos/InstallDetails.java | 125 + .../android/finsky/protos/ListResponse.java | 122 + .../android/finsky/protos/PreFetch.java | 118 + .../google/android/finsky/protos/Rating.java | 390 ++ .../android/finsky/protos/Response.java | 1152 ++++++ .../google/android/finsky/protos/Review.java | 264 ++ .../android/finsky/protos/ReviewResponse.java | 106 + .../android/finsky/protos/SearchSuggest.java | 373 ++ .../android/finsky/protos/ServerCommands.java | 119 + .../finsky/protos/SplitDeliveryData.java | 142 + docs/readme.md | 145 + get_items.go | 91 + get_items_test.go | 69 + go.mod | 14 + go.sum | 18 + license.md | 131 + purchase.go | 28 + readme.md | 99 + research/2022-11-13/readme.md | 178 + research/2022-11-16/readme.md | 74 + research/2022-11-17/80620200 | 0 research/2022-11-17/80807600 | 0 research/2022-11-17/80875000 | 0 research/2022-11-17/delivery.go | 102 + research/2022-11-17/readme.md | 24 + research/2022-11-18/readme.md | 29 + research/2022-11-20/get_items.go | 273 ++ research/2022-11-21/autoUpdate.go | 52 + research/2022-11-21/readme.md | 7 + research/2022-11-23/readme.md | 176 + research/2022-12-08/readme.md | 15 + research/go.mod | 3 + 61 files changed, 13091 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/funding.yaml create mode 100644 .gitignore create mode 100644 .ignore create mode 100644 auth.go create mode 100644 auth_test.go create mode 100644 checkin.go create mode 100644 checkin_test.go create mode 100644 cmd/badging/badging.go create mode 100644 cmd/example/example.go create mode 100644 cmd/googleplay/googleplay.go create mode 100644 cmd/googleplay/main.go create mode 100644 cmd/googleplay/readme.md create mode 100644 delivery.go create mode 100644 delivery_test.go create mode 100644 details.go create mode 100644 details_test.go create mode 100644 docs/com/google/android/finsky/protos/AndroidAppDeliveryData.java create mode 100644 docs/com/google/android/finsky/protos/AppDetails.java create mode 100644 docs/com/google/android/finsky/protos/AppFileMetadata.java create mode 100644 docs/com/google/android/finsky/protos/Common.java create mode 100644 docs/com/google/android/finsky/protos/Containers.java create mode 100644 docs/com/google/android/finsky/protos/DeliveryResponse.java create mode 100644 docs/com/google/android/finsky/protos/Details.java create mode 100644 docs/com/google/android/finsky/protos/DeviceConfiguration.java create mode 100644 docs/com/google/android/finsky/protos/DocDetails.java create mode 100644 docs/com/google/android/finsky/protos/DocV2.java create mode 100644 docs/com/google/android/finsky/protos/FileMetadata.java create mode 100644 docs/com/google/android/finsky/protos/GetReviewsResponse.java create mode 100644 docs/com/google/android/finsky/protos/InstallDetails.java create mode 100644 docs/com/google/android/finsky/protos/ListResponse.java create mode 100644 docs/com/google/android/finsky/protos/PreFetch.java create mode 100644 docs/com/google/android/finsky/protos/Rating.java create mode 100644 docs/com/google/android/finsky/protos/Response.java create mode 100644 docs/com/google/android/finsky/protos/Review.java create mode 100644 docs/com/google/android/finsky/protos/ReviewResponse.java create mode 100644 docs/com/google/android/finsky/protos/SearchSuggest.java create mode 100644 docs/com/google/android/finsky/protos/ServerCommands.java create mode 100644 docs/com/google/android/finsky/protos/SplitDeliveryData.java create mode 100644 docs/readme.md create mode 100644 get_items.go create mode 100644 get_items_test.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 license.md create mode 100644 purchase.go create mode 100644 readme.md create mode 100644 research/2022-11-13/readme.md create mode 100644 research/2022-11-16/readme.md create mode 100644 research/2022-11-17/80620200 create mode 100644 research/2022-11-17/80807600 create mode 100644 research/2022-11-17/80875000 create mode 100644 research/2022-11-17/delivery.go create mode 100644 research/2022-11-17/readme.md create mode 100644 research/2022-11-18/readme.md create mode 100644 research/2022-11-20/get_items.go create mode 100644 research/2022-11-21/autoUpdate.go create mode 100644 research/2022-11-21/readme.md create mode 100644 research/2022-11-23/readme.md create mode 100644 research/2022-12-08/readme.md create mode 100644 research/go.mod diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a1e65f3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.java linguist-vendored diff --git a/.github/funding.yaml b/.github/funding.yaml new file mode 100644 index 0000000..fd00b13 --- /dev/null +++ b/.github/funding.yaml @@ -0,0 +1 @@ +custom: https://paypal.com/donate?hosted_button_id=UEJBQQTU3VYDY diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa99046 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +ignore +ignore.go +ignore.json +ignore.txt diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..2ef297d --- /dev/null +++ b/.ignore @@ -0,0 +1 @@ +docs/com/google diff --git a/auth.go b/auth.go new file mode 100644 index 0000000..2825094 --- /dev/null +++ b/auth.go @@ -0,0 +1,168 @@ +package googleplay + +import ( + "2a.pages.dev/rosso/crypto" + "2a.pages.dev/rosso/http" + "2a.pages.dev/rosso/protobuf" + "bufio" + "io" + "net/url" + "os" + "strconv" + "strings" +) + +var Client = http.Default_Client + +type Auth struct { + url.Values +} + +type Response struct { + *http.Response +} + +// You can also use host "android.clients.google.com", but it also uses +// TLS fingerprinting. +func New_Auth(email, password string) (*Response, error) { + req_body := url.Values{ + "Email": {email}, + "Passwd": {password}, + "client_sig": {""}, + "droidguard_results": {"."}, + }.Encode() + req, err := http.NewRequest( + "POST", "https://android.googleapis.com/auth", + strings.NewReader(req_body), + ) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + hello, err := crypto.Parse_JA3(crypto.Android_API_26) + if err != nil { + return nil, err + } + tr := crypto.Transport(hello) + res, err := Client.Transport(tr).Do(req) + if err != nil { + return nil, err + } + return &Response{res}, nil +} + +func (r Response) Create(name string) error { + file, err := os.Create(name) + if err != nil { + return err + } + defer file.Close() + if _, err := file.ReadFrom(r.Body); err != nil { + return err + } + return nil +} + +func (a Auth) Get_Auth() string { + return a.Get("Auth") +} + +func (a Auth) Get_Token() string { + return a.Get("Token") +} + +func (a *Auth) Exchange() error { + // these values take from Android API 28 + req_body := url.Values{ + "Token": {a.Get_Token()}, + "app": {"com.android.vending"}, + "client_sig": {"38918a453d07199354f8b19af05ec6562ced5788"}, + "service": {"oauth2:https://www.googleapis.com/auth/googleplay"}, + }.Encode() + req, err := http.NewRequest( + "POST", "https://android.googleapis.com/auth", + strings.NewReader(req_body), + ) + if err != nil { + return err + } + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + res, err := Client.Do(req) + if err != nil { + return err + } + defer res.Body.Close() + a.Values = read_query(res.Body) + return nil +} + +func (h Header) Set_Device(head http.Header) error { + id, err := h.Device.ID() + if err != nil { + return err + } + head.Set("X-DFE-Device-ID", strconv.FormatUint(id, 16)) + return nil +} + +func (h Header) Set_Agent(head http.Header) { + // `sdk` is needed for `/fdfe/delivery` + b := []byte("Android-Finsky (sdk=") + // valid range 0 - 0x7FFF_FFFF + b = strconv.AppendInt(b, 9, 10) + // com.android.vending + b = append(b, ",versionCode="...) + if h.Single { + // valid range 8032_0000 - 8091_9999 + b = strconv.AppendInt(b, 8091_9999, 10) + } else { + // valid range 8092_0000 - 0x7FFF_FFFF + b = strconv.AppendInt(b, 9999_9999, 10) + } + b = append(b, ')') + head.Set("User-Agent", string(b)) +} + +func (h Header) Set_Auth(head http.Header) { + head.Set("Authorization", "Bearer " + h.Auth.Get_Auth()) +} + +func read_query(read io.Reader) url.Values { + values := make(url.Values) + scan := bufio.NewScanner(read) + for scan.Scan() { + key, value, pass := strings.Cut(scan.Text(), "=") + if pass { + values.Add(key, value) + } + } + return values +} + +type Header struct { + Auth Auth // Authorization + Device Device // X-Dfe-Device-Id + Single bool +} + +func (h *Header) Open_Auth(name string) error { + file, err := os.Open(name) + if err != nil { + return err + } + defer file.Close() + h.Auth.Values = read_query(file) + return nil +} + +func (h *Header) Open_Device(name string) error { + data, err := os.ReadFile(name) + if err != nil { + return err + } + h.Device.Message, err = protobuf.Unmarshal(data) + if err != nil { + return err + } + return nil +} diff --git a/auth_test.go b/auth_test.go new file mode 100644 index 0000000..db0f78b --- /dev/null +++ b/auth_test.go @@ -0,0 +1,37 @@ +package googleplay + +import ( + "os" + "testing" + "time" +) + +func Test_Auth(t *testing.T) { + home, err := os.UserHomeDir() + if err != nil { + t.Fatal(err) + } + res, err := New_Auth(email, password) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + if err := res.Create(home + "/googleplay/auth.txt"); err != nil { + t.Fatal(err) + } +} + +func Test_Header(t *testing.T) { + home, err := os.UserHomeDir() + if err != nil { + t.Fatal(err) + } + var head Header + head.Open_Auth(home + "/googleplay/auth.txt") + for i := 0; i < 9; i++ { + if head.Auth.Get_Auth() == "" { + t.Fatalf("%+v", head) + } + time.Sleep(time.Second) + } +} diff --git a/checkin.go b/checkin.go new file mode 100644 index 0000000..3c0fafd --- /dev/null +++ b/checkin.go @@ -0,0 +1,172 @@ +package googleplay + +import ( + "2a.pages.dev/rosso/protobuf" + "bytes" + "net/http" + "strconv" + "time" +) + +const Sleep = 4 * time.Second + +// These can use default values, but they must all be included +type Config struct { + GL_ES_Version uint64 + GL_Extension []string + Has_Five_Way_Navigation uint64 + Has_Hard_Keyboard uint64 + Keyboard uint64 + Navigation uint64 + New_System_Available_Feature []string + Screen_Density uint64 + Screen_Layout uint64 + System_Shared_Library []string + Touch_Screen uint64 +} + +var Phone = Config{ + New_System_Available_Feature: []string{ + // app.source.getcontact + "android.hardware.location.gps", + // br.com.rodrigokolb.realdrum + "android.software.midi", + // com.app.xt + "android.hardware.camera.front", + // com.clearchannel.iheartradio.controller + "android.hardware.microphone", + // com.google.android.apps.walletnfcrel + "android.software.device_admin", + // com.google.android.youtube + "android.hardware.touchscreen", + "android.hardware.wifi", + // com.illumix.fnafar + "android.hardware.sensor.gyroscope", + // com.madhead.tos.zh + "android.hardware.sensor.accelerometer", + // com.miHoYo.GenshinImpact + "android.hardware.opengles.aep", + // com.pinterest + "android.hardware.camera", + "android.hardware.location", + "android.hardware.screen.portrait", + // com.supercell.brawlstars + "android.hardware.touchscreen.multitouch", + // com.sygic.aura + "android.hardware.location.network", + // com.xiaomi.smarthome + "android.hardware.bluetooth", + "android.hardware.bluetooth_le", + "android.hardware.camera.autofocus", + "android.hardware.usb.host", + // kr.sira.metal + "android.hardware.sensor.compass", + // org.thoughtcrime.securesms + "android.hardware.telephony", + // org.videolan.vlc + "android.hardware.screen.landscape", + }, + System_Shared_Library: []string{ + // com.amctve.amcfullepisodes + "org.apache.http.legacy", + // com.binance.dev + "android.test.runner", + // com.miui.weather2 + "global-miui11-empty.jar", + }, + GL_Extension: []string{ + // com.instagram.android + "GL_OES_compressed_ETC1_RGB8_texture", + // com.kakaogames.twodin + "GL_KHR_texture_compression_astc_ldr", + }, + // com.axis.drawingdesk.v3 + // valid range 0x3_0001 - 0x7FFF_FFFF + GL_ES_Version: 0xF_FFFF, +} + +// A Sleep is needed after this. +func (c Config) Checkin(native_platform string) (*Response, error) { + req_body := protobuf.Message{ + 4: protobuf.Message{ // checkin + 1: protobuf.Message{ // build + // sdkVersion + // multiple APK valid range 14 - 0x7FFF_FFFF + // single APK valid range 14 - 28 + 10: protobuf.Varint(28), + }, + 18: protobuf.Varint(1), // voiceCapable + }, + // version + // valid range 2 - 3 + 14: protobuf.Varint(3), + 18: protobuf.Message{ // deviceConfiguration + 1: protobuf.Varint(c.Touch_Screen), + 2: protobuf.Varint(c.Keyboard), + 3: protobuf.Varint(c.Navigation), + 4: protobuf.Varint(c.Screen_Layout), + 5: protobuf.Varint(c.Has_Hard_Keyboard), + 6: protobuf.Varint(c.Has_Five_Way_Navigation), + 7: protobuf.Varint(c.Screen_Density), + 8: protobuf.Varint(c.GL_ES_Version), + 11: protobuf.String(native_platform), + }, + } + for _, library := range c.System_Shared_Library { + // .deviceConfiguration.systemSharedLibrary + req_body.Get(18).Add_String(9, library) + } + for _, extension := range c.GL_Extension { + // .deviceConfiguration.glExtension + req_body.Get(18).Add_String(15, extension) + } + for _, name := range c.New_System_Available_Feature { + // .deviceConfiguration.newSystemAvailableFeature + req_body.Get(18).Add(26, protobuf.Message{ + 1: protobuf.String(name), + }) + } + req, err := http.NewRequest( + "POST", "https://android.googleapis.com/checkin", + bytes.NewReader(req_body.Marshal()), + ) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/x-protobuffer") + res, err := Client.Do(req) + if err != nil { + return nil, err + } + return &Response{res}, nil +} + +type Device struct { + protobuf.Message +} + +func (d Device) ID() (uint64, error) { + return d.Get_Fixed64(7) +} + +type Native_Platform map[int64]string + +var Platforms = Native_Platform{ + // com.google.android.youtube + 0: "x86", + // com.miui.weather2 + 1: "armeabi-v7a", + // com.kakaogames.twodin + 2: "arm64-v8a", +} + +func (n Native_Platform) String() string { + b := []byte("nativePlatform") + for key, val := range n { + b = append(b, '\n') + b = strconv.AppendInt(b, key, 10) + b = append(b, ": "...) + b = append(b, val...) + } + return string(b) +} diff --git a/checkin_test.go b/checkin_test.go new file mode 100644 index 0000000..0c03d0e --- /dev/null +++ b/checkin_test.go @@ -0,0 +1,47 @@ +package googleplay + +import ( + "os" + "testing" + "time" +) + +func checkin_create(id int64) error { + platform := Platforms[id] + home, err := os.UserHomeDir() + if err != nil { + return err + } + res, err := Phone.Checkin(platform) + if err != nil { + return err + } + defer res.Body.Close() + platform += ".bin" + if err := res.Create(home + "/googleplay/" + platform); err != nil { + return err + } + time.Sleep(Sleep) + return nil +} + +func Test_Checkin_X86(t *testing.T) { + err := checkin_create(0) + if err != nil { + t.Fatal(err) + } +} + +func Test_Checkin_ARMEABI(t *testing.T) { + err := checkin_create(1) + if err != nil { + t.Fatal(err) + } +} + +func Test_Checkin_ARM64(t *testing.T) { + err := checkin_create(2) + if err != nil { + t.Fatal(err) + } +} diff --git a/cmd/badging/badging.go b/cmd/badging/badging.go new file mode 100644 index 0000000..b8b1beb --- /dev/null +++ b/cmd/badging/badging.go @@ -0,0 +1,42 @@ +package main + +import ( + "flag" + "fmt" + "os" + "os/exec" + "strings" +) + +func main() { + var f struct { + name string + verbose bool + } + flag.StringVar(&f.name, "f", "", "file") + flag.BoolVar(&f.verbose, "v", false, "verbose") + flag.Parse() + if f.name != "" { + cmd := exec.Command("aapt", "dump", "badging", f.name) + cmd.Stderr = os.Stderr + data, err := cmd.Output() + if err != nil { + panic(err) + } + lines := strings.FieldsFunc(string(data), func(r rune) bool { + return r == '\n' + }) + for _, line := range lines { + if f.verbose || + strings.HasPrefix(line, " uses-feature:") || + strings.HasPrefix(line, " uses-gl-es:") || + strings.HasPrefix(line, "native-code:") || + strings.HasPrefix(line, "supports-gl-texture:") || + strings.HasPrefix(line, "uses-library:") { + fmt.Println(line) + } + } + } else { + flag.Usage() + } +} diff --git a/cmd/example/example.go b/cmd/example/example.go new file mode 100644 index 0000000..f8d3de6 --- /dev/null +++ b/cmd/example/example.go @@ -0,0 +1,22 @@ +package main + +import ( + "2a.pages.dev/googleplay" + "os" +) + +func main() { + var head googleplay.Header + head.Open_Device("x86.bin") + head.Open_Auth("auth.txt") + head.Auth.Exchange() + detail, err := head.Details("com.app.xt") + if err != nil { + panic(err) + } + text, err := detail.MarshalText() + if err != nil { + panic(err) + } + os.Stdout.Write(text) +} diff --git a/cmd/googleplay/googleplay.go b/cmd/googleplay/googleplay.go new file mode 100644 index 0000000..a9fd307 --- /dev/null +++ b/cmd/googleplay/googleplay.go @@ -0,0 +1,110 @@ +package main + +import ( + "2a.pages.dev/googleplay" + "2a.pages.dev/rosso/http" + "fmt" + "io" + "os" + "time" +) + +func (f flags) do_auth(dir string) error { + res, err := googleplay.New_Auth(f.email, f.password) + if err != nil { + return err + } + defer res.Body.Close() + return res.Create(dir + "/auth.txt") +} + +func do_device(dir, platform string) error { + res, err := googleplay.Phone.Checkin(platform) + if err != nil { + return err + } + defer res.Body.Close() + fmt.Printf("Sleeping %v for server to process\n", googleplay.Sleep) + time.Sleep(googleplay.Sleep) + return res.Create(dir + "/" + platform + ".bin") +} + +func (f flags) do_delivery(head *googleplay.Header) error { + download := func(ref, name string) error { + res, err := googleplay.Client.Redirect(nil).Get(ref) + if err != nil { + return err + } + defer res.Body.Close() + file, err := os.Create(name) + if err != nil { + return err + } + defer file.Close() + pro := http.Progress_Bytes(file, res.ContentLength) + if _, err := io.Copy(pro, res.Body); err != nil { + return err + } + return nil + } + del, err := head.Delivery(f.app, f.version) + if err != nil { + return err + } + file := googleplay.File{f.app, f.version} + for _, split := range del.Split_Data() { + ref, err := split.Download_URL() + if err != nil { + return err + } + id, err := split.ID() + if err != nil { + return err + } + if err := download(ref, file.APK(id)); err != nil { + return err + } + } + for _, add := range del.Additional_File() { + ref, err := add.Download_URL() + if err != nil { + return err + } + typ, err := add.File_Type() + if err != nil { + return err + } + if err := download(ref, file.OBB(typ)); err != nil { + return err + } + } + ref, err := del.Download_URL() + if err != nil { + return err + } + return download(ref, file.APK("")) +} + +func (f flags) do_header(dir, platform string) (*googleplay.Header, error) { + var head googleplay.Header + err := head.Open_Auth(dir + "/auth.txt") + if err != nil { + return nil, err + } + if err := head.Auth.Exchange(); err != nil { + return nil, err + } + if err := head.Open_Device(dir + "/" + platform + ".bin"); err != nil { + return nil, err + } + head.Single = f.single + return &head, nil +} + +func (f flags) do_details(head *googleplay.Header) ([]byte, error) { + detail, err := head.Details(f.app) + if err != nil { + return nil, err + } + return detail.MarshalText() +} diff --git a/cmd/googleplay/main.go b/cmd/googleplay/main.go new file mode 100644 index 0000000..41f07ae --- /dev/null +++ b/cmd/googleplay/main.go @@ -0,0 +1,88 @@ +package main + +import ( + "2a.pages.dev/googleplay" + "flag" + "os" +) + +type flags struct { + app string + device bool + email string + password string + platform int64 + purchase bool + single bool + version uint64 + verbose bool +} + +func main() { + var f flags + // a + flag.StringVar(&f.app, "a", "", "app") + // device + flag.BoolVar(&f.device, "device", false, "create device") + // email + flag.StringVar(&f.email, "email", "", "your email") + // p + flag.Int64Var(&f.platform, "p", 0, googleplay.Platforms.String()) + // password + flag.StringVar(&f.password, "password", "", "your password") + // purchase + flag.BoolVar(&f.purchase, "purchase", false, "purchase app") + // s + flag.BoolVar(&f.single, "s", false, "single APK") + // v + flag.Uint64Var(&f.version, "v", 0, "app version") + flag.BoolVar(&f.verbose, "verbose", false, "verbose") + flag.Parse() + if f.verbose { + googleplay.Client.Log_Level = 2 + } + dir, err := os.UserHomeDir() + if err != nil { + panic(err) + } + dir += "/googleplay" + os.Mkdir(dir, os.ModePerm) + if f.password != "" { + err := f.do_auth(dir) + if err != nil { + panic(err) + } + } else { + platform := googleplay.Platforms[f.platform] + if f.device { + err := do_device(dir, platform) + if err != nil { + panic(err) + } + } else if f.app != "" { + head, err := f.do_header(dir, platform) + if err != nil { + panic(err) + } + if f.purchase { + err := head.Purchase(f.app) + if err != nil { + panic(err) + } + } else if f.version >= 1 { + err := f.do_delivery(head) + if err != nil { + panic(err) + } + } else { + detail, err := f.do_details(head) + if err != nil { + panic(err) + } + os.Stdout.Write(detail) + } + } else { + flag.Usage() + } + } +} diff --git a/cmd/googleplay/readme.md b/cmd/googleplay/readme.md new file mode 100644 index 0000000..7b6c76a --- /dev/null +++ b/cmd/googleplay/readme.md @@ -0,0 +1,5 @@ +# GooglePlay + +~~~ +go run . -a com.sygic.aura +~~~ diff --git a/delivery.go b/delivery.go new file mode 100644 index 0000000..4814303 --- /dev/null +++ b/delivery.go @@ -0,0 +1,146 @@ +package googleplay + +import ( + "2a.pages.dev/rosso/protobuf" + "errors" + "io" + "net/http" + "net/url" + "strconv" +) + +type Delivery struct { + protobuf.Message +} + +func (d Delivery) Additional_File() []File_Metadata { + var files []File_Metadata + // .additionalFile + for _, file := range d.Get_Messages(4) { + files = append(files, File_Metadata{file}) + } + return files +} + +// .downloadUrl +func (d Delivery) Download_URL() (string, error) { + return d.Get_String(3) +} + +func (d Delivery) Split_Data() []Split_Data { + var splits []Split_Data + // .splitDeliveryData + for _, split := range d.Get_Messages(15) { + splits = append(splits, Split_Data{split}) + } + return splits +} + +type File struct { + Package_Name string + Version_Code uint64 +} + +func (f File) APK(id string) string { + b := []byte(f.Package_Name) + b = append(b, '-') + if id != "" { + b = append(b, id...) + b = append(b, '-') + } + b = strconv.AppendUint(b, f.Version_Code, 10) + b = append(b, ".apk"...) + return string(b) +} + +func (f File) OBB(file_type uint64) string { + var b []byte + if file_type >= 1 { + b = append(b, "patch"...) + } else { + b = append(b, "main"...) + } + b = append(b, '.') + b = strconv.AppendUint(b, f.Version_Code, 10) + b = append(b, '.') + b = append(b, f.Package_Name...) + b = append(b, ".obb"...) + return string(b) +} + +type File_Metadata struct { + protobuf.Message +} + +// .downloadUrl +func (f File_Metadata) Download_URL() (string, error) { + return f.Get_String(4) +} + +// .fileType +func (f File_Metadata) File_Type() (uint64, error) { + return f.Get_Varint(1) +} + +func (h Header) Delivery(app string, ver uint64) (*Delivery, error) { + req, err := http.NewRequest( + "GET", "https://play-fe.googleapis.com/fdfe/delivery", nil, + ) + if err != nil { + return nil, err + } + h.Set_Agent(req.Header) + h.Set_Auth(req.Header) // needed for single APK + h.Set_Device(req.Header) + req.URL.RawQuery = url.Values{ + "doc": {app}, + "vc": {strconv.FormatUint(ver, 10)}, + }.Encode() + res, err := Client.Do(req) + if err != nil { + return nil, err + } + defer res.Body.Close() + body, err := io.ReadAll(res.Body) + if err != nil { + return nil, err + } + // ResponseWrapper + response_wrapper, err := protobuf.Unmarshal(body) + if err != nil { + return nil, err + } + // .payload.deliveryResponse + delivery_response := response_wrapper.Get(1).Get(21) + // .status + status, err := delivery_response.Get_Varint(1) + if err != nil { + return nil, err + } + switch status { + case 2: + return nil, errors.New("geo-blocking") + case 3: + return nil, errors.New("purchase required") + case 5: + return nil, errors.New("invalid version") + } + var del Delivery + // .appDeliveryData + del.Message = delivery_response.Get(2) + return &del, nil +} + +type Split_Data struct { + protobuf.Message +} + +// .downloadUrl +func (s Split_Data) Download_URL() (string, error) { + return s.Get_String(5) +} + +// .id +func (s Split_Data) ID() (string, error) { + return s.Get_String(1) +} diff --git a/delivery_test.go b/delivery_test.go new file mode 100644 index 0000000..0f7fc26 --- /dev/null +++ b/delivery_test.go @@ -0,0 +1,22 @@ +package googleplay + +import ( + "fmt" + "os" + "testing" +) + +func Test_Delivery(t *testing.T) { + home, err := os.UserHomeDir() + if err != nil { + t.Fatal(err) + } + var head Header + head.Open_Auth(home + "/googleplay/auth.txt") + head.Open_Device(home + "/googleplay/x86.bin") + del, err := head.Delivery("com.google.android.youtube", 1524221376) + if err != nil { + t.Fatal(err) + } + fmt.Printf("%+v\n", del) +} diff --git a/details.go b/details.go new file mode 100644 index 0000000..6b57bf3 --- /dev/null +++ b/details.go @@ -0,0 +1,192 @@ +package googleplay + +import ( + "2a.pages.dev/rosso/protobuf" + "2a.pages.dev/rosso/strconv" + "errors" + "io" + "net/http" + "net/url" +) + +var err_device = errors.New("your device isn't compatible with this version") + +type Details struct { + protobuf.Message +} + +// .creator +func (d Details) Creator() (string, error) { + return d.Get_String(6) +} + +// .offer.currencyCode +func (d Details) Currency_Code() (string, error) { + return d.Get(8).Get_String(2) +} + +func (d Details) MarshalText() ([]byte, error) { + var b []byte + b = append(b, "Title: "...) + if val, err := d.Title(); err != nil { + return nil, err + } else { + b = append(b, val...) + } + b = append(b, "\nCreator: "...) + if val, err := d.Creator(); err != nil { + return nil, err + } else { + b = append(b, val...) + } + b = append(b, "\nUpload Date: "...) + if val, err := d.Upload_Date(); err != nil { + return nil, err + } else { + b = append(b, val...) + } + b = append(b, "\nVersion: "...) + if val, err := d.Version(); err != nil { + return nil, err + } else { + b = append(b, val...) + } + b = append(b, "\nVersion Code: "...) + if val, err := d.Version_Code(); err != nil { + return nil, err + } else { + b = strconv.AppendUint(b, val, 10) + } + b = append(b, "\nNum Downloads: "...) + if val, err := d.Num_Downloads(); err != nil { + return nil, err + } else { + b = strconv.New_Number(val).Cardinal(b) + } + b = append(b, "\nInstallation Size: "...) + if val, err := d.Installation_Size(); err != nil { + return nil, err + } else { + b = strconv.New_Number(val).Size(b) + } + b = append(b, "\nFile:"...) + for _, file := range d.File() { + if val, err := file.File_Type(); err != nil { + return nil, err + } else if val >= 1 { + b = append(b, " OBB"...) + } else { + b = append(b, " APK"...) + } + } + b = append(b, "\nOffer: "...) + if val, err := d.Micros(); err != nil { + return nil, err + } else { + b = strconv.AppendUint(b, val, 10) + } + b = append(b, ' ') + if val, err := d.Currency_Code(); err != nil { + return nil, err + } else { + b = append(b, val...) + } + return append(b, '\n'), nil +} + +// .offer.micros +func (d Details) Micros() (uint64, error) { + return d.Get(8).Get_Varint(1) +} + +// .title +func (d Details) Title() (string, error) { + return d.Get_String(5) +} + +// .details.appDetails.uploadDate +func (d Details) Upload_Date() (string, error) { + value, err := d.Get(13).Get(1).Get_String(16) + if err != nil { + return "", err_device + } + return value, nil +} + +// .details.appDetails.versionString +func (d Details) Version() (string, error) { + value, err := d.Get(13).Get(1).Get_String(4) + if err != nil { + return "", err_device + } + return value, nil +} + +// .details.appDetails.versionCode +func (d Details) Version_Code() (uint64, error) { + value, err := d.Get(13).Get(1).Get_Varint(3) + if err != nil { + return 0, err_device + } + return value, nil +} + +// .details.appDetails +// I dont know the name of field 70, but the similar field 13 is called +// .numDownloads +func (d Details) Num_Downloads() (uint64, error) { + return d.Get(13).Get(1).Get_Varint(70) +} + +func (h Header) Details(app string) (*Details, error) { + req, err := http.NewRequest( + "GET", "https://android.clients.google.com/fdfe/details", nil, + ) + if err != nil { + return nil, err + } + // half of the apps I test require User-Agent, + // so just set it for all of them + h.Set_Agent(req.Header) + h.Set_Auth(req.Header) + h.Set_Device(req.Header) + req.URL.RawQuery = "doc=" + url.QueryEscape(app) + res, err := Client.Do(req) + if err != nil { + return nil, err + } + defer res.Body.Close() + body, err := io.ReadAll(res.Body) + if err != nil { + return nil, err + } + // ResponseWrapper + response_wrapper, err := protobuf.Unmarshal(body) + if err != nil { + return nil, err + } + var det Details + // .payload.detailsResponse.docV2 + det.Message = response_wrapper.Get(1).Get(2).Get(4) + return &det, nil +} + +/////////////// + +// .details.appDetails.installationSize +func (d Details) Installation_Size() (uint64, error) { + value, err := d.Get(13).Get(1).Get_Varint(9) + if err != nil { + return 0, err_device + } + return value, nil +} + +// .details.appDetails.file +func (d Details) File() []File_Metadata { + var files []File_Metadata + for _, file := range d.Get(13).Get(1).Get_Messages(17) { + files = append(files, File_Metadata{file}) + } + return files +} diff --git a/details_test.go b/details_test.go new file mode 100644 index 0000000..7e09ca7 --- /dev/null +++ b/details_test.go @@ -0,0 +1,100 @@ +package googleplay + +import ( + "fmt" + "os" + "strconv" + "testing" + "time" +) + +var apps = []app_type{ + {"2021-12-08 00:00:00 +0000 UTC",0,"com.amctve.amcfullepisodes"}, + {"2022-02-02 00:00:00 +0000 UTC",2,"com.illumix.fnafar"}, + {"2022-02-14 00:00:00 +0000 UTC",0,"org.videolan.vlc"}, + {"2022-03-17 00:00:00 +0000 UTC",0,"com.google.android.apps.walletnfcrel"}, + {"2022-03-24 00:00:00 +0000 UTC",0,"app.source.getcontact"}, + {"2022-03-24 00:00:00 +0000 UTC",1,"com.miui.weather2"}, + {"2022-04-28 00:00:00 +0000 UTC",2,"com.miHoYo.GenshinImpact"}, + {"2022-05-11 00:00:00 +0000 UTC",1,"com.supercell.brawlstars"}, + {"2022-05-12 00:00:00 +0000 UTC",0,"com.clearchannel.iheartradio.controller"}, + {"2022-05-23 00:00:00 +0000 UTC",0,"kr.sira.metal"}, + {"2022-05-23 00:00:00 +0000 UTC",2,"com.kakaogames.twodin"}, + {"2022-05-30 00:00:00 +0000 UTC",1,"com.madhead.tos.zh"}, + {"2022-05-31 00:00:00 +0000 UTC",1,"com.xiaomi.smarthome"}, + {"2022-06-02 00:00:00 +0000 UTC",0,"org.thoughtcrime.securesms"}, + {"2022-06-02 00:00:00 +0000 UTC",1,"com.binance.dev"}, + {"2022-06-08 00:00:00 +0000 UTC",1,"com.sygic.aura"}, + {"2022-06-12 00:00:00 +0000 UTC",0,"br.com.rodrigokolb.realdrum"}, + {"2022-06-13 00:00:00 +0000 UTC",0,"com.app.xt"}, + {"2022-06-13 00:00:00 +0000 UTC",0,"com.google.android.youtube"}, + {"2022-06-13 00:00:00 +0000 UTC",0,"com.instagram.android"}, + {"2022-06-13 00:00:00 +0000 UTC",1,"com.axis.drawingdesk.v3"}, + {"2022-06-14 00:00:00 +0000 UTC",0,"com.pinterest"}, +} + +func Test_Details(t *testing.T) { + home, err := os.UserHomeDir() + if err != nil { + t.Fatal(err) + } + var head Header + head.Open_Auth(home + "/googleplay/auth.txt") + head.Auth.Exchange() + for _, app := range apps { + platform := Platforms[app.platform] + head.Open_Device(home + "/googleplay/" + platform + ".bin") + d, err := head.Details(app.id) + if err != nil { + t.Fatal(err) + } + if _, err := d.Version(); err != nil { + t.Fatal(err) + } + if _, err := d.Version_Code(); err != nil { + t.Fatal(err) + } + if _, err := d.Title(); err != nil { + t.Fatal(err) + } + if _, err := d.Installation_Size(); err != nil { + t.Fatal(err) + } + if _, err := d.Num_Downloads(); err != nil { + t.Fatal(err) + } + if _, err := d.Currency_Code(); err != nil { + t.Fatal(err) + } + raw_date, err := d.Upload_Date() + if err != nil { + t.Fatal(err) + } + date, err := time.Parse("Jan 2, 2006", raw_date) + if err != nil { + t.Fatal(err) + } + app.date = date.String() + fmt.Print(app, ",\n") + time.Sleep(99 * time.Millisecond) + } +} + +func (a app_type) String() string { + var b []byte + b = append(b, '{') + b = strconv.AppendQuote(b, a.date) + b = append(b, ',') + b = strconv.AppendInt(b, a.platform, 10) + b = append(b, ',') + b = strconv.AppendQuote(b, a.id) + b = append(b, '}') + return string(b) +} + +type app_type struct { + date string + platform int64 // X-DFE-Device-ID + id string +} + diff --git a/docs/com/google/android/finsky/protos/AndroidAppDeliveryData.java b/docs/com/google/android/finsky/protos/AndroidAppDeliveryData.java new file mode 100644 index 0000000..ba0d2eb --- /dev/null +++ b/docs/com/google/android/finsky/protos/AndroidAppDeliveryData.java @@ -0,0 +1,337 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class AndroidAppDeliveryData extends MessageNano { + public long downloadSize = 0; + public boolean hasDownloadSize = false; + public long gzippedDownloadSize = 0; + public boolean hasGzippedDownloadSize = false; + public String signature = ""; + public boolean hasSignature = false; + public String downloadUrl = ""; + public boolean hasDownloadUrl = false; + public String gzippedDownloadUrl = ""; + public boolean hasGzippedDownloadUrl = false; + public EncryptionParams encryptionParams = null; + public AppFileMetadata[] additionalFile = AppFileMetadata.emptyArray(); + public HttpCookie[] downloadAuthCookie = HttpCookie.emptyArray(); + public boolean forwardLocked = false; + public boolean hasForwardLocked = false; + public long refundTimeout = 0; + public boolean hasRefundTimeout = false; + public long postInstallRefundWindowMillis = 0; + public boolean hasPostInstallRefundWindowMillis = false; + public boolean serverInitiated = true; + public boolean hasServerInitiated = false; + public boolean immediateStartNeeded = false; + public boolean hasImmediateStartNeeded = false; + public AndroidAppPatchData patchData = null; + public SplitDeliveryData[] splitDeliveryData = SplitDeliveryData.emptyArray(); + public int installLocation = 0; + public boolean hasInstallLocation = false; + public boolean everExternallyHosted = false; + public boolean hasEverExternallyHosted = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + int length2; + int length3; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.downloadSize = x0.readRawVarint64(); + this.hasDownloadSize = true; + break; + case 18: + this.signature = x0.readString(); + this.hasSignature = true; + break; + case 26: + this.downloadUrl = x0.readString(); + this.hasDownloadUrl = true; + break; + case 34: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 34); + if (this.additionalFile == null) { + length3 = 0; + } else { + length3 = this.additionalFile.length; + } + AppFileMetadata[] appFileMetadataArr = new AppFileMetadata[repeatedFieldArrayLength + length3]; + if (length3 != 0) { + System.arraycopy(this.additionalFile, 0, appFileMetadataArr, 0, length3); + } + while (length3 < appFileMetadataArr.length - 1) { + appFileMetadataArr[length3] = new AppFileMetadata(); + x0.readMessage(appFileMetadataArr[length3]); + x0.readTag(); + length3++; + } + appFileMetadataArr[length3] = new AppFileMetadata(); + x0.readMessage(appFileMetadataArr[length3]); + this.additionalFile = appFileMetadataArr; + break; + case 42: + int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 42); + if (this.downloadAuthCookie == null) { + length2 = 0; + } else { + length2 = this.downloadAuthCookie.length; + } + HttpCookie[] httpCookieArr = new HttpCookie[repeatedFieldArrayLength2 + length2]; + if (length2 != 0) { + System.arraycopy(this.downloadAuthCookie, 0, httpCookieArr, 0, length2); + } + while (length2 < httpCookieArr.length - 1) { + httpCookieArr[length2] = new HttpCookie(); + x0.readMessage(httpCookieArr[length2]); + x0.readTag(); + length2++; + } + httpCookieArr[length2] = new HttpCookie(); + x0.readMessage(httpCookieArr[length2]); + this.downloadAuthCookie = httpCookieArr; + break; + case 48: + this.forwardLocked = x0.readBool(); + this.hasForwardLocked = true; + break; + case 56: + this.refundTimeout = x0.readRawVarint64(); + this.hasRefundTimeout = true; + break; + case 64: + this.serverInitiated = x0.readBool(); + this.hasServerInitiated = true; + break; + case 72: + this.postInstallRefundWindowMillis = x0.readRawVarint64(); + this.hasPostInstallRefundWindowMillis = true; + break; + case 80: + this.immediateStartNeeded = x0.readBool(); + this.hasImmediateStartNeeded = true; + break; + case 90: + if (this.patchData == null) { + this.patchData = new AndroidAppPatchData(); + } + x0.readMessage(this.patchData); + break; + case 98: + if (this.encryptionParams == null) { + this.encryptionParams = new EncryptionParams(); + } + x0.readMessage(this.encryptionParams); + break; + case 106: + this.gzippedDownloadUrl = x0.readString(); + this.hasGzippedDownloadUrl = true; + break; + case 112: + this.gzippedDownloadSize = x0.readRawVarint64(); + this.hasGzippedDownloadSize = true; + break; + case 122: + int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 122); + if (this.splitDeliveryData == null) { + length = 0; + } else { + length = this.splitDeliveryData.length; + } + SplitDeliveryData[] splitDeliveryDataArr = new SplitDeliveryData[repeatedFieldArrayLength3 + length]; + if (length != 0) { + System.arraycopy(this.splitDeliveryData, 0, splitDeliveryDataArr, 0, length); + } + while (length < splitDeliveryDataArr.length - 1) { + splitDeliveryDataArr[length] = new SplitDeliveryData(); + x0.readMessage(splitDeliveryDataArr[length]); + x0.readTag(); + length++; + } + splitDeliveryDataArr[length] = new SplitDeliveryData(); + x0.readMessage(splitDeliveryDataArr[length]); + this.splitDeliveryData = splitDeliveryDataArr; + break; + case 128: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + this.installLocation = readRawVarint32; + this.hasInstallLocation = true; + continue; + } + case 136: + this.everExternallyHosted = x0.readBool(); + this.hasEverExternallyHosted = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public AndroidAppDeliveryData() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasDownloadSize || this.downloadSize != 0) { + output.writeInt64(1, this.downloadSize); + } + if (this.hasSignature || !this.signature.equals("")) { + output.writeString(2, this.signature); + } + if (this.hasDownloadUrl || !this.downloadUrl.equals("")) { + output.writeString(3, this.downloadUrl); + } + if (this.additionalFile != null && this.additionalFile.length > 0) { + for (int i = 0; i < this.additionalFile.length; i++) { + AppFileMetadata element = this.additionalFile[i]; + if (element != null) { + output.writeMessage(4, element); + } + } + } + if (this.downloadAuthCookie != null && this.downloadAuthCookie.length > 0) { + for (int i2 = 0; i2 < this.downloadAuthCookie.length; i2++) { + HttpCookie element2 = this.downloadAuthCookie[i2]; + if (element2 != null) { + output.writeMessage(5, element2); + } + } + } + if (this.hasForwardLocked || this.forwardLocked) { + output.writeBool(6, this.forwardLocked); + } + if (this.hasRefundTimeout || this.refundTimeout != 0) { + output.writeInt64(7, this.refundTimeout); + } + if (this.hasServerInitiated || !this.serverInitiated) { + output.writeBool(8, this.serverInitiated); + } + if (this.hasPostInstallRefundWindowMillis || this.postInstallRefundWindowMillis != 0) { + output.writeInt64(9, this.postInstallRefundWindowMillis); + } + if (this.hasImmediateStartNeeded || this.immediateStartNeeded) { + output.writeBool(10, this.immediateStartNeeded); + } + if (this.patchData != null) { + output.writeMessage(11, this.patchData); + } + if (this.encryptionParams != null) { + output.writeMessage(12, this.encryptionParams); + } + if (this.hasGzippedDownloadUrl || !this.gzippedDownloadUrl.equals("")) { + output.writeString(13, this.gzippedDownloadUrl); + } + if (this.hasGzippedDownloadSize || this.gzippedDownloadSize != 0) { + output.writeInt64(14, this.gzippedDownloadSize); + } + if (this.splitDeliveryData != null && this.splitDeliveryData.length > 0) { + for (int i3 = 0; i3 < this.splitDeliveryData.length; i3++) { + SplitDeliveryData element3 = this.splitDeliveryData[i3]; + if (element3 != null) { + output.writeMessage(15, element3); + } + } + } + if (this.installLocation != 0 || this.hasInstallLocation) { + output.writeInt32(16, this.installLocation); + } + if (this.hasEverExternallyHosted || this.everExternallyHosted) { + output.writeBool(17, this.everExternallyHosted); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasDownloadSize || this.downloadSize != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(1, this.downloadSize); + } + if (this.hasSignature || !this.signature.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.signature); + } + if (this.hasDownloadUrl || !this.downloadUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.downloadUrl); + } + if (this.additionalFile != null && this.additionalFile.length > 0) { + for (int i = 0; i < this.additionalFile.length; i++) { + AppFileMetadata element = this.additionalFile[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, element); + } + } + } + if (this.downloadAuthCookie != null && this.downloadAuthCookie.length > 0) { + for (int i2 = 0; i2 < this.downloadAuthCookie.length; i2++) { + HttpCookie element2 = this.downloadAuthCookie[i2]; + if (element2 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(5, element2); + } + } + } + if (this.hasForwardLocked || this.forwardLocked) { + size += CodedOutputByteBufferNano.computeTagSize(6) + 1; + } + if (this.hasRefundTimeout || this.refundTimeout != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(7, this.refundTimeout); + } + if (this.hasServerInitiated || !this.serverInitiated) { + size += CodedOutputByteBufferNano.computeTagSize(8) + 1; + } + if (this.hasPostInstallRefundWindowMillis || this.postInstallRefundWindowMillis != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(9, this.postInstallRefundWindowMillis); + } + if (this.hasImmediateStartNeeded || this.immediateStartNeeded) { + size += CodedOutputByteBufferNano.computeTagSize(10) + 1; + } + if (this.patchData != null) { + size += CodedOutputByteBufferNano.computeMessageSize(11, this.patchData); + } + if (this.encryptionParams != null) { + size += CodedOutputByteBufferNano.computeMessageSize(12, this.encryptionParams); + } + if (this.hasGzippedDownloadUrl || !this.gzippedDownloadUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(13, this.gzippedDownloadUrl); + } + if (this.hasGzippedDownloadSize || this.gzippedDownloadSize != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(14, this.gzippedDownloadSize); + } + if (this.splitDeliveryData != null && this.splitDeliveryData.length > 0) { + for (int i3 = 0; i3 < this.splitDeliveryData.length; i3++) { + SplitDeliveryData element3 = this.splitDeliveryData[i3]; + if (element3 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(15, element3); + } + } + } + if (this.installLocation != 0 || this.hasInstallLocation) { + size += CodedOutputByteBufferNano.computeInt32Size(16, this.installLocation); + } + if (this.hasEverExternallyHosted || this.everExternallyHosted) { + return size + CodedOutputByteBufferNano.computeTagSize(17) + 1; + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/AppDetails.java b/docs/com/google/android/finsky/protos/AppDetails.java new file mode 100644 index 0000000..2bdf3d8 --- /dev/null +++ b/docs/com/google/android/finsky/protos/AppDetails.java @@ -0,0 +1,597 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class AppDetails extends MessageNano { + public String developerName = ""; + public boolean hasDeveloperName = false; + public int majorVersionNumber = 0; + public boolean hasMajorVersionNumber = false; + public int versionCode = 0; + public boolean hasVersionCode = false; + public String versionString = ""; + public boolean hasVersionString = false; + public String title = ""; + public boolean hasTitle = false; + public String[] appCategory = WireFormatNano.EMPTY_STRING_ARRAY; + public int contentRating = 0; + public boolean hasContentRating = false; + public long installationSize = 0; + public boolean hasInstallationSize = false; + public String[] permission = WireFormatNano.EMPTY_STRING_ARRAY; + public String developerEmail = ""; + public boolean hasDeveloperEmail = false; + public String developerWebsite = ""; + public boolean hasDeveloperWebsite = false; + public String numDownloads = ""; + public boolean hasNumDownloads = false; + public String packageName = ""; + public boolean hasPackageName = false; + public String recentChangesHtml = ""; + public boolean hasRecentChangesHtml = false; + public String uploadDate = ""; + public boolean hasUploadDate = false; + public FileMetadata[] file = FileMetadata.emptyArray(); + public String appType = ""; + public boolean hasAppType = false; + public CertificateSet[] certificateSet = CertificateSet.emptyArray(); + public String[] certificateHash = WireFormatNano.EMPTY_STRING_ARRAY; + public boolean variesByAccount = true; + public boolean hasVariesByAccount = false; + public String[] autoAcquireFreeAppIfHigherVersionAvailableTag = WireFormatNano.EMPTY_STRING_ARRAY; + public boolean declaresIab = false; + public boolean hasDeclaresIab = false; + public String[] splitId = WireFormatNano.EMPTY_STRING_ARRAY; + public boolean gamepadRequired = false; + public boolean hasGamepadRequired = false; + public boolean externallyHosted = false; + public boolean hasExternallyHosted = false; + public boolean everExternallyHosted = false; + public boolean hasEverExternallyHosted = false; + public String installNotes = ""; + public boolean hasInstallNotes = false; + public int installLocation = 0; + public boolean hasInstallLocation = false; + public int targetSdkVersion = 0; + public boolean hasTargetSdkVersion = false; + public String preregistrationPromoCode = ""; + public boolean hasPreregistrationPromoCode = false; + public InstallDetails installDetails = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + int length2; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.developerName = x0.readString(); + this.hasDeveloperName = true; + break; + case 16: + this.majorVersionNumber = x0.readRawVarint32(); + this.hasMajorVersionNumber = true; + break; + case 24: + this.versionCode = x0.readRawVarint32(); + this.hasVersionCode = true; + break; + case 34: + this.versionString = x0.readString(); + this.hasVersionString = true; + break; + case 42: + this.title = x0.readString(); + this.hasTitle = true; + break; + case 58: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 58); + int length3 = this.appCategory == null ? 0 : this.appCategory.length; + String[] strArr = new String[repeatedFieldArrayLength + length3]; + if (length3 != 0) { + System.arraycopy(this.appCategory, 0, strArr, 0, length3); + } + while (length3 < strArr.length - 1) { + strArr[length3] = x0.readString(); + x0.readTag(); + length3++; + } + strArr[length3] = x0.readString(); + this.appCategory = strArr; + break; + case 64: + this.contentRating = x0.readRawVarint32(); + this.hasContentRating = true; + break; + case 72: + this.installationSize = x0.readRawVarint64(); + this.hasInstallationSize = true; + break; + case 82: + int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 82); + int length4 = this.permission == null ? 0 : this.permission.length; + String[] strArr2 = new String[repeatedFieldArrayLength2 + length4]; + if (length4 != 0) { + System.arraycopy(this.permission, 0, strArr2, 0, length4); + } + while (length4 < strArr2.length - 1) { + strArr2[length4] = x0.readString(); + x0.readTag(); + length4++; + } + strArr2[length4] = x0.readString(); + this.permission = strArr2; + break; + case 90: + this.developerEmail = x0.readString(); + this.hasDeveloperEmail = true; + break; + case 98: + this.developerWebsite = x0.readString(); + this.hasDeveloperWebsite = true; + break; + case 106: + this.numDownloads = x0.readString(); + this.hasNumDownloads = true; + break; + case 114: + this.packageName = x0.readString(); + this.hasPackageName = true; + break; + case 122: + this.recentChangesHtml = x0.readString(); + this.hasRecentChangesHtml = true; + break; + case 130: + this.uploadDate = x0.readString(); + this.hasUploadDate = true; + break; + case 138: + int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 138); + if (this.file == null) { + length2 = 0; + } else { + length2 = this.file.length; + } + FileMetadata[] fileMetadataArr = new FileMetadata[repeatedFieldArrayLength3 + length2]; + if (length2 != 0) { + System.arraycopy(this.file, 0, fileMetadataArr, 0, length2); + } + while (length2 < fileMetadataArr.length - 1) { + fileMetadataArr[length2] = new FileMetadata(); + x0.readMessage(fileMetadataArr[length2]); + x0.readTag(); + length2++; + } + fileMetadataArr[length2] = new FileMetadata(); + x0.readMessage(fileMetadataArr[length2]); + this.file = fileMetadataArr; + break; + case 146: + this.appType = x0.readString(); + this.hasAppType = true; + break; + case 154: + int repeatedFieldArrayLength4 = WireFormatNano.getRepeatedFieldArrayLength(x0, 154); + int length5 = this.certificateHash == null ? 0 : this.certificateHash.length; + String[] strArr3 = new String[repeatedFieldArrayLength4 + length5]; + if (length5 != 0) { + System.arraycopy(this.certificateHash, 0, strArr3, 0, length5); + } + while (length5 < strArr3.length - 1) { + strArr3[length5] = x0.readString(); + x0.readTag(); + length5++; + } + strArr3[length5] = x0.readString(); + this.certificateHash = strArr3; + break; + case 168: + this.variesByAccount = x0.readBool(); + this.hasVariesByAccount = true; + break; + case 178: + int repeatedFieldArrayLength5 = WireFormatNano.getRepeatedFieldArrayLength(x0, 178); + if (this.certificateSet == null) { + length = 0; + } else { + length = this.certificateSet.length; + } + CertificateSet[] certificateSetArr = new CertificateSet[repeatedFieldArrayLength5 + length]; + if (length != 0) { + System.arraycopy(this.certificateSet, 0, certificateSetArr, 0, length); + } + while (length < certificateSetArr.length - 1) { + certificateSetArr[length] = new CertificateSet(); + x0.readMessage(certificateSetArr[length]); + x0.readTag(); + length++; + } + certificateSetArr[length] = new CertificateSet(); + x0.readMessage(certificateSetArr[length]); + this.certificateSet = certificateSetArr; + break; + case 186: + int repeatedFieldArrayLength6 = WireFormatNano.getRepeatedFieldArrayLength(x0, 186); + int length6 = this.autoAcquireFreeAppIfHigherVersionAvailableTag == null ? 0 : this.autoAcquireFreeAppIfHigherVersionAvailableTag.length; + String[] strArr4 = new String[repeatedFieldArrayLength6 + length6]; + if (length6 != 0) { + System.arraycopy(this.autoAcquireFreeAppIfHigherVersionAvailableTag, 0, strArr4, 0, length6); + } + while (length6 < strArr4.length - 1) { + strArr4[length6] = x0.readString(); + x0.readTag(); + length6++; + } + strArr4[length6] = x0.readString(); + this.autoAcquireFreeAppIfHigherVersionAvailableTag = strArr4; + break; + case 192: + this.declaresIab = x0.readBool(); + this.hasDeclaresIab = true; + break; + case 202: + int repeatedFieldArrayLength7 = WireFormatNano.getRepeatedFieldArrayLength(x0, 202); + int length7 = this.splitId == null ? 0 : this.splitId.length; + String[] strArr5 = new String[repeatedFieldArrayLength7 + length7]; + if (length7 != 0) { + System.arraycopy(this.splitId, 0, strArr5, 0, length7); + } + while (length7 < strArr5.length - 1) { + strArr5[length7] = x0.readString(); + x0.readTag(); + length7++; + } + strArr5[length7] = x0.readString(); + this.splitId = strArr5; + break; + case 208: + this.gamepadRequired = x0.readBool(); + this.hasGamepadRequired = true; + break; + case 216: + this.externallyHosted = x0.readBool(); + this.hasExternallyHosted = true; + break; + case 224: + this.everExternallyHosted = x0.readBool(); + this.hasEverExternallyHosted = true; + break; + case 242: + this.installNotes = x0.readString(); + this.hasInstallNotes = true; + break; + case 248: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + this.installLocation = readRawVarint32; + this.hasInstallLocation = true; + continue; + } + case 256: + this.targetSdkVersion = x0.readRawVarint32(); + this.hasTargetSdkVersion = true; + break; + case 266: + this.preregistrationPromoCode = x0.readString(); + this.hasPreregistrationPromoCode = true; + break; + case 274: + if (this.installDetails == null) { + this.installDetails = new InstallDetails(); + } + x0.readMessage(this.installDetails); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public AppDetails() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasDeveloperName || !this.developerName.equals("")) { + output.writeString(1, this.developerName); + } + if (this.hasMajorVersionNumber || this.majorVersionNumber != 0) { + output.writeInt32(2, this.majorVersionNumber); + } + if (this.hasVersionCode || this.versionCode != 0) { + output.writeInt32(3, this.versionCode); + } + if (this.hasVersionString || !this.versionString.equals("")) { + output.writeString(4, this.versionString); + } + if (this.hasTitle || !this.title.equals("")) { + output.writeString(5, this.title); + } + if (this.appCategory != null && this.appCategory.length > 0) { + for (int i = 0; i < this.appCategory.length; i++) { + String element = this.appCategory[i]; + if (element != null) { + output.writeString(7, element); + } + } + } + if (this.hasContentRating || this.contentRating != 0) { + output.writeInt32(8, this.contentRating); + } + if (this.hasInstallationSize || this.installationSize != 0) { + output.writeInt64(9, this.installationSize); + } + if (this.permission != null && this.permission.length > 0) { + for (int i2 = 0; i2 < this.permission.length; i2++) { + String element2 = this.permission[i2]; + if (element2 != null) { + output.writeString(10, element2); + } + } + } + if (this.hasDeveloperEmail || !this.developerEmail.equals("")) { + output.writeString(11, this.developerEmail); + } + if (this.hasDeveloperWebsite || !this.developerWebsite.equals("")) { + output.writeString(12, this.developerWebsite); + } + if (this.hasNumDownloads || !this.numDownloads.equals("")) { + output.writeString(13, this.numDownloads); + } + if (this.hasPackageName || !this.packageName.equals("")) { + output.writeString(14, this.packageName); + } + if (this.hasRecentChangesHtml || !this.recentChangesHtml.equals("")) { + output.writeString(15, this.recentChangesHtml); + } + if (this.hasUploadDate || !this.uploadDate.equals("")) { + output.writeString(16, this.uploadDate); + } + if (this.file != null && this.file.length > 0) { + for (int i3 = 0; i3 < this.file.length; i3++) { + FileMetadata element3 = this.file[i3]; + if (element3 != null) { + output.writeMessage(17, element3); + } + } + } + if (this.hasAppType || !this.appType.equals("")) { + output.writeString(18, this.appType); + } + if (this.certificateHash != null && this.certificateHash.length > 0) { + for (int i4 = 0; i4 < this.certificateHash.length; i4++) { + String element4 = this.certificateHash[i4]; + if (element4 != null) { + output.writeString(19, element4); + } + } + } + if (this.hasVariesByAccount || !this.variesByAccount) { + output.writeBool(21, this.variesByAccount); + } + if (this.certificateSet != null && this.certificateSet.length > 0) { + for (int i5 = 0; i5 < this.certificateSet.length; i5++) { + CertificateSet element5 = this.certificateSet[i5]; + if (element5 != null) { + output.writeMessage(22, element5); + } + } + } + if (this.autoAcquireFreeAppIfHigherVersionAvailableTag != null && this.autoAcquireFreeAppIfHigherVersionAvailableTag.length > 0) { + for (int i6 = 0; i6 < this.autoAcquireFreeAppIfHigherVersionAvailableTag.length; i6++) { + String element6 = this.autoAcquireFreeAppIfHigherVersionAvailableTag[i6]; + if (element6 != null) { + output.writeString(23, element6); + } + } + } + if (this.hasDeclaresIab || this.declaresIab) { + output.writeBool(24, this.declaresIab); + } + if (this.splitId != null && this.splitId.length > 0) { + for (int i7 = 0; i7 < this.splitId.length; i7++) { + String element7 = this.splitId[i7]; + if (element7 != null) { + output.writeString(25, element7); + } + } + } + if (this.hasGamepadRequired || this.gamepadRequired) { + output.writeBool(26, this.gamepadRequired); + } + if (this.hasExternallyHosted || this.externallyHosted) { + output.writeBool(27, this.externallyHosted); + } + if (this.hasEverExternallyHosted || this.everExternallyHosted) { + output.writeBool(28, this.everExternallyHosted); + } + if (this.hasInstallNotes || !this.installNotes.equals("")) { + output.writeString(30, this.installNotes); + } + if (this.installLocation != 0 || this.hasInstallLocation) { + output.writeInt32(31, this.installLocation); + } + if (this.hasTargetSdkVersion || this.targetSdkVersion != 0) { + output.writeInt32(32, this.targetSdkVersion); + } + if (this.hasPreregistrationPromoCode || !this.preregistrationPromoCode.equals("")) { + output.writeString(33, this.preregistrationPromoCode); + } + if (this.installDetails != null) { + output.writeMessage(34, this.installDetails); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasDeveloperName || !this.developerName.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.developerName); + } + if (this.hasMajorVersionNumber || this.majorVersionNumber != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(2, this.majorVersionNumber); + } + if (this.hasVersionCode || this.versionCode != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(3, this.versionCode); + } + if (this.hasVersionString || !this.versionString.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(4, this.versionString); + } + if (this.hasTitle || !this.title.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(5, this.title); + } + if (this.appCategory != null && this.appCategory.length > 0) { + int dataCount = 0; + int dataSize = 0; + for (int i = 0; i < this.appCategory.length; i++) { + String element = this.appCategory[i]; + if (element != null) { + dataCount++; + dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element); + } + } + size = size + dataSize + (dataCount * 1); + } + if (this.hasContentRating || this.contentRating != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(8, this.contentRating); + } + if (this.hasInstallationSize || this.installationSize != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(9, this.installationSize); + } + if (this.permission != null && this.permission.length > 0) { + int dataCount2 = 0; + int dataSize2 = 0; + for (int i2 = 0; i2 < this.permission.length; i2++) { + String element2 = this.permission[i2]; + if (element2 != null) { + dataCount2++; + dataSize2 += CodedOutputByteBufferNano.computeStringSizeNoTag(element2); + } + } + size = size + dataSize2 + (dataCount2 * 1); + } + if (this.hasDeveloperEmail || !this.developerEmail.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(11, this.developerEmail); + } + if (this.hasDeveloperWebsite || !this.developerWebsite.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(12, this.developerWebsite); + } + if (this.hasNumDownloads || !this.numDownloads.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(13, this.numDownloads); + } + if (this.hasPackageName || !this.packageName.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(14, this.packageName); + } + if (this.hasRecentChangesHtml || !this.recentChangesHtml.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(15, this.recentChangesHtml); + } + if (this.hasUploadDate || !this.uploadDate.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(16, this.uploadDate); + } + if (this.file != null && this.file.length > 0) { + for (int i3 = 0; i3 < this.file.length; i3++) { + FileMetadata element3 = this.file[i3]; + if (element3 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(17, element3); + } + } + } + if (this.hasAppType || !this.appType.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(18, this.appType); + } + if (this.certificateHash != null && this.certificateHash.length > 0) { + int dataCount3 = 0; + int dataSize3 = 0; + for (int i4 = 0; i4 < this.certificateHash.length; i4++) { + String element4 = this.certificateHash[i4]; + if (element4 != null) { + dataCount3++; + dataSize3 += CodedOutputByteBufferNano.computeStringSizeNoTag(element4); + } + } + size = size + dataSize3 + (dataCount3 * 2); + } + if (this.hasVariesByAccount || !this.variesByAccount) { + size += CodedOutputByteBufferNano.computeTagSize(21) + 1; + } + if (this.certificateSet != null && this.certificateSet.length > 0) { + for (int i5 = 0; i5 < this.certificateSet.length; i5++) { + CertificateSet element5 = this.certificateSet[i5]; + if (element5 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(22, element5); + } + } + } + if (this.autoAcquireFreeAppIfHigherVersionAvailableTag != null && this.autoAcquireFreeAppIfHigherVersionAvailableTag.length > 0) { + int dataCount4 = 0; + int dataSize4 = 0; + for (int i6 = 0; i6 < this.autoAcquireFreeAppIfHigherVersionAvailableTag.length; i6++) { + String element6 = this.autoAcquireFreeAppIfHigherVersionAvailableTag[i6]; + if (element6 != null) { + dataCount4++; + dataSize4 += CodedOutputByteBufferNano.computeStringSizeNoTag(element6); + } + } + size = size + dataSize4 + (dataCount4 * 2); + } + if (this.hasDeclaresIab || this.declaresIab) { + size += CodedOutputByteBufferNano.computeTagSize(24) + 1; + } + if (this.splitId != null && this.splitId.length > 0) { + int dataCount5 = 0; + int dataSize5 = 0; + for (int i7 = 0; i7 < this.splitId.length; i7++) { + String element7 = this.splitId[i7]; + if (element7 != null) { + dataCount5++; + dataSize5 += CodedOutputByteBufferNano.computeStringSizeNoTag(element7); + } + } + size = size + dataSize5 + (dataCount5 * 2); + } + if (this.hasGamepadRequired || this.gamepadRequired) { + size += CodedOutputByteBufferNano.computeTagSize(26) + 1; + } + if (this.hasExternallyHosted || this.externallyHosted) { + size += CodedOutputByteBufferNano.computeTagSize(27) + 1; + } + if (this.hasEverExternallyHosted || this.everExternallyHosted) { + size += CodedOutputByteBufferNano.computeTagSize(28) + 1; + } + if (this.hasInstallNotes || !this.installNotes.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(30, this.installNotes); + } + if (this.installLocation != 0 || this.hasInstallLocation) { + size += CodedOutputByteBufferNano.computeInt32Size(31, this.installLocation); + } + if (this.hasTargetSdkVersion || this.targetSdkVersion != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(32, this.targetSdkVersion); + } + if (this.hasPreregistrationPromoCode || !this.preregistrationPromoCode.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(33, this.preregistrationPromoCode); + } + if (this.installDetails != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(34, this.installDetails); + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/AppFileMetadata.java b/docs/com/google/android/finsky/protos/AppFileMetadata.java new file mode 100644 index 0000000..63824b6 --- /dev/null +++ b/docs/com/google/android/finsky/protos/AppFileMetadata.java @@ -0,0 +1,159 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class AppFileMetadata extends MessageNano { + private static volatile AppFileMetadata[] _emptyArray; + public int fileType = 0; + public boolean hasFileType = false; + public int versionCode = 0; + public boolean hasVersionCode = false; + public long size = 0; + public boolean hasSize = false; + public String signature = ""; + public boolean hasSignature = false; + public long compressedSize = 0; + public boolean hasCompressedSize = false; + public String downloadUrl = ""; + public boolean hasDownloadUrl = false; + public String compressedDownloadUrl = ""; + public boolean hasCompressedDownloadUrl = false; + public AndroidAppPatchData patchData = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + this.fileType = readRawVarint32; + this.hasFileType = true; + continue; + } + case 16: + this.versionCode = x0.readRawVarint32(); + this.hasVersionCode = true; + break; + case 24: + this.size = x0.readRawVarint64(); + this.hasSize = true; + break; + case 34: + this.downloadUrl = x0.readString(); + this.hasDownloadUrl = true; + break; + case 42: + if (this.patchData == null) { + this.patchData = new AndroidAppPatchData(); + } + x0.readMessage(this.patchData); + break; + case 48: + this.compressedSize = x0.readRawVarint64(); + this.hasCompressedSize = true; + break; + case 58: + this.compressedDownloadUrl = x0.readString(); + this.hasCompressedDownloadUrl = true; + break; + case 66: + this.signature = x0.readString(); + this.hasSignature = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static AppFileMetadata[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new AppFileMetadata[0]; + } + } + } + return _emptyArray; + } + + public AppFileMetadata() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.fileType != 0 || this.hasFileType) { + output.writeInt32(1, this.fileType); + } + if (this.hasVersionCode || this.versionCode != 0) { + output.writeInt32(2, this.versionCode); + } + if (this.hasSize || this.size != 0) { + output.writeInt64(3, this.size); + } + if (this.hasDownloadUrl || !this.downloadUrl.equals("")) { + output.writeString(4, this.downloadUrl); + } + if (this.patchData != null) { + output.writeMessage(5, this.patchData); + } + if (this.hasCompressedSize || this.compressedSize != 0) { + output.writeInt64(6, this.compressedSize); + } + if (this.hasCompressedDownloadUrl || !this.compressedDownloadUrl.equals("")) { + output.writeString(7, this.compressedDownloadUrl); + } + if (this.hasSignature || !this.signature.equals("")) { + output.writeString(8, this.signature); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.fileType != 0 || this.hasFileType) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.fileType); + } + if (this.hasVersionCode || this.versionCode != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(2, this.versionCode); + } + if (this.hasSize || this.size != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(3, this.size); + } + if (this.hasDownloadUrl || !this.downloadUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(4, this.downloadUrl); + } + if (this.patchData != null) { + size += CodedOutputByteBufferNano.computeMessageSize(5, this.patchData); + } + if (this.hasCompressedSize || this.compressedSize != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(6, this.compressedSize); + } + if (this.hasCompressedDownloadUrl || !this.compressedDownloadUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(7, this.compressedDownloadUrl); + } + if (this.hasSignature || !this.signature.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(8, this.signature); + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/Common.java b/docs/com/google/android/finsky/protos/Common.java new file mode 100644 index 0000000..ef40dd0 --- /dev/null +++ b/docs/com/google/android/finsky/protos/Common.java @@ -0,0 +1,3124 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public interface Common { + + /* loaded from: classes.dex */ + public static final class Docid extends MessageNano { + private static volatile Docid[] _emptyArray; + public String backendDocid = ""; + public boolean hasBackendDocid = false; + public int type = 1; + public boolean hasType = false; + public int backend = 0; + public boolean hasBackend = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.backendDocid = x0.readString(); + this.hasBackendDocid = true; + break; + case 16: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + this.type = readRawVarint32; + this.hasType = true; + continue; + } + case 24: + int readRawVarint322 = x0.readRawVarint32(); + switch (readRawVarint322) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 10: + case 11: + case 12: + case 13: + this.backend = readRawVarint322; + this.hasBackend = true; + continue; + } + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static Docid[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new Docid[0]; + } + } + } + return _emptyArray; + } + + public Docid() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasBackendDocid || !this.backendDocid.equals("")) { + output.writeString(1, this.backendDocid); + } + if (this.type != 1 || this.hasType) { + output.writeInt32(2, this.type); + } + if (this.backend != 0 || this.hasBackend) { + output.writeInt32(3, this.backend); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasBackendDocid || !this.backendDocid.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.backendDocid); + } + if (this.type != 1 || this.hasType) { + size += CodedOutputByteBufferNano.computeInt32Size(2, this.type); + } + if (this.backend != 0 || this.hasBackend) { + return size + CodedOutputByteBufferNano.computeInt32Size(3, this.backend); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class OfferPaymentPeriod extends MessageNano { + public TimePeriod duration = null; + public MonthAndDay start = null; + public MonthAndDay end = null; + + public OfferPaymentPeriod() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.duration != null) { + output.writeMessage(1, this.duration); + } + if (this.start != null) { + output.writeMessage(2, this.start); + } + if (this.end != null) { + output.writeMessage(3, this.end); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.duration != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.duration); + } + if (this.start != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.start); + } + if (this.end != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(3, this.end); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.duration == null) { + this.duration = new TimePeriod(); + } + x0.readMessage(this.duration); + break; + case 18: + if (this.start == null) { + this.start = new MonthAndDay(); + } + x0.readMessage(this.start); + break; + case 26: + if (this.end == null) { + this.end = new MonthAndDay(); + } + x0.readMessage(this.end); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class OfferPaymentOverride extends MessageNano { + private static volatile OfferPaymentOverride[] _emptyArray; + public long micros = 0; + public boolean hasMicros = false; + public MonthAndDay start = null; + public MonthAndDay end = null; + + public static OfferPaymentOverride[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new OfferPaymentOverride[0]; + } + } + } + return _emptyArray; + } + + public OfferPaymentOverride() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasMicros || this.micros != 0) { + output.writeInt64(1, this.micros); + } + if (this.start != null) { + output.writeMessage(2, this.start); + } + if (this.end != null) { + output.writeMessage(3, this.end); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasMicros || this.micros != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(1, this.micros); + } + if (this.start != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.start); + } + if (this.end != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(3, this.end); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.micros = x0.readRawVarint64(); + this.hasMicros = true; + break; + case 18: + if (this.start == null) { + this.start = new MonthAndDay(); + } + x0.readMessage(this.start); + break; + case 26: + if (this.end == null) { + this.end = new MonthAndDay(); + } + x0.readMessage(this.end); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class OfferPayment extends MessageNano { + private static volatile OfferPayment[] _emptyArray; + public long micros = 0; + public boolean hasMicros = false; + public String currencyCode = ""; + public boolean hasCurrencyCode = false; + public OfferPaymentPeriod offerPaymentPeriod = null; + public OfferPaymentOverride[] offerPaymentOverride = OfferPaymentOverride.emptyArray(); + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.micros = x0.readRawVarint64(); + this.hasMicros = true; + break; + case 18: + this.currencyCode = x0.readString(); + this.hasCurrencyCode = true; + break; + case 26: + if (this.offerPaymentPeriod == null) { + this.offerPaymentPeriod = new OfferPaymentPeriod(); + } + x0.readMessage(this.offerPaymentPeriod); + break; + case 34: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 34); + if (this.offerPaymentOverride == null) { + length = 0; + } else { + length = this.offerPaymentOverride.length; + } + OfferPaymentOverride[] offerPaymentOverrideArr = new OfferPaymentOverride[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.offerPaymentOverride, 0, offerPaymentOverrideArr, 0, length); + } + while (length < offerPaymentOverrideArr.length - 1) { + offerPaymentOverrideArr[length] = new OfferPaymentOverride(); + x0.readMessage(offerPaymentOverrideArr[length]); + x0.readTag(); + length++; + } + offerPaymentOverrideArr[length] = new OfferPaymentOverride(); + x0.readMessage(offerPaymentOverrideArr[length]); + this.offerPaymentOverride = offerPaymentOverrideArr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static OfferPayment[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new OfferPayment[0]; + } + } + } + return _emptyArray; + } + + public OfferPayment() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasMicros || this.micros != 0) { + output.writeInt64(1, this.micros); + } + if (this.hasCurrencyCode || !this.currencyCode.equals("")) { + output.writeString(2, this.currencyCode); + } + if (this.offerPaymentPeriod != null) { + output.writeMessage(3, this.offerPaymentPeriod); + } + if (this.offerPaymentOverride != null && this.offerPaymentOverride.length > 0) { + for (int i = 0; i < this.offerPaymentOverride.length; i++) { + OfferPaymentOverride element = this.offerPaymentOverride[i]; + if (element != null) { + output.writeMessage(4, element); + } + } + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasMicros || this.micros != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(1, this.micros); + } + if (this.hasCurrencyCode || !this.currencyCode.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.currencyCode); + } + if (this.offerPaymentPeriod != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.offerPaymentPeriod); + } + if (this.offerPaymentOverride != null && this.offerPaymentOverride.length > 0) { + for (int i = 0; i < this.offerPaymentOverride.length; i++) { + OfferPaymentOverride element = this.offerPaymentOverride[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, element); + } + } + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class Offer extends MessageNano { + private static volatile Offer[] _emptyArray; + public OfferPayment[] offerPayment = OfferPayment.emptyArray(); + public boolean repeatLastPayment = false; + public boolean hasRepeatLastPayment = false; + public long micros = 0; + public boolean hasMicros = false; + public String currencyCode = ""; + public boolean hasCurrencyCode = false; + public String formattedAmount = ""; + public boolean hasFormattedAmount = false; + public String formattedName = ""; + public boolean hasFormattedName = false; + public String formattedDescription = ""; + public boolean hasFormattedDescription = false; + public String buyButtonLabel = ""; + public boolean hasBuyButtonLabel = false; + public boolean instantPurchaseEnabled = false; + public boolean hasInstantPurchaseEnabled = false; + public long fullPriceMicros = 0; + public boolean hasFullPriceMicros = false; + public String formattedFullAmount = ""; + public boolean hasFormattedFullAmount = false; + public Offer[] convertedPrice = emptyArray(); + public boolean checkoutFlowRequired = false; + public boolean hasCheckoutFlowRequired = false; + public boolean temporarilyFree = false; + public boolean hasTemporarilyFree = false; + public int offerType = 1; + public boolean hasOfferType = false; + public int licensedOfferType = 1; + public boolean hasLicensedOfferType = false; + public LicenseTerms licenseTerms = null; + public RentalTerms rentalTerms = null; + public SubscriptionTerms subscriptionTerms = null; + public SubscriptionContentTerms subscriptionContentTerms = null; + public VoucherOfferTerms voucherTerms = null; + public boolean preorder = false; + public boolean hasPreorder = false; + public long preorderFulfillmentDisplayDate = 0; + public boolean hasPreorderFulfillmentDisplayDate = false; + public long onSaleDate = 0; + public boolean hasOnSaleDate = false; + public int onSaleDateDisplayTimeZoneOffsetMsec = 0; + public boolean hasOnSaleDateDisplayTimeZoneOffsetMsec = false; + public String[] promotionLabel = WireFormatNano.EMPTY_STRING_ARRAY; + public String offerId = ""; + public boolean hasOfferId = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + int length2; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.micros = x0.readRawVarint64(); + this.hasMicros = true; + break; + case 18: + this.currencyCode = x0.readString(); + this.hasCurrencyCode = true; + break; + case 26: + this.formattedAmount = x0.readString(); + this.hasFormattedAmount = true; + break; + case 34: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 34); + if (this.convertedPrice == null) { + length2 = 0; + } else { + length2 = this.convertedPrice.length; + } + Offer[] offerArr = new Offer[repeatedFieldArrayLength + length2]; + if (length2 != 0) { + System.arraycopy(this.convertedPrice, 0, offerArr, 0, length2); + } + while (length2 < offerArr.length - 1) { + offerArr[length2] = new Offer(); + x0.readMessage(offerArr[length2]); + x0.readTag(); + length2++; + } + offerArr[length2] = new Offer(); + x0.readMessage(offerArr[length2]); + this.convertedPrice = offerArr; + break; + case 40: + this.checkoutFlowRequired = x0.readBool(); + this.hasCheckoutFlowRequired = true; + break; + case 48: + this.fullPriceMicros = x0.readRawVarint64(); + this.hasFullPriceMicros = true; + break; + case 58: + this.formattedFullAmount = x0.readString(); + this.hasFormattedFullAmount = true; + break; + case 64: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 1: + case 2: + case 3: + case 4: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + this.offerType = readRawVarint32; + this.hasOfferType = true; + continue; + } + case 74: + if (this.rentalTerms == null) { + this.rentalTerms = new RentalTerms(); + } + x0.readMessage(this.rentalTerms); + break; + case 80: + this.onSaleDate = x0.readRawVarint64(); + this.hasOnSaleDate = true; + break; + case 90: + int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 90); + int length3 = this.promotionLabel == null ? 0 : this.promotionLabel.length; + String[] strArr = new String[repeatedFieldArrayLength2 + length3]; + if (length3 != 0) { + System.arraycopy(this.promotionLabel, 0, strArr, 0, length3); + } + while (length3 < strArr.length - 1) { + strArr[length3] = x0.readString(); + x0.readTag(); + length3++; + } + strArr[length3] = x0.readString(); + this.promotionLabel = strArr; + break; + case 98: + if (this.subscriptionTerms == null) { + this.subscriptionTerms = new SubscriptionTerms(); + } + x0.readMessage(this.subscriptionTerms); + break; + case 106: + this.formattedName = x0.readString(); + this.hasFormattedName = true; + break; + case 114: + this.formattedDescription = x0.readString(); + this.hasFormattedDescription = true; + break; + case 120: + this.preorder = x0.readBool(); + this.hasPreorder = true; + break; + case 128: + this.onSaleDateDisplayTimeZoneOffsetMsec = x0.readRawVarint32(); + this.hasOnSaleDateDisplayTimeZoneOffsetMsec = true; + break; + case 136: + int readRawVarint322 = x0.readRawVarint32(); + switch (readRawVarint322) { + case 1: + case 2: + case 3: + case 4: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + this.licensedOfferType = readRawVarint322; + this.hasLicensedOfferType = true; + continue; + } + case 146: + if (this.subscriptionContentTerms == null) { + this.subscriptionContentTerms = new SubscriptionContentTerms(); + } + x0.readMessage(this.subscriptionContentTerms); + break; + case 154: + this.offerId = x0.readString(); + this.hasOfferId = true; + break; + case 160: + this.preorderFulfillmentDisplayDate = x0.readRawVarint64(); + this.hasPreorderFulfillmentDisplayDate = true; + break; + case 170: + if (this.licenseTerms == null) { + this.licenseTerms = new LicenseTerms(); + } + x0.readMessage(this.licenseTerms); + break; + case 176: + this.temporarilyFree = x0.readBool(); + this.hasTemporarilyFree = true; + break; + case 186: + if (this.voucherTerms == null) { + this.voucherTerms = new VoucherOfferTerms(); + } + x0.readMessage(this.voucherTerms); + break; + case 194: + int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 194); + if (this.offerPayment == null) { + length = 0; + } else { + length = this.offerPayment.length; + } + OfferPayment[] offerPaymentArr = new OfferPayment[repeatedFieldArrayLength3 + length]; + if (length != 0) { + System.arraycopy(this.offerPayment, 0, offerPaymentArr, 0, length); + } + while (length < offerPaymentArr.length - 1) { + offerPaymentArr[length] = new OfferPayment(); + x0.readMessage(offerPaymentArr[length]); + x0.readTag(); + length++; + } + offerPaymentArr[length] = new OfferPayment(); + x0.readMessage(offerPaymentArr[length]); + this.offerPayment = offerPaymentArr; + break; + case 200: + this.repeatLastPayment = x0.readBool(); + this.hasRepeatLastPayment = true; + break; + case 210: + this.buyButtonLabel = x0.readString(); + this.hasBuyButtonLabel = true; + break; + case 216: + this.instantPurchaseEnabled = x0.readBool(); + this.hasInstantPurchaseEnabled = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static Offer[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new Offer[0]; + } + } + } + return _emptyArray; + } + + public Offer() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasMicros || this.micros != 0) { + output.writeInt64(1, this.micros); + } + if (this.hasCurrencyCode || !this.currencyCode.equals("")) { + output.writeString(2, this.currencyCode); + } + if (this.hasFormattedAmount || !this.formattedAmount.equals("")) { + output.writeString(3, this.formattedAmount); + } + if (this.convertedPrice != null && this.convertedPrice.length > 0) { + for (int i = 0; i < this.convertedPrice.length; i++) { + Offer element = this.convertedPrice[i]; + if (element != null) { + output.writeMessage(4, element); + } + } + } + if (this.hasCheckoutFlowRequired || this.checkoutFlowRequired) { + output.writeBool(5, this.checkoutFlowRequired); + } + if (this.hasFullPriceMicros || this.fullPriceMicros != 0) { + output.writeInt64(6, this.fullPriceMicros); + } + if (this.hasFormattedFullAmount || !this.formattedFullAmount.equals("")) { + output.writeString(7, this.formattedFullAmount); + } + if (this.offerType != 1 || this.hasOfferType) { + output.writeInt32(8, this.offerType); + } + if (this.rentalTerms != null) { + output.writeMessage(9, this.rentalTerms); + } + if (this.hasOnSaleDate || this.onSaleDate != 0) { + output.writeInt64(10, this.onSaleDate); + } + if (this.promotionLabel != null && this.promotionLabel.length > 0) { + for (int i2 = 0; i2 < this.promotionLabel.length; i2++) { + String element2 = this.promotionLabel[i2]; + if (element2 != null) { + output.writeString(11, element2); + } + } + } + if (this.subscriptionTerms != null) { + output.writeMessage(12, this.subscriptionTerms); + } + if (this.hasFormattedName || !this.formattedName.equals("")) { + output.writeString(13, this.formattedName); + } + if (this.hasFormattedDescription || !this.formattedDescription.equals("")) { + output.writeString(14, this.formattedDescription); + } + if (this.hasPreorder || this.preorder) { + output.writeBool(15, this.preorder); + } + if (this.hasOnSaleDateDisplayTimeZoneOffsetMsec || this.onSaleDateDisplayTimeZoneOffsetMsec != 0) { + output.writeInt32(16, this.onSaleDateDisplayTimeZoneOffsetMsec); + } + if (this.licensedOfferType != 1 || this.hasLicensedOfferType) { + output.writeInt32(17, this.licensedOfferType); + } + if (this.subscriptionContentTerms != null) { + output.writeMessage(18, this.subscriptionContentTerms); + } + if (this.hasOfferId || !this.offerId.equals("")) { + output.writeString(19, this.offerId); + } + if (this.hasPreorderFulfillmentDisplayDate || this.preorderFulfillmentDisplayDate != 0) { + output.writeInt64(20, this.preorderFulfillmentDisplayDate); + } + if (this.licenseTerms != null) { + output.writeMessage(21, this.licenseTerms); + } + if (this.hasTemporarilyFree || this.temporarilyFree) { + output.writeBool(22, this.temporarilyFree); + } + if (this.voucherTerms != null) { + output.writeMessage(23, this.voucherTerms); + } + if (this.offerPayment != null && this.offerPayment.length > 0) { + for (int i3 = 0; i3 < this.offerPayment.length; i3++) { + OfferPayment element3 = this.offerPayment[i3]; + if (element3 != null) { + output.writeMessage(24, element3); + } + } + } + if (this.hasRepeatLastPayment || this.repeatLastPayment) { + output.writeBool(25, this.repeatLastPayment); + } + if (this.hasBuyButtonLabel || !this.buyButtonLabel.equals("")) { + output.writeString(26, this.buyButtonLabel); + } + if (this.hasInstantPurchaseEnabled || this.instantPurchaseEnabled) { + output.writeBool(27, this.instantPurchaseEnabled); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasMicros || this.micros != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(1, this.micros); + } + if (this.hasCurrencyCode || !this.currencyCode.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.currencyCode); + } + if (this.hasFormattedAmount || !this.formattedAmount.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.formattedAmount); + } + if (this.convertedPrice != null && this.convertedPrice.length > 0) { + for (int i = 0; i < this.convertedPrice.length; i++) { + Offer element = this.convertedPrice[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, element); + } + } + } + if (this.hasCheckoutFlowRequired || this.checkoutFlowRequired) { + size += CodedOutputByteBufferNano.computeTagSize(5) + 1; + } + if (this.hasFullPriceMicros || this.fullPriceMicros != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(6, this.fullPriceMicros); + } + if (this.hasFormattedFullAmount || !this.formattedFullAmount.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(7, this.formattedFullAmount); + } + if (this.offerType != 1 || this.hasOfferType) { + size += CodedOutputByteBufferNano.computeInt32Size(8, this.offerType); + } + if (this.rentalTerms != null) { + size += CodedOutputByteBufferNano.computeMessageSize(9, this.rentalTerms); + } + if (this.hasOnSaleDate || this.onSaleDate != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(10, this.onSaleDate); + } + if (this.promotionLabel != null && this.promotionLabel.length > 0) { + int dataCount = 0; + int dataSize = 0; + for (int i2 = 0; i2 < this.promotionLabel.length; i2++) { + String element2 = this.promotionLabel[i2]; + if (element2 != null) { + dataCount++; + dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element2); + } + } + size = size + dataSize + (dataCount * 1); + } + if (this.subscriptionTerms != null) { + size += CodedOutputByteBufferNano.computeMessageSize(12, this.subscriptionTerms); + } + if (this.hasFormattedName || !this.formattedName.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(13, this.formattedName); + } + if (this.hasFormattedDescription || !this.formattedDescription.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(14, this.formattedDescription); + } + if (this.hasPreorder || this.preorder) { + size += CodedOutputByteBufferNano.computeTagSize(15) + 1; + } + if (this.hasOnSaleDateDisplayTimeZoneOffsetMsec || this.onSaleDateDisplayTimeZoneOffsetMsec != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(16, this.onSaleDateDisplayTimeZoneOffsetMsec); + } + if (this.licensedOfferType != 1 || this.hasLicensedOfferType) { + size += CodedOutputByteBufferNano.computeInt32Size(17, this.licensedOfferType); + } + if (this.subscriptionContentTerms != null) { + size += CodedOutputByteBufferNano.computeMessageSize(18, this.subscriptionContentTerms); + } + if (this.hasOfferId || !this.offerId.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(19, this.offerId); + } + if (this.hasPreorderFulfillmentDisplayDate || this.preorderFulfillmentDisplayDate != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(20, this.preorderFulfillmentDisplayDate); + } + if (this.licenseTerms != null) { + size += CodedOutputByteBufferNano.computeMessageSize(21, this.licenseTerms); + } + if (this.hasTemporarilyFree || this.temporarilyFree) { + size += CodedOutputByteBufferNano.computeTagSize(22) + 1; + } + if (this.voucherTerms != null) { + size += CodedOutputByteBufferNano.computeMessageSize(23, this.voucherTerms); + } + if (this.offerPayment != null && this.offerPayment.length > 0) { + for (int i3 = 0; i3 < this.offerPayment.length; i3++) { + OfferPayment element3 = this.offerPayment[i3]; + if (element3 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(24, element3); + } + } + } + if (this.hasRepeatLastPayment || this.repeatLastPayment) { + size += CodedOutputByteBufferNano.computeTagSize(25) + 1; + } + if (this.hasBuyButtonLabel || !this.buyButtonLabel.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(26, this.buyButtonLabel); + } + if (this.hasInstantPurchaseEnabled || this.instantPurchaseEnabled) { + return size + CodedOutputByteBufferNano.computeTagSize(27) + 1; + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class Image extends MessageNano { + private static volatile Image[] _emptyArray; + public int imageType = 0; + public boolean hasImageType = false; + public int positionInSequence = 0; + public boolean hasPositionInSequence = false; + public Dimension dimension = null; + public String imageUrl = ""; + public boolean hasImageUrl = false; + public String secureUrl = ""; + public boolean hasSecureUrl = false; + public String altTextLocalized = ""; + public boolean hasAltTextLocalized = false; + public boolean supportsFifeUrlOptions = false; + public boolean hasSupportsFifeUrlOptions = false; + public boolean supportsFifeMonogramOption = false; + public boolean hasSupportsFifeMonogramOption = false; + public int durationSeconds = 0; + public boolean hasDurationSeconds = false; + public String fillColorRgb = ""; + public boolean hasFillColorRgb = false; + public boolean autogen = false; + public boolean hasAutogen = false; + public Attribution attribution = null; + public String backgroundColorRgb = ""; + public boolean hasBackgroundColorRgb = false; + public ImagePalette palette = null; + public Citation citation = null; + public int deviceClass = 0; + public boolean hasDeviceClass = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 13: + case 14: + case 15: + this.imageType = readRawVarint32; + this.hasImageType = true; + continue; + } + case 19: + if (this.dimension == null) { + this.dimension = new Dimension(); + } + x0.readGroup(this.dimension, 2); + break; + case 42: + this.imageUrl = x0.readString(); + this.hasImageUrl = true; + break; + case 50: + this.altTextLocalized = x0.readString(); + this.hasAltTextLocalized = true; + break; + case 58: + this.secureUrl = x0.readString(); + this.hasSecureUrl = true; + break; + case 64: + this.positionInSequence = x0.readRawVarint32(); + this.hasPositionInSequence = true; + break; + case 72: + this.supportsFifeUrlOptions = x0.readBool(); + this.hasSupportsFifeUrlOptions = true; + break; + case 83: + if (this.citation == null) { + this.citation = new Citation(); + } + x0.readGroup(this.citation, 10); + break; + case 112: + this.durationSeconds = x0.readRawVarint32(); + this.hasDurationSeconds = true; + break; + case 122: + this.fillColorRgb = x0.readString(); + this.hasFillColorRgb = true; + break; + case 128: + this.autogen = x0.readBool(); + this.hasAutogen = true; + break; + case 138: + if (this.attribution == null) { + this.attribution = new Attribution(); + } + x0.readMessage(this.attribution); + break; + case 154: + this.backgroundColorRgb = x0.readString(); + this.hasBackgroundColorRgb = true; + break; + case 162: + if (this.palette == null) { + this.palette = new ImagePalette(); + } + x0.readMessage(this.palette); + break; + case 168: + int readRawVarint322 = x0.readRawVarint32(); + switch (readRawVarint322) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + this.deviceClass = readRawVarint322; + this.hasDeviceClass = true; + continue; + } + case 176: + this.supportsFifeMonogramOption = x0.readBool(); + this.hasSupportsFifeMonogramOption = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + /* loaded from: classes.dex */ + public static final class Dimension extends MessageNano { + public int width = 0; + public boolean hasWidth = false; + public int height = 0; + public boolean hasHeight = false; + public int aspectRatio = 0; + public boolean hasAspectRatio = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 24: + this.width = x0.readRawVarint32(); + this.hasWidth = true; + break; + case 32: + this.height = x0.readRawVarint32(); + this.hasHeight = true; + break; + case 144: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + this.aspectRatio = readRawVarint32; + this.hasAspectRatio = true; + continue; + } + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public Dimension() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasWidth || this.width != 0) { + output.writeInt32(3, this.width); + } + if (this.hasHeight || this.height != 0) { + output.writeInt32(4, this.height); + } + if (this.aspectRatio != 0 || this.hasAspectRatio) { + output.writeInt32(18, this.aspectRatio); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasWidth || this.width != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(3, this.width); + } + if (this.hasHeight || this.height != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(4, this.height); + } + if (this.aspectRatio != 0 || this.hasAspectRatio) { + return size + CodedOutputByteBufferNano.computeInt32Size(18, this.aspectRatio); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class Citation extends MessageNano { + public String titleLocalized = ""; + public boolean hasTitleLocalized = false; + public String url = ""; + public boolean hasUrl = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 90: + this.titleLocalized = x0.readString(); + this.hasTitleLocalized = true; + break; + case 98: + this.url = x0.readString(); + this.hasUrl = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public Citation() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasTitleLocalized || !this.titleLocalized.equals("")) { + output.writeString(11, this.titleLocalized); + } + if (this.hasUrl || !this.url.equals("")) { + output.writeString(12, this.url); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasTitleLocalized || !this.titleLocalized.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(11, this.titleLocalized); + } + if (this.hasUrl || !this.url.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(12, this.url); + } + return size; + } + } + + public static Image[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new Image[0]; + } + } + } + return _emptyArray; + } + + public Image() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.imageType != 0 || this.hasImageType) { + output.writeInt32(1, this.imageType); + } + if (this.dimension != null) { + output.writeGroup(2, this.dimension); + } + if (this.hasImageUrl || !this.imageUrl.equals("")) { + output.writeString(5, this.imageUrl); + } + if (this.hasAltTextLocalized || !this.altTextLocalized.equals("")) { + output.writeString(6, this.altTextLocalized); + } + if (this.hasSecureUrl || !this.secureUrl.equals("")) { + output.writeString(7, this.secureUrl); + } + if (this.hasPositionInSequence || this.positionInSequence != 0) { + output.writeInt32(8, this.positionInSequence); + } + if (this.hasSupportsFifeUrlOptions || this.supportsFifeUrlOptions) { + output.writeBool(9, this.supportsFifeUrlOptions); + } + if (this.citation != null) { + output.writeGroup(10, this.citation); + } + if (this.hasDurationSeconds || this.durationSeconds != 0) { + output.writeInt32(14, this.durationSeconds); + } + if (this.hasFillColorRgb || !this.fillColorRgb.equals("")) { + output.writeString(15, this.fillColorRgb); + } + if (this.hasAutogen || this.autogen) { + output.writeBool(16, this.autogen); + } + if (this.attribution != null) { + output.writeMessage(17, this.attribution); + } + if (this.hasBackgroundColorRgb || !this.backgroundColorRgb.equals("")) { + output.writeString(19, this.backgroundColorRgb); + } + if (this.palette != null) { + output.writeMessage(20, this.palette); + } + if (this.deviceClass != 0 || this.hasDeviceClass) { + output.writeInt32(21, this.deviceClass); + } + if (this.hasSupportsFifeMonogramOption || this.supportsFifeMonogramOption) { + output.writeBool(22, this.supportsFifeMonogramOption); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.imageType != 0 || this.hasImageType) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.imageType); + } + if (this.dimension != null) { + size += CodedOutputByteBufferNano.computeGroupSize(2, this.dimension); + } + if (this.hasImageUrl || !this.imageUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(5, this.imageUrl); + } + if (this.hasAltTextLocalized || !this.altTextLocalized.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(6, this.altTextLocalized); + } + if (this.hasSecureUrl || !this.secureUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(7, this.secureUrl); + } + if (this.hasPositionInSequence || this.positionInSequence != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(8, this.positionInSequence); + } + if (this.hasSupportsFifeUrlOptions || this.supportsFifeUrlOptions) { + size += CodedOutputByteBufferNano.computeTagSize(9) + 1; + } + if (this.citation != null) { + size += CodedOutputByteBufferNano.computeGroupSize(10, this.citation); + } + if (this.hasDurationSeconds || this.durationSeconds != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(14, this.durationSeconds); + } + if (this.hasFillColorRgb || !this.fillColorRgb.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(15, this.fillColorRgb); + } + if (this.hasAutogen || this.autogen) { + size += CodedOutputByteBufferNano.computeTagSize(16) + 1; + } + if (this.attribution != null) { + size += CodedOutputByteBufferNano.computeMessageSize(17, this.attribution); + } + if (this.hasBackgroundColorRgb || !this.backgroundColorRgb.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(19, this.backgroundColorRgb); + } + if (this.palette != null) { + size += CodedOutputByteBufferNano.computeMessageSize(20, this.palette); + } + if (this.deviceClass != 0 || this.hasDeviceClass) { + size += CodedOutputByteBufferNano.computeInt32Size(21, this.deviceClass); + } + if (this.hasSupportsFifeMonogramOption || this.supportsFifeMonogramOption) { + return size + CodedOutputByteBufferNano.computeTagSize(22) + 1; + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class ImagePalette extends MessageNano { + public String lightVibrantRgb = ""; + public boolean hasLightVibrantRgb = false; + public String vibrantRgb = ""; + public boolean hasVibrantRgb = false; + public String darkVibrantRgb = ""; + public boolean hasDarkVibrantRgb = false; + public String lightMutedRgb = ""; + public boolean hasLightMutedRgb = false; + public String mutedRgb = ""; + public boolean hasMutedRgb = false; + public String darkMutedRgb = ""; + public boolean hasDarkMutedRgb = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.lightVibrantRgb = x0.readString(); + this.hasLightVibrantRgb = true; + break; + case 18: + this.vibrantRgb = x0.readString(); + this.hasVibrantRgb = true; + break; + case 26: + this.darkVibrantRgb = x0.readString(); + this.hasDarkVibrantRgb = true; + break; + case 34: + this.lightMutedRgb = x0.readString(); + this.hasLightMutedRgb = true; + break; + case 42: + this.mutedRgb = x0.readString(); + this.hasMutedRgb = true; + break; + case 50: + this.darkMutedRgb = x0.readString(); + this.hasDarkMutedRgb = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public ImagePalette() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasLightVibrantRgb || !this.lightVibrantRgb.equals("")) { + output.writeString(1, this.lightVibrantRgb); + } + if (this.hasVibrantRgb || !this.vibrantRgb.equals("")) { + output.writeString(2, this.vibrantRgb); + } + if (this.hasDarkVibrantRgb || !this.darkVibrantRgb.equals("")) { + output.writeString(3, this.darkVibrantRgb); + } + if (this.hasLightMutedRgb || !this.lightMutedRgb.equals("")) { + output.writeString(4, this.lightMutedRgb); + } + if (this.hasMutedRgb || !this.mutedRgb.equals("")) { + output.writeString(5, this.mutedRgb); + } + if (this.hasDarkMutedRgb || !this.darkMutedRgb.equals("")) { + output.writeString(6, this.darkMutedRgb); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasLightVibrantRgb || !this.lightVibrantRgb.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.lightVibrantRgb); + } + if (this.hasVibrantRgb || !this.vibrantRgb.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.vibrantRgb); + } + if (this.hasDarkVibrantRgb || !this.darkVibrantRgb.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.darkVibrantRgb); + } + if (this.hasLightMutedRgb || !this.lightMutedRgb.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(4, this.lightMutedRgb); + } + if (this.hasMutedRgb || !this.mutedRgb.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(5, this.mutedRgb); + } + if (this.hasDarkMutedRgb || !this.darkMutedRgb.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(6, this.darkMutedRgb); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class RentalTerms extends MessageNano { + public TimePeriod grantPeriod = null; + public TimePeriod activatePeriod = null; + public long grantEndTimeSeconds = 0; + public boolean hasGrantEndTimeSeconds = false; + public int dEPRECATEDGrantPeriodSeconds = 0; + public boolean hasDEPRECATEDGrantPeriodSeconds = false; + public int dEPRECATEDActivatePeriodSeconds = 0; + public boolean hasDEPRECATEDActivatePeriodSeconds = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.dEPRECATEDGrantPeriodSeconds = x0.readRawVarint32(); + this.hasDEPRECATEDGrantPeriodSeconds = true; + break; + case 16: + this.dEPRECATEDActivatePeriodSeconds = x0.readRawVarint32(); + this.hasDEPRECATEDActivatePeriodSeconds = true; + break; + case 26: + if (this.grantPeriod == null) { + this.grantPeriod = new TimePeriod(); + } + x0.readMessage(this.grantPeriod); + break; + case 34: + if (this.activatePeriod == null) { + this.activatePeriod = new TimePeriod(); + } + x0.readMessage(this.activatePeriod); + break; + case 40: + this.grantEndTimeSeconds = x0.readRawVarint64(); + this.hasGrantEndTimeSeconds = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public RentalTerms() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasDEPRECATEDGrantPeriodSeconds || this.dEPRECATEDGrantPeriodSeconds != 0) { + output.writeInt32(1, this.dEPRECATEDGrantPeriodSeconds); + } + if (this.hasDEPRECATEDActivatePeriodSeconds || this.dEPRECATEDActivatePeriodSeconds != 0) { + output.writeInt32(2, this.dEPRECATEDActivatePeriodSeconds); + } + if (this.grantPeriod != null) { + output.writeMessage(3, this.grantPeriod); + } + if (this.activatePeriod != null) { + output.writeMessage(4, this.activatePeriod); + } + if (this.hasGrantEndTimeSeconds || this.grantEndTimeSeconds != 0) { + output.writeInt64(5, this.grantEndTimeSeconds); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasDEPRECATEDGrantPeriodSeconds || this.dEPRECATEDGrantPeriodSeconds != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.dEPRECATEDGrantPeriodSeconds); + } + if (this.hasDEPRECATEDActivatePeriodSeconds || this.dEPRECATEDActivatePeriodSeconds != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(2, this.dEPRECATEDActivatePeriodSeconds); + } + if (this.grantPeriod != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.grantPeriod); + } + if (this.activatePeriod != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, this.activatePeriod); + } + if (this.hasGrantEndTimeSeconds || this.grantEndTimeSeconds != 0) { + return size + CodedOutputByteBufferNano.computeInt64Size(5, this.grantEndTimeSeconds); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class TimePeriod extends MessageNano { + public int unit = 0; + public boolean hasUnit = false; + public int count = 0; + public boolean hasCount = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + this.unit = readRawVarint32; + this.hasUnit = true; + continue; + } + case 16: + this.count = x0.readRawVarint32(); + this.hasCount = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public TimePeriod() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.unit != 0 || this.hasUnit) { + output.writeInt32(1, this.unit); + } + if (this.hasCount || this.count != 0) { + output.writeInt32(2, this.count); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.unit != 0 || this.hasUnit) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.unit); + } + if (this.hasCount || this.count != 0) { + return size + CodedOutputByteBufferNano.computeInt32Size(2, this.count); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class MonthAndDay extends MessageNano { + public int month = 0; + public boolean hasMonth = false; + public int day = 0; + public boolean hasDay = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.month = x0.readRawVarint32(); + this.hasMonth = true; + break; + case 16: + this.day = x0.readRawVarint32(); + this.hasDay = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public MonthAndDay() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasMonth || this.month != 0) { + output.writeUInt32(1, this.month); + } + if (this.hasDay || this.day != 0) { + output.writeUInt32(2, this.day); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasMonth || this.month != 0) { + size += CodedOutputByteBufferNano.computeUInt32Size(1, this.month); + } + if (this.hasDay || this.day != 0) { + return size + CodedOutputByteBufferNano.computeUInt32Size(2, this.day); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class SeasonalSubscriptionInfo extends MessageNano { + public MonthAndDay periodStart = null; + public MonthAndDay periodEnd = null; + public boolean prorated = false; + public boolean hasProrated = false; + public Payment postTrialConversionPayment = null; + + /* loaded from: classes.dex */ + public static final class Payment extends MessageNano { + public long micros = 0; + public boolean hasMicros = false; + public String currencyCode = ""; + public boolean hasCurrencyCode = false; + public String formattedAmount = ""; + public boolean hasFormattedAmount = false; + public TimePeriod period = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.micros = x0.readRawVarint64(); + this.hasMicros = true; + break; + case 18: + this.currencyCode = x0.readString(); + this.hasCurrencyCode = true; + break; + case 26: + this.formattedAmount = x0.readString(); + this.hasFormattedAmount = true; + break; + case 34: + if (this.period == null) { + this.period = new TimePeriod(); + } + x0.readMessage(this.period); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public Payment() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasMicros || this.micros != 0) { + output.writeInt64(1, this.micros); + } + if (this.hasCurrencyCode || !this.currencyCode.equals("")) { + output.writeString(2, this.currencyCode); + } + if (this.hasFormattedAmount || !this.formattedAmount.equals("")) { + output.writeString(3, this.formattedAmount); + } + if (this.period != null) { + output.writeMessage(4, this.period); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasMicros || this.micros != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(1, this.micros); + } + if (this.hasCurrencyCode || !this.currencyCode.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.currencyCode); + } + if (this.hasFormattedAmount || !this.formattedAmount.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.formattedAmount); + } + if (this.period != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(4, this.period); + } + return size; + } + } + + public SeasonalSubscriptionInfo() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.periodStart != null) { + output.writeMessage(1, this.periodStart); + } + if (this.periodEnd != null) { + output.writeMessage(2, this.periodEnd); + } + if (this.hasProrated || this.prorated) { + output.writeBool(4, this.prorated); + } + if (this.postTrialConversionPayment != null) { + output.writeMessage(5, this.postTrialConversionPayment); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.periodStart != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.periodStart); + } + if (this.periodEnd != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.periodEnd); + } + if (this.hasProrated || this.prorated) { + size += CodedOutputByteBufferNano.computeTagSize(4) + 1; + } + if (this.postTrialConversionPayment != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(5, this.postTrialConversionPayment); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.periodStart == null) { + this.periodStart = new MonthAndDay(); + } + x0.readMessage(this.periodStart); + break; + case 18: + if (this.periodEnd == null) { + this.periodEnd = new MonthAndDay(); + } + x0.readMessage(this.periodEnd); + break; + case 32: + this.prorated = x0.readBool(); + this.hasProrated = true; + break; + case 42: + if (this.postTrialConversionPayment == null) { + this.postTrialConversionPayment = new Payment(); + } + x0.readMessage(this.postTrialConversionPayment); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class SubscriptionTerms extends MessageNano { + public TimePeriod recurringPeriod = null; + public TimePeriod trialPeriod = null; + public boolean enableAppSpecifiedTrialPeriod = false; + public boolean hasEnableAppSpecifiedTrialPeriod = false; + public String formattedPriceWithRecurrencePeriod = ""; + public boolean hasFormattedPriceWithRecurrencePeriod = false; + public SeasonalSubscriptionInfo seasonalSubscriptionInfo = null; + public Docid[] replaceDocid = Docid.emptyArray(); + public SubscriptionReplacement subscriptionReplacement = null; + public TimePeriod gracePeriod = null; + public boolean resignup = false; + public boolean hasResignup = false; + public long initialValidUntilTimestampMsec = 0; + public boolean hasInitialValidUntilTimestampMsec = false; + public String nextPaymentCurrencyCode = ""; + public boolean hasNextPaymentCurrencyCode = false; + public long nextPaymentPriceMicros = 0; + public boolean hasNextPaymentPriceMicros = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.recurringPeriod == null) { + this.recurringPeriod = new TimePeriod(); + } + x0.readMessage(this.recurringPeriod); + break; + case 18: + if (this.trialPeriod == null) { + this.trialPeriod = new TimePeriod(); + } + x0.readMessage(this.trialPeriod); + break; + case 26: + this.formattedPriceWithRecurrencePeriod = x0.readString(); + this.hasFormattedPriceWithRecurrencePeriod = true; + break; + case 34: + if (this.seasonalSubscriptionInfo == null) { + this.seasonalSubscriptionInfo = new SeasonalSubscriptionInfo(); + } + x0.readMessage(this.seasonalSubscriptionInfo); + break; + case 42: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 42); + if (this.replaceDocid == null) { + length = 0; + } else { + length = this.replaceDocid.length; + } + Docid[] docidArr = new Docid[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.replaceDocid, 0, docidArr, 0, length); + } + while (length < docidArr.length - 1) { + docidArr[length] = new Docid(); + x0.readMessage(docidArr[length]); + x0.readTag(); + length++; + } + docidArr[length] = new Docid(); + x0.readMessage(docidArr[length]); + this.replaceDocid = docidArr; + break; + case 50: + if (this.gracePeriod == null) { + this.gracePeriod = new TimePeriod(); + } + x0.readMessage(this.gracePeriod); + break; + case 56: + this.resignup = x0.readBool(); + this.hasResignup = true; + break; + case 64: + this.initialValidUntilTimestampMsec = x0.readRawVarint64(); + this.hasInitialValidUntilTimestampMsec = true; + break; + case 74: + this.nextPaymentCurrencyCode = x0.readString(); + this.hasNextPaymentCurrencyCode = true; + break; + case 80: + this.nextPaymentPriceMicros = x0.readRawVarint64(); + this.hasNextPaymentPriceMicros = true; + break; + case 88: + this.enableAppSpecifiedTrialPeriod = x0.readBool(); + this.hasEnableAppSpecifiedTrialPeriod = true; + break; + case 98: + if (this.subscriptionReplacement == null) { + this.subscriptionReplacement = new SubscriptionReplacement(); + } + x0.readMessage(this.subscriptionReplacement); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + /* loaded from: classes.dex */ + public static final class SubscriptionReplacement extends MessageNano { + public Docid newDocid = null; + public Docid[] oldDocid = Docid.emptyArray(); + public boolean keepNextRecurrenceTime = false; + public boolean hasKeepNextRecurrenceTime = false; + public boolean replaceOnFirstRecurrence = false; + public boolean hasReplaceOnFirstRecurrence = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.newDocid == null) { + this.newDocid = new Docid(); + } + x0.readMessage(this.newDocid); + break; + case 18: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 18); + if (this.oldDocid == null) { + length = 0; + } else { + length = this.oldDocid.length; + } + Docid[] docidArr = new Docid[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.oldDocid, 0, docidArr, 0, length); + } + while (length < docidArr.length - 1) { + docidArr[length] = new Docid(); + x0.readMessage(docidArr[length]); + x0.readTag(); + length++; + } + docidArr[length] = new Docid(); + x0.readMessage(docidArr[length]); + this.oldDocid = docidArr; + break; + case 24: + this.keepNextRecurrenceTime = x0.readBool(); + this.hasKeepNextRecurrenceTime = true; + break; + case 32: + this.replaceOnFirstRecurrence = x0.readBool(); + this.hasReplaceOnFirstRecurrence = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public SubscriptionReplacement() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.newDocid != null) { + output.writeMessage(1, this.newDocid); + } + if (this.oldDocid != null && this.oldDocid.length > 0) { + for (int i = 0; i < this.oldDocid.length; i++) { + Docid element = this.oldDocid[i]; + if (element != null) { + output.writeMessage(2, element); + } + } + } + if (this.hasKeepNextRecurrenceTime || this.keepNextRecurrenceTime) { + output.writeBool(3, this.keepNextRecurrenceTime); + } + if (this.hasReplaceOnFirstRecurrence || this.replaceOnFirstRecurrence) { + output.writeBool(4, this.replaceOnFirstRecurrence); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.newDocid != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.newDocid); + } + if (this.oldDocid != null && this.oldDocid.length > 0) { + for (int i = 0; i < this.oldDocid.length; i++) { + Docid element = this.oldDocid[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, element); + } + } + } + if (this.hasKeepNextRecurrenceTime || this.keepNextRecurrenceTime) { + size += CodedOutputByteBufferNano.computeTagSize(3) + 1; + } + if (this.hasReplaceOnFirstRecurrence || this.replaceOnFirstRecurrence) { + return size + CodedOutputByteBufferNano.computeTagSize(4) + 1; + } + return size; + } + } + + public SubscriptionTerms() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.recurringPeriod != null) { + output.writeMessage(1, this.recurringPeriod); + } + if (this.trialPeriod != null) { + output.writeMessage(2, this.trialPeriod); + } + if (this.hasFormattedPriceWithRecurrencePeriod || !this.formattedPriceWithRecurrencePeriod.equals("")) { + output.writeString(3, this.formattedPriceWithRecurrencePeriod); + } + if (this.seasonalSubscriptionInfo != null) { + output.writeMessage(4, this.seasonalSubscriptionInfo); + } + if (this.replaceDocid != null && this.replaceDocid.length > 0) { + for (int i = 0; i < this.replaceDocid.length; i++) { + Docid element = this.replaceDocid[i]; + if (element != null) { + output.writeMessage(5, element); + } + } + } + if (this.gracePeriod != null) { + output.writeMessage(6, this.gracePeriod); + } + if (this.hasResignup || this.resignup) { + output.writeBool(7, this.resignup); + } + if (this.hasInitialValidUntilTimestampMsec || this.initialValidUntilTimestampMsec != 0) { + output.writeInt64(8, this.initialValidUntilTimestampMsec); + } + if (this.hasNextPaymentCurrencyCode || !this.nextPaymentCurrencyCode.equals("")) { + output.writeString(9, this.nextPaymentCurrencyCode); + } + if (this.hasNextPaymentPriceMicros || this.nextPaymentPriceMicros != 0) { + output.writeInt64(10, this.nextPaymentPriceMicros); + } + if (this.hasEnableAppSpecifiedTrialPeriod || this.enableAppSpecifiedTrialPeriod) { + output.writeBool(11, this.enableAppSpecifiedTrialPeriod); + } + if (this.subscriptionReplacement != null) { + output.writeMessage(12, this.subscriptionReplacement); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.recurringPeriod != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.recurringPeriod); + } + if (this.trialPeriod != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.trialPeriod); + } + if (this.hasFormattedPriceWithRecurrencePeriod || !this.formattedPriceWithRecurrencePeriod.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.formattedPriceWithRecurrencePeriod); + } + if (this.seasonalSubscriptionInfo != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, this.seasonalSubscriptionInfo); + } + if (this.replaceDocid != null && this.replaceDocid.length > 0) { + for (int i = 0; i < this.replaceDocid.length; i++) { + Docid element = this.replaceDocid[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(5, element); + } + } + } + if (this.gracePeriod != null) { + size += CodedOutputByteBufferNano.computeMessageSize(6, this.gracePeriod); + } + if (this.hasResignup || this.resignup) { + size += CodedOutputByteBufferNano.computeTagSize(7) + 1; + } + if (this.hasInitialValidUntilTimestampMsec || this.initialValidUntilTimestampMsec != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(8, this.initialValidUntilTimestampMsec); + } + if (this.hasNextPaymentCurrencyCode || !this.nextPaymentCurrencyCode.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(9, this.nextPaymentCurrencyCode); + } + if (this.hasNextPaymentPriceMicros || this.nextPaymentPriceMicros != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(10, this.nextPaymentPriceMicros); + } + if (this.hasEnableAppSpecifiedTrialPeriod || this.enableAppSpecifiedTrialPeriod) { + size += CodedOutputByteBufferNano.computeTagSize(11) + 1; + } + if (this.subscriptionReplacement != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(12, this.subscriptionReplacement); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class SubscriptionContentTerms extends MessageNano { + public Docid requiredSubscription = null; + + public SubscriptionContentTerms() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.requiredSubscription != null) { + output.writeMessage(1, this.requiredSubscription); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.requiredSubscription != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(1, this.requiredSubscription); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.requiredSubscription == null) { + this.requiredSubscription = new Docid(); + } + x0.readMessage(this.requiredSubscription); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class VoucherOfferTerms extends MessageNano { + public Docid[] voucherDocid = Docid.emptyArray(); + public long voucherPriceMicros = 0; + public boolean hasVoucherPriceMicros = false; + public String voucherFormattedAmount = ""; + public boolean hasVoucherFormattedAmount = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10); + if (this.voucherDocid == null) { + length = 0; + } else { + length = this.voucherDocid.length; + } + Docid[] docidArr = new Docid[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.voucherDocid, 0, docidArr, 0, length); + } + while (length < docidArr.length - 1) { + docidArr[length] = new Docid(); + x0.readMessage(docidArr[length]); + x0.readTag(); + length++; + } + docidArr[length] = new Docid(); + x0.readMessage(docidArr[length]); + this.voucherDocid = docidArr; + break; + case 16: + this.voucherPriceMicros = x0.readRawVarint64(); + this.hasVoucherPriceMicros = true; + break; + case 26: + this.voucherFormattedAmount = x0.readString(); + this.hasVoucherFormattedAmount = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public VoucherOfferTerms() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.voucherDocid != null && this.voucherDocid.length > 0) { + for (int i = 0; i < this.voucherDocid.length; i++) { + Docid element = this.voucherDocid[i]; + if (element != null) { + output.writeMessage(1, element); + } + } + } + if (this.hasVoucherPriceMicros || this.voucherPriceMicros != 0) { + output.writeInt64(2, this.voucherPriceMicros); + } + if (this.hasVoucherFormattedAmount || !this.voucherFormattedAmount.equals("")) { + output.writeString(3, this.voucherFormattedAmount); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.voucherDocid != null && this.voucherDocid.length > 0) { + for (int i = 0; i < this.voucherDocid.length; i++) { + Docid element = this.voucherDocid[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, element); + } + } + } + if (this.hasVoucherPriceMicros || this.voucherPriceMicros != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(2, this.voucherPriceMicros); + } + if (this.hasVoucherFormattedAmount || !this.voucherFormattedAmount.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(3, this.voucherFormattedAmount); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class FamilyShareability extends MessageNano { + public int state = 0; + public boolean hasState = false; + + public FamilyShareability() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.state != 0 || this.hasState) { + output.writeInt32(1, this.state); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.state != 0 || this.hasState) { + return size + CodedOutputByteBufferNano.computeInt32Size(1, this.state); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + this.state = readRawVarint32; + this.hasState = true; + continue; + } + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class GroupLicenseKey extends MessageNano { + public long dasherCustomerId = 0; + public boolean hasDasherCustomerId = false; + public Docid docid = null; + public int licensedOfferType = 1; + public boolean hasLicensedOfferType = false; + public int type = 0; + public boolean hasType = false; + public int rentalPeriodDays = 0; + public boolean hasRentalPeriodDays = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 9: + this.dasherCustomerId = x0.readRawLittleEndian64(); + this.hasDasherCustomerId = true; + break; + case 18: + if (this.docid == null) { + this.docid = new Docid(); + } + x0.readMessage(this.docid); + break; + case 24: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 1: + case 2: + case 3: + case 4: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + this.licensedOfferType = readRawVarint32; + this.hasLicensedOfferType = true; + continue; + } + case 32: + int readRawVarint322 = x0.readRawVarint32(); + switch (readRawVarint322) { + case 0: + case 1: + case 2: + case 3: + this.type = readRawVarint322; + this.hasType = true; + continue; + } + case 40: + this.rentalPeriodDays = x0.readRawVarint32(); + this.hasRentalPeriodDays = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public GroupLicenseKey() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasDasherCustomerId || this.dasherCustomerId != 0) { + output.writeFixed64(1, this.dasherCustomerId); + } + if (this.docid != null) { + output.writeMessage(2, this.docid); + } + if (this.licensedOfferType != 1 || this.hasLicensedOfferType) { + output.writeInt32(3, this.licensedOfferType); + } + if (this.type != 0 || this.hasType) { + output.writeInt32(4, this.type); + } + if (this.hasRentalPeriodDays || this.rentalPeriodDays != 0) { + output.writeInt32(5, this.rentalPeriodDays); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasDasherCustomerId || this.dasherCustomerId != 0) { + size += CodedOutputByteBufferNano.computeTagSize(1) + 8; + } + if (this.docid != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.docid); + } + if (this.licensedOfferType != 1 || this.hasLicensedOfferType) { + size += CodedOutputByteBufferNano.computeInt32Size(3, this.licensedOfferType); + } + if (this.type != 0 || this.hasType) { + size += CodedOutputByteBufferNano.computeInt32Size(4, this.type); + } + if (this.hasRentalPeriodDays || this.rentalPeriodDays != 0) { + return size + CodedOutputByteBufferNano.computeInt32Size(5, this.rentalPeriodDays); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class LicensedDocumentInfo extends MessageNano { + public long[] gaiaGroupId = WireFormatNano.EMPTY_LONG_ARRAY; + public String groupLicenseCheckoutOrderId = ""; + public boolean hasGroupLicenseCheckoutOrderId = false; + public GroupLicenseKey groupLicenseKey = null; + public long assignedByGaiaId = 0; + public boolean hasAssignedByGaiaId = false; + public String dEPRECATEDAssignmentId = ""; + public boolean hasDEPRECATEDAssignmentId = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 9: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 9); + if (this.gaiaGroupId == null) { + length = 0; + } else { + length = this.gaiaGroupId.length; + } + long[] jArr = new long[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.gaiaGroupId, 0, jArr, 0, length); + } + while (length < jArr.length - 1) { + jArr[length] = x0.readRawLittleEndian64(); + x0.readTag(); + length++; + } + jArr[length] = x0.readRawLittleEndian64(); + this.gaiaGroupId = jArr; + break; + case 10: + int readRawVarint32 = x0.readRawVarint32(); + int pushLimit = x0.pushLimit(readRawVarint32); + int i = readRawVarint32 / 8; + int length2 = this.gaiaGroupId == null ? 0 : this.gaiaGroupId.length; + long[] jArr2 = new long[i + length2]; + if (length2 != 0) { + System.arraycopy(this.gaiaGroupId, 0, jArr2, 0, length2); + } + while (length2 < jArr2.length) { + jArr2[length2] = x0.readRawLittleEndian64(); + length2++; + } + this.gaiaGroupId = jArr2; + x0.popLimit(pushLimit); + break; + case 18: + this.groupLicenseCheckoutOrderId = x0.readString(); + this.hasGroupLicenseCheckoutOrderId = true; + break; + case 26: + if (this.groupLicenseKey == null) { + this.groupLicenseKey = new GroupLicenseKey(); + } + x0.readMessage(this.groupLicenseKey); + break; + case 33: + this.assignedByGaiaId = x0.readRawLittleEndian64(); + this.hasAssignedByGaiaId = true; + break; + case 42: + this.dEPRECATEDAssignmentId = x0.readString(); + this.hasDEPRECATEDAssignmentId = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public LicensedDocumentInfo() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.gaiaGroupId != null && this.gaiaGroupId.length > 0) { + for (int i = 0; i < this.gaiaGroupId.length; i++) { + output.writeFixed64(1, this.gaiaGroupId[i]); + } + } + if (this.hasGroupLicenseCheckoutOrderId || !this.groupLicenseCheckoutOrderId.equals("")) { + output.writeString(2, this.groupLicenseCheckoutOrderId); + } + if (this.groupLicenseKey != null) { + output.writeMessage(3, this.groupLicenseKey); + } + if (this.hasAssignedByGaiaId || this.assignedByGaiaId != 0) { + output.writeFixed64(4, this.assignedByGaiaId); + } + if (this.hasDEPRECATEDAssignmentId || !this.dEPRECATEDAssignmentId.equals("")) { + output.writeString(5, this.dEPRECATEDAssignmentId); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.gaiaGroupId != null && this.gaiaGroupId.length > 0) { + size = size + (this.gaiaGroupId.length * 8) + (this.gaiaGroupId.length * 1); + } + if (this.hasGroupLicenseCheckoutOrderId || !this.groupLicenseCheckoutOrderId.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.groupLicenseCheckoutOrderId); + } + if (this.groupLicenseKey != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.groupLicenseKey); + } + if (this.hasAssignedByGaiaId || this.assignedByGaiaId != 0) { + size += CodedOutputByteBufferNano.computeTagSize(4) + 8; + } + if (this.hasDEPRECATEDAssignmentId || !this.dEPRECATEDAssignmentId.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(5, this.dEPRECATEDAssignmentId); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class LicenseTerms extends MessageNano { + public GroupLicenseKey groupLicenseKey = null; + + public LicenseTerms() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.groupLicenseKey != null) { + output.writeMessage(1, this.groupLicenseKey); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.groupLicenseKey != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(1, this.groupLicenseKey); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.groupLicenseKey == null) { + this.groupLicenseKey = new GroupLicenseKey(); + } + x0.readMessage(this.groupLicenseKey); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class RedemptionRecordKey extends MessageNano { + public int type = 1; + public boolean hasType = false; + public long publisherId = 0; + public boolean hasPublisherId = false; + public long campaignId = 0; + public boolean hasCampaignId = false; + public long codeGroupId = 0; + public boolean hasCodeGroupId = false; + public long recordId = 0; + public boolean hasRecordId = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.publisherId = x0.readRawVarint64(); + this.hasPublisherId = true; + break; + case 16: + this.campaignId = x0.readRawVarint64(); + this.hasCampaignId = true; + break; + case 24: + this.codeGroupId = x0.readRawVarint64(); + this.hasCodeGroupId = true; + break; + case 32: + this.recordId = x0.readRawVarint64(); + this.hasRecordId = true; + break; + case 40: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + case 4: + this.type = readRawVarint32; + this.hasType = true; + continue; + } + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public RedemptionRecordKey() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasPublisherId || this.publisherId != 0) { + output.writeInt64(1, this.publisherId); + } + if (this.hasCampaignId || this.campaignId != 0) { + output.writeInt64(2, this.campaignId); + } + if (this.hasCodeGroupId || this.codeGroupId != 0) { + output.writeInt64(3, this.codeGroupId); + } + if (this.hasRecordId || this.recordId != 0) { + output.writeInt64(4, this.recordId); + } + if (this.type != 1 || this.hasType) { + output.writeInt32(5, this.type); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasPublisherId || this.publisherId != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(1, this.publisherId); + } + if (this.hasCampaignId || this.campaignId != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(2, this.campaignId); + } + if (this.hasCodeGroupId || this.codeGroupId != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(3, this.codeGroupId); + } + if (this.hasRecordId || this.recordId != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(4, this.recordId); + } + if (this.type != 1 || this.hasType) { + return size + CodedOutputByteBufferNano.computeInt32Size(5, this.type); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class VoucherId extends MessageNano { + public Docid voucherDocid = null; + public RedemptionRecordKey key = null; + + public VoucherId() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.voucherDocid != null) { + output.writeMessage(1, this.voucherDocid); + } + if (this.key != null) { + output.writeMessage(2, this.key); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.voucherDocid != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.voucherDocid); + } + if (this.key != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(2, this.key); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.voucherDocid == null) { + this.voucherDocid = new Docid(); + } + x0.readMessage(this.voucherDocid); + break; + case 18: + if (this.key == null) { + this.key = new RedemptionRecordKey(); + } + x0.readMessage(this.key); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class Install extends MessageNano { + private static volatile Install[] _emptyArray; + public long androidId = 0; + public boolean hasAndroidId = false; + public int version = 0; + public boolean hasVersion = false; + public boolean bundled = false; + public boolean hasBundled = false; + public boolean pending = false; + public boolean hasPending = false; + public long lastUpdateTimestampMillis = 0; + public boolean hasLastUpdateTimestampMillis = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 9: + this.androidId = x0.readRawLittleEndian64(); + this.hasAndroidId = true; + break; + case 16: + this.version = x0.readRawVarint32(); + this.hasVersion = true; + break; + case 24: + this.bundled = x0.readBool(); + this.hasBundled = true; + break; + case 32: + this.pending = x0.readBool(); + this.hasPending = true; + break; + case 40: + this.lastUpdateTimestampMillis = x0.readRawVarint64(); + this.hasLastUpdateTimestampMillis = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static Install[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new Install[0]; + } + } + } + return _emptyArray; + } + + public Install() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasAndroidId || this.androidId != 0) { + output.writeFixed64(1, this.androidId); + } + if (this.hasVersion || this.version != 0) { + output.writeInt32(2, this.version); + } + if (this.hasBundled || this.bundled) { + output.writeBool(3, this.bundled); + } + if (this.hasPending || this.pending) { + output.writeBool(4, this.pending); + } + if (this.hasLastUpdateTimestampMillis || this.lastUpdateTimestampMillis != 0) { + output.writeInt64(5, this.lastUpdateTimestampMillis); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasAndroidId || this.androidId != 0) { + size += CodedOutputByteBufferNano.computeTagSize(1) + 8; + } + if (this.hasVersion || this.version != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(2, this.version); + } + if (this.hasBundled || this.bundled) { + size += CodedOutputByteBufferNano.computeTagSize(3) + 1; + } + if (this.hasPending || this.pending) { + size += CodedOutputByteBufferNano.computeTagSize(4) + 1; + } + if (this.hasLastUpdateTimestampMillis || this.lastUpdateTimestampMillis != 0) { + return size + CodedOutputByteBufferNano.computeInt64Size(5, this.lastUpdateTimestampMillis); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class SignedData extends MessageNano { + public String signedData = ""; + public boolean hasSignedData = false; + public String signature = ""; + public boolean hasSignature = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.signedData = x0.readString(); + this.hasSignedData = true; + break; + case 18: + this.signature = x0.readString(); + this.hasSignature = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public SignedData() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasSignedData || !this.signedData.equals("")) { + output.writeString(1, this.signedData); + } + if (this.hasSignature || !this.signature.equals("")) { + output.writeString(2, this.signature); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasSignedData || !this.signedData.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.signedData); + } + if (this.hasSignature || !this.signature.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(2, this.signature); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class Attribution extends MessageNano { + public String sourceTitle = ""; + public boolean hasSourceTitle = false; + public String sourceUrl = ""; + public boolean hasSourceUrl = false; + public String licenseTitle = ""; + public boolean hasLicenseTitle = false; + public String licenseUrl = ""; + public boolean hasLicenseUrl = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.sourceTitle = x0.readString(); + this.hasSourceTitle = true; + break; + case 18: + this.sourceUrl = x0.readString(); + this.hasSourceUrl = true; + break; + case 26: + this.licenseTitle = x0.readString(); + this.hasLicenseTitle = true; + break; + case 34: + this.licenseUrl = x0.readString(); + this.hasLicenseUrl = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public Attribution() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasSourceTitle || !this.sourceTitle.equals("")) { + output.writeString(1, this.sourceTitle); + } + if (this.hasSourceUrl || !this.sourceUrl.equals("")) { + output.writeString(2, this.sourceUrl); + } + if (this.hasLicenseTitle || !this.licenseTitle.equals("")) { + output.writeString(3, this.licenseTitle); + } + if (this.hasLicenseUrl || !this.licenseUrl.equals("")) { + output.writeString(4, this.licenseUrl); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasSourceTitle || !this.sourceTitle.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.sourceTitle); + } + if (this.hasSourceUrl || !this.sourceUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.sourceUrl); + } + if (this.hasLicenseTitle || !this.licenseTitle.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.licenseTitle); + } + if (this.hasLicenseUrl || !this.licenseUrl.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(4, this.licenseUrl); + } + return size; + } + } +} diff --git a/docs/com/google/android/finsky/protos/Containers.java b/docs/com/google/android/finsky/protos/Containers.java new file mode 100644 index 0000000..2033387 --- /dev/null +++ b/docs/com/google/android/finsky/protos/Containers.java @@ -0,0 +1,271 @@ +package com.google.android.finsky.protos; + +import com.google.android.finsky.protos.Common; +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +import java.util.Arrays; +/* loaded from: classes.dex */ +public interface Containers { + + /* loaded from: classes.dex */ + public static final class ContainerMetadata extends MessageNano { + public String browseUrl = ""; + public boolean hasBrowseUrl = false; + public String nextPageUrl = ""; + public boolean hasNextPageUrl = false; + public double relevance = 0.0d; + public boolean hasRelevance = false; + public long estimatedResults = 0; + public boolean hasEstimatedResults = false; + public String analyticsCookie = ""; + public boolean hasAnalyticsCookie = false; + public boolean ordered = false; + public boolean hasOrdered = false; + public ContainerView[] containerView = ContainerView.emptyArray(); + public Common.Image leftIcon = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.browseUrl = x0.readString(); + this.hasBrowseUrl = true; + break; + case 18: + this.nextPageUrl = x0.readString(); + this.hasNextPageUrl = true; + break; + case 25: + this.relevance = Double.longBitsToDouble(x0.readRawLittleEndian64()); + this.hasRelevance = true; + break; + case 32: + this.estimatedResults = x0.readRawVarint64(); + this.hasEstimatedResults = true; + break; + case 42: + this.analyticsCookie = x0.readString(); + this.hasAnalyticsCookie = true; + break; + case 48: + this.ordered = x0.readBool(); + this.hasOrdered = true; + break; + case 58: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 58); + if (this.containerView == null) { + length = 0; + } else { + length = this.containerView.length; + } + ContainerView[] containerViewArr = new ContainerView[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.containerView, 0, containerViewArr, 0, length); + } + while (length < containerViewArr.length - 1) { + containerViewArr[length] = new ContainerView(); + x0.readMessage(containerViewArr[length]); + x0.readTag(); + length++; + } + containerViewArr[length] = new ContainerView(); + x0.readMessage(containerViewArr[length]); + this.containerView = containerViewArr; + break; + case 66: + if (this.leftIcon == null) { + this.leftIcon = new Common.Image(); + } + x0.readMessage(this.leftIcon); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public ContainerMetadata() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasBrowseUrl || !this.browseUrl.equals("")) { + output.writeString(1, this.browseUrl); + } + if (this.hasNextPageUrl || !this.nextPageUrl.equals("")) { + output.writeString(2, this.nextPageUrl); + } + if (this.hasRelevance || Double.doubleToLongBits(this.relevance) != Double.doubleToLongBits(0.0d)) { + output.writeDouble(3, this.relevance); + } + if (this.hasEstimatedResults || this.estimatedResults != 0) { + output.writeInt64(4, this.estimatedResults); + } + if (this.hasAnalyticsCookie || !this.analyticsCookie.equals("")) { + output.writeString(5, this.analyticsCookie); + } + if (this.hasOrdered || this.ordered) { + output.writeBool(6, this.ordered); + } + if (this.containerView != null && this.containerView.length > 0) { + for (int i = 0; i < this.containerView.length; i++) { + ContainerView element = this.containerView[i]; + if (element != null) { + output.writeMessage(7, element); + } + } + } + if (this.leftIcon != null) { + output.writeMessage(8, this.leftIcon); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasBrowseUrl || !this.browseUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.browseUrl); + } + if (this.hasNextPageUrl || !this.nextPageUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.nextPageUrl); + } + if (this.hasRelevance || Double.doubleToLongBits(this.relevance) != Double.doubleToLongBits(0.0d)) { + size += CodedOutputByteBufferNano.computeTagSize(3) + 8; + } + if (this.hasEstimatedResults || this.estimatedResults != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(4, this.estimatedResults); + } + if (this.hasAnalyticsCookie || !this.analyticsCookie.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(5, this.analyticsCookie); + } + if (this.hasOrdered || this.ordered) { + size += CodedOutputByteBufferNano.computeTagSize(6) + 1; + } + if (this.containerView != null && this.containerView.length > 0) { + for (int i = 0; i < this.containerView.length; i++) { + ContainerView element = this.containerView[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(7, element); + } + } + } + if (this.leftIcon != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(8, this.leftIcon); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class ContainerView extends MessageNano { + private static volatile ContainerView[] _emptyArray; + public boolean selected = false; + public boolean hasSelected = false; + public String title = ""; + public boolean hasTitle = false; + public String listUrl = ""; + public boolean hasListUrl = false; + public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES; + public boolean hasServerLogsCookie = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.selected = x0.readBool(); + this.hasSelected = true; + break; + case 18: + this.title = x0.readString(); + this.hasTitle = true; + break; + case 26: + this.listUrl = x0.readString(); + this.hasListUrl = true; + break; + case 34: + this.serverLogsCookie = x0.readBytes(); + this.hasServerLogsCookie = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static ContainerView[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new ContainerView[0]; + } + } + } + return _emptyArray; + } + + public ContainerView() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasSelected || this.selected) { + output.writeBool(1, this.selected); + } + if (this.hasTitle || !this.title.equals("")) { + output.writeString(2, this.title); + } + if (this.hasListUrl || !this.listUrl.equals("")) { + output.writeString(3, this.listUrl); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + output.writeBytes(4, this.serverLogsCookie); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasSelected || this.selected) { + size += CodedOutputByteBufferNano.computeTagSize(1) + 1; + } + if (this.hasTitle || !this.title.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.title); + } + if (this.hasListUrl || !this.listUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.listUrl); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + return size + CodedOutputByteBufferNano.computeBytesSize(4, this.serverLogsCookie); + } + return size; + } + } +} diff --git a/docs/com/google/android/finsky/protos/DeliveryResponse.java b/docs/com/google/android/finsky/protos/DeliveryResponse.java new file mode 100644 index 0000000..483bbc1 --- /dev/null +++ b/docs/com/google/android/finsky/protos/DeliveryResponse.java @@ -0,0 +1,78 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class DeliveryResponse extends MessageNano { + public int status = 1; + public boolean hasStatus = false; + public AndroidAppDeliveryData appDeliveryData = null; + + public DeliveryResponse() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.status != 1 || this.hasStatus) { + output.writeInt32(1, this.status); + } + if (this.appDeliveryData != null) { + output.writeMessage(2, this.appDeliveryData); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.status != 1 || this.hasStatus) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.status); + } + if (this.appDeliveryData != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(2, this.appDeliveryData); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + this.status = readRawVarint32; + this.hasStatus = true; + continue; + } + case 18: + if (this.appDeliveryData == null) { + this.appDeliveryData = new AndroidAppDeliveryData(); + } + x0.readMessage(this.appDeliveryData); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } +} diff --git a/docs/com/google/android/finsky/protos/Details.java b/docs/com/google/android/finsky/protos/Details.java new file mode 100644 index 0000000..1164740 --- /dev/null +++ b/docs/com/google/android/finsky/protos/Details.java @@ -0,0 +1,851 @@ +package com.google.android.finsky.protos; + +import com.google.android.finsky.protos.Common; +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +import java.util.Arrays; +/* loaded from: classes.dex */ +public interface Details { + + /* loaded from: classes.dex */ + public static final class DetailsResponse extends MessageNano { + public DocV1 docV1 = null; + public DocV2 docV2 = null; + public Review userReview = null; + public String footerHtml = ""; + public boolean hasFooterHtml = false; + public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES; + public boolean hasServerLogsCookie = false; + public DiscoveryBadge[] discoveryBadge = DiscoveryBadge.emptyArray(); + public boolean enableReviews = true; + public boolean hasEnableReviews = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.docV1 == null) { + this.docV1 = new DocV1(); + } + x0.readMessage(this.docV1); + break; + case 26: + if (this.userReview == null) { + this.userReview = new Review(); + } + x0.readMessage(this.userReview); + break; + case 34: + if (this.docV2 == null) { + this.docV2 = new DocV2(); + } + x0.readMessage(this.docV2); + break; + case 42: + this.footerHtml = x0.readString(); + this.hasFooterHtml = true; + break; + case 50: + this.serverLogsCookie = x0.readBytes(); + this.hasServerLogsCookie = true; + break; + case 58: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 58); + if (this.discoveryBadge == null) { + length = 0; + } else { + length = this.discoveryBadge.length; + } + DiscoveryBadge[] discoveryBadgeArr = new DiscoveryBadge[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.discoveryBadge, 0, discoveryBadgeArr, 0, length); + } + while (length < discoveryBadgeArr.length - 1) { + discoveryBadgeArr[length] = new DiscoveryBadge(); + x0.readMessage(discoveryBadgeArr[length]); + x0.readTag(); + length++; + } + discoveryBadgeArr[length] = new DiscoveryBadge(); + x0.readMessage(discoveryBadgeArr[length]); + this.discoveryBadge = discoveryBadgeArr; + break; + case 64: + this.enableReviews = x0.readBool(); + this.hasEnableReviews = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public DetailsResponse() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.docV1 != null) { + output.writeMessage(1, this.docV1); + } + if (this.userReview != null) { + output.writeMessage(3, this.userReview); + } + if (this.docV2 != null) { + output.writeMessage(4, this.docV2); + } + if (this.hasFooterHtml || !this.footerHtml.equals("")) { + output.writeString(5, this.footerHtml); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + output.writeBytes(6, this.serverLogsCookie); + } + if (this.discoveryBadge != null && this.discoveryBadge.length > 0) { + for (int i = 0; i < this.discoveryBadge.length; i++) { + DiscoveryBadge element = this.discoveryBadge[i]; + if (element != null) { + output.writeMessage(7, element); + } + } + } + if (this.hasEnableReviews || !this.enableReviews) { + output.writeBool(8, this.enableReviews); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.docV1 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.docV1); + } + if (this.userReview != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.userReview); + } + if (this.docV2 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, this.docV2); + } + if (this.hasFooterHtml || !this.footerHtml.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(5, this.footerHtml); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + size += CodedOutputByteBufferNano.computeBytesSize(6, this.serverLogsCookie); + } + if (this.discoveryBadge != null && this.discoveryBadge.length > 0) { + for (int i = 0; i < this.discoveryBadge.length; i++) { + DiscoveryBadge element = this.discoveryBadge[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(7, element); + } + } + } + if (this.hasEnableReviews || !this.enableReviews) { + return size + CodedOutputByteBufferNano.computeTagSize(8) + 1; + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class BulkDetailsRequest extends MessageNano { + public String[] docid = WireFormatNano.EMPTY_STRING_ARRAY; + public int[] installedVersionCode = WireFormatNano.EMPTY_INT_ARRAY; + public boolean includeChildDocs = true; + public boolean hasIncludeChildDocs = false; + public boolean includeDetails = false; + public boolean hasIncludeDetails = false; + public String sourcePackageName = ""; + public boolean hasSourcePackageName = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10); + int length2 = this.docid == null ? 0 : this.docid.length; + String[] strArr = new String[repeatedFieldArrayLength + length2]; + if (length2 != 0) { + System.arraycopy(this.docid, 0, strArr, 0, length2); + } + while (length2 < strArr.length - 1) { + strArr[length2] = x0.readString(); + x0.readTag(); + length2++; + } + strArr[length2] = x0.readString(); + this.docid = strArr; + break; + case 16: + this.includeChildDocs = x0.readBool(); + this.hasIncludeChildDocs = true; + break; + case 24: + this.includeDetails = x0.readBool(); + this.hasIncludeDetails = true; + break; + case 34: + this.sourcePackageName = x0.readString(); + this.hasSourcePackageName = true; + break; + case 56: + int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 56); + if (this.installedVersionCode == null) { + length = 0; + } else { + length = this.installedVersionCode.length; + } + int[] iArr = new int[repeatedFieldArrayLength2 + length]; + if (length != 0) { + System.arraycopy(this.installedVersionCode, 0, iArr, 0, length); + } + while (length < iArr.length - 1) { + iArr[length] = x0.readRawVarint32(); + x0.readTag(); + length++; + } + iArr[length] = x0.readRawVarint32(); + this.installedVersionCode = iArr; + break; + case 58: + int pushLimit = x0.pushLimit(x0.readRawVarint32()); + int position = x0.getPosition(); + int i = 0; + while (x0.getBytesUntilLimit() > 0) { + x0.readRawVarint32(); + i++; + } + x0.rewindToPosition(position); + int length3 = this.installedVersionCode == null ? 0 : this.installedVersionCode.length; + int[] iArr2 = new int[i + length3]; + if (length3 != 0) { + System.arraycopy(this.installedVersionCode, 0, iArr2, 0, length3); + } + while (length3 < iArr2.length) { + iArr2[length3] = x0.readRawVarint32(); + length3++; + } + this.installedVersionCode = iArr2; + x0.popLimit(pushLimit); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public BulkDetailsRequest() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.docid != null && this.docid.length > 0) { + for (int i = 0; i < this.docid.length; i++) { + String element = this.docid[i]; + if (element != null) { + output.writeString(1, element); + } + } + } + if (this.hasIncludeChildDocs || !this.includeChildDocs) { + output.writeBool(2, this.includeChildDocs); + } + if (this.hasIncludeDetails || this.includeDetails) { + output.writeBool(3, this.includeDetails); + } + if (this.hasSourcePackageName || !this.sourcePackageName.equals("")) { + output.writeString(4, this.sourcePackageName); + } + if (this.installedVersionCode != null && this.installedVersionCode.length > 0) { + for (int i2 = 0; i2 < this.installedVersionCode.length; i2++) { + output.writeInt32(7, this.installedVersionCode[i2]); + } + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.docid != null && this.docid.length > 0) { + int dataCount = 0; + int dataSize = 0; + for (int i = 0; i < this.docid.length; i++) { + String element = this.docid[i]; + if (element != null) { + dataCount++; + dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element); + } + } + size = size + dataSize + (dataCount * 1); + } + if (this.hasIncludeChildDocs || !this.includeChildDocs) { + size += CodedOutputByteBufferNano.computeTagSize(2) + 1; + } + if (this.hasIncludeDetails || this.includeDetails) { + size += CodedOutputByteBufferNano.computeTagSize(3) + 1; + } + if (this.hasSourcePackageName || !this.sourcePackageName.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(4, this.sourcePackageName); + } + if (this.installedVersionCode == null || this.installedVersionCode.length <= 0) { + return size; + } + int dataSize2 = 0; + for (int i2 = 0; i2 < this.installedVersionCode.length; i2++) { + dataSize2 += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.installedVersionCode[i2]); + } + return size + dataSize2 + (this.installedVersionCode.length * 1); + } + } + + /* loaded from: classes.dex */ + public static final class BulkDetailsResponse extends MessageNano { + public BulkDetailsEntry[] entry = BulkDetailsEntry.emptyArray(); + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10); + if (this.entry == null) { + length = 0; + } else { + length = this.entry.length; + } + BulkDetailsEntry[] bulkDetailsEntryArr = new BulkDetailsEntry[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.entry, 0, bulkDetailsEntryArr, 0, length); + } + while (length < bulkDetailsEntryArr.length - 1) { + bulkDetailsEntryArr[length] = new BulkDetailsEntry(); + x0.readMessage(bulkDetailsEntryArr[length]); + x0.readTag(); + length++; + } + bulkDetailsEntryArr[length] = new BulkDetailsEntry(); + x0.readMessage(bulkDetailsEntryArr[length]); + this.entry = bulkDetailsEntryArr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public BulkDetailsResponse() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.entry != null && this.entry.length > 0) { + for (int i = 0; i < this.entry.length; i++) { + BulkDetailsEntry element = this.entry[i]; + if (element != null) { + output.writeMessage(1, element); + } + } + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.entry != null && this.entry.length > 0) { + for (int i = 0; i < this.entry.length; i++) { + BulkDetailsEntry element = this.entry[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, element); + } + } + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class BulkDetailsEntry extends MessageNano { + private static volatile BulkDetailsEntry[] _emptyArray; + public DocV2 doc = null; + + public static BulkDetailsEntry[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new BulkDetailsEntry[0]; + } + } + } + return _emptyArray; + } + + public BulkDetailsEntry() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.doc != null) { + output.writeMessage(1, this.doc); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.doc != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(1, this.doc); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.doc == null) { + this.doc = new DocV2(); + } + x0.readMessage(this.doc); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class DiscoveryBadge extends MessageNano { + private static volatile DiscoveryBadge[] _emptyArray; + public String title = ""; + public boolean hasTitle = false; + public String contentDescription = ""; + public boolean hasContentDescription = false; + public Common.Image image = null; + public int backgroundColor = 0; + public boolean hasBackgroundColor = false; + public DiscoveryBadgeLink discoveryBadgeLink = null; + public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES; + public boolean hasServerLogsCookie = false; + public boolean isPlusOne = false; + public boolean hasIsPlusOne = false; + public float aggregateRating = 0.0f; + public boolean hasAggregateRating = false; + public int userStarRating = 0; + public boolean hasUserStarRating = false; + public String downloadCount = ""; + public boolean hasDownloadCount = false; + public String downloadUnits = ""; + public boolean hasDownloadUnits = false; + public PlayerBadge playerBadge = null; + public FamilyAgeRangeBadge familyAgeRangeBadge = null; + public FamilyCategoryBadge familyCategoryBadge = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.title = x0.readString(); + this.hasTitle = true; + break; + case 18: + if (this.image == null) { + this.image = new Common.Image(); + } + x0.readMessage(this.image); + break; + case 24: + this.backgroundColor = x0.readRawVarint32(); + this.hasBackgroundColor = true; + break; + case 34: + if (this.discoveryBadgeLink == null) { + this.discoveryBadgeLink = new DiscoveryBadgeLink(); + } + x0.readMessage(this.discoveryBadgeLink); + break; + case 42: + this.serverLogsCookie = x0.readBytes(); + this.hasServerLogsCookie = true; + break; + case 48: + this.isPlusOne = x0.readBool(); + this.hasIsPlusOne = true; + break; + case 61: + this.aggregateRating = Float.intBitsToFloat(x0.readRawLittleEndian32()); + this.hasAggregateRating = true; + break; + case 64: + this.userStarRating = x0.readRawVarint32(); + this.hasUserStarRating = true; + break; + case 74: + this.downloadCount = x0.readString(); + this.hasDownloadCount = true; + break; + case 82: + this.downloadUnits = x0.readString(); + this.hasDownloadUnits = true; + break; + case 90: + this.contentDescription = x0.readString(); + this.hasContentDescription = true; + break; + case 98: + if (this.playerBadge == null) { + this.playerBadge = new PlayerBadge(); + } + x0.readMessage(this.playerBadge); + break; + case 106: + if (this.familyAgeRangeBadge == null) { + this.familyAgeRangeBadge = new FamilyAgeRangeBadge(); + } + x0.readMessage(this.familyAgeRangeBadge); + break; + case 114: + if (this.familyCategoryBadge == null) { + this.familyCategoryBadge = new FamilyCategoryBadge(); + } + x0.readMessage(this.familyCategoryBadge); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static DiscoveryBadge[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new DiscoveryBadge[0]; + } + } + } + return _emptyArray; + } + + public DiscoveryBadge() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasTitle || !this.title.equals("")) { + output.writeString(1, this.title); + } + if (this.image != null) { + output.writeMessage(2, this.image); + } + if (this.hasBackgroundColor || this.backgroundColor != 0) { + output.writeInt32(3, this.backgroundColor); + } + if (this.discoveryBadgeLink != null) { + output.writeMessage(4, this.discoveryBadgeLink); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + output.writeBytes(5, this.serverLogsCookie); + } + if (this.hasIsPlusOne || this.isPlusOne) { + output.writeBool(6, this.isPlusOne); + } + if (this.hasAggregateRating || Float.floatToIntBits(this.aggregateRating) != Float.floatToIntBits(0.0f)) { + output.writeFloat(7, this.aggregateRating); + } + if (this.hasUserStarRating || this.userStarRating != 0) { + output.writeInt32(8, this.userStarRating); + } + if (this.hasDownloadCount || !this.downloadCount.equals("")) { + output.writeString(9, this.downloadCount); + } + if (this.hasDownloadUnits || !this.downloadUnits.equals("")) { + output.writeString(10, this.downloadUnits); + } + if (this.hasContentDescription || !this.contentDescription.equals("")) { + output.writeString(11, this.contentDescription); + } + if (this.playerBadge != null) { + output.writeMessage(12, this.playerBadge); + } + if (this.familyAgeRangeBadge != null) { + output.writeMessage(13, this.familyAgeRangeBadge); + } + if (this.familyCategoryBadge != null) { + output.writeMessage(14, this.familyCategoryBadge); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasTitle || !this.title.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.title); + } + if (this.image != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.image); + } + if (this.hasBackgroundColor || this.backgroundColor != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(3, this.backgroundColor); + } + if (this.discoveryBadgeLink != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, this.discoveryBadgeLink); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + size += CodedOutputByteBufferNano.computeBytesSize(5, this.serverLogsCookie); + } + if (this.hasIsPlusOne || this.isPlusOne) { + size += CodedOutputByteBufferNano.computeTagSize(6) + 1; + } + if (this.hasAggregateRating || Float.floatToIntBits(this.aggregateRating) != Float.floatToIntBits(0.0f)) { + size += CodedOutputByteBufferNano.computeTagSize(7) + 4; + } + if (this.hasUserStarRating || this.userStarRating != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(8, this.userStarRating); + } + if (this.hasDownloadCount || !this.downloadCount.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(9, this.downloadCount); + } + if (this.hasDownloadUnits || !this.downloadUnits.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(10, this.downloadUnits); + } + if (this.hasContentDescription || !this.contentDescription.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(11, this.contentDescription); + } + if (this.playerBadge != null) { + size += CodedOutputByteBufferNano.computeMessageSize(12, this.playerBadge); + } + if (this.familyAgeRangeBadge != null) { + size += CodedOutputByteBufferNano.computeMessageSize(13, this.familyAgeRangeBadge); + } + if (this.familyCategoryBadge != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(14, this.familyCategoryBadge); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class PlayerBadge extends MessageNano { + public Common.Image overlayIcon = null; + + public PlayerBadge() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.overlayIcon != null) { + output.writeMessage(1, this.overlayIcon); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.overlayIcon != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(1, this.overlayIcon); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.overlayIcon == null) { + this.overlayIcon = new Common.Image(); + } + x0.readMessage(this.overlayIcon); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class FamilyAgeRangeBadge extends MessageNano { + public FamilyAgeRangeBadge() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int readTag; + do { + readTag = x0.readTag(); + switch (readTag) { + case 0: + return this; + } + } while (WireFormatNano.parseUnknownField(x0, readTag)); + return this; + } + } + + /* loaded from: classes.dex */ + public static final class FamilyCategoryBadge extends MessageNano { + public FamilyCategoryBadge() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int readTag; + do { + readTag = x0.readTag(); + switch (readTag) { + case 0: + return this; + } + } while (WireFormatNano.parseUnknownField(x0, readTag)); + return this; + } + } + + /* loaded from: classes.dex */ + public static final class DiscoveryBadgeLink extends MessageNano { + public Link link = null; + public String userReviewsUrl = ""; + public boolean hasUserReviewsUrl = false; + public String criticReviewsUrl = ""; + public boolean hasCriticReviewsUrl = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.link == null) { + this.link = new Link(); + } + x0.readMessage(this.link); + break; + case 18: + this.userReviewsUrl = x0.readString(); + this.hasUserReviewsUrl = true; + break; + case 26: + this.criticReviewsUrl = x0.readString(); + this.hasCriticReviewsUrl = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public DiscoveryBadgeLink() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.link != null) { + output.writeMessage(1, this.link); + } + if (this.hasUserReviewsUrl || !this.userReviewsUrl.equals("")) { + output.writeString(2, this.userReviewsUrl); + } + if (this.hasCriticReviewsUrl || !this.criticReviewsUrl.equals("")) { + output.writeString(3, this.criticReviewsUrl); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.link != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.link); + } + if (this.hasUserReviewsUrl || !this.userReviewsUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.userReviewsUrl); + } + if (this.hasCriticReviewsUrl || !this.criticReviewsUrl.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(3, this.criticReviewsUrl); + } + return size; + } + } +} diff --git a/docs/com/google/android/finsky/protos/DeviceConfiguration.java b/docs/com/google/android/finsky/protos/DeviceConfiguration.java new file mode 100644 index 0000000..a2b217b --- /dev/null +++ b/docs/com/google/android/finsky/protos/DeviceConfiguration.java @@ -0,0 +1,438 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public interface DeviceConfiguration { + + /* loaded from: classes.dex */ + public static final class DeviceConfigurationProto extends MessageNano { + public int touchScreen = 0; + public boolean hasTouchScreen = false; + public int keyboard = 0; + public boolean hasKeyboard = false; + public int navigation = 0; + public boolean hasNavigation = false; + public int screenLayout = 0; + public boolean hasScreenLayout = false; + public boolean hasHardKeyboard = false; + public boolean hasHasHardKeyboard = false; + public boolean hasFiveWayNavigation = false; + public boolean hasHasFiveWayNavigation = false; + public int screenDensity = 0; + public boolean hasScreenDensity = false; + public int screenWidth = 0; + public boolean hasScreenWidth = false; + public int screenHeight = 0; + public boolean hasScreenHeight = false; + public int glEsVersion = 0; + public boolean hasGlEsVersion = false; + public String[] systemSharedLibrary = WireFormatNano.EMPTY_STRING_ARRAY; + public String[] systemAvailableFeature = WireFormatNano.EMPTY_STRING_ARRAY; + public String[] nativePlatform = WireFormatNano.EMPTY_STRING_ARRAY; + public String[] systemSupportedLocale = WireFormatNano.EMPTY_STRING_ARRAY; + public String[] glExtension = WireFormatNano.EMPTY_STRING_ARRAY; + public int maxApkDownloadSizeMb = 50; + public boolean hasMaxApkDownloadSizeMb = false; + public int smallestScreenWidthDp = 0; + public boolean hasSmallestScreenWidthDp = false; + public boolean lowRamDevice = false; + public boolean hasLowRamDevice = false; + public long totalMemoryBytes = 0; + public boolean hasTotalMemoryBytes = false; + public int maxNumOfCpuCores = 0; + public boolean hasMaxNumOfCpuCores = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + this.touchScreen = readRawVarint32; + this.hasTouchScreen = true; + continue; + } + case 16: + int readRawVarint322 = x0.readRawVarint32(); + switch (readRawVarint322) { + case 0: + case 1: + case 2: + case 3: + this.keyboard = readRawVarint322; + this.hasKeyboard = true; + continue; + } + case 24: + int readRawVarint323 = x0.readRawVarint32(); + switch (readRawVarint323) { + case 0: + case 1: + case 2: + case 3: + case 4: + this.navigation = readRawVarint323; + this.hasNavigation = true; + continue; + } + case 32: + int readRawVarint324 = x0.readRawVarint32(); + switch (readRawVarint324) { + case 0: + case 1: + case 2: + case 3: + case 4: + this.screenLayout = readRawVarint324; + this.hasScreenLayout = true; + continue; + } + case 40: + this.hasHardKeyboard = x0.readBool(); + this.hasHasHardKeyboard = true; + break; + case 48: + this.hasFiveWayNavigation = x0.readBool(); + this.hasHasFiveWayNavigation = true; + break; + case 56: + this.screenDensity = x0.readRawVarint32(); + this.hasScreenDensity = true; + break; + case 64: + this.glEsVersion = x0.readRawVarint32(); + this.hasGlEsVersion = true; + break; + case 74: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 74); + int length = this.systemSharedLibrary == null ? 0 : this.systemSharedLibrary.length; + String[] strArr = new String[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.systemSharedLibrary, 0, strArr, 0, length); + } + while (length < strArr.length - 1) { + strArr[length] = x0.readString(); + x0.readTag(); + length++; + } + strArr[length] = x0.readString(); + this.systemSharedLibrary = strArr; + break; + case 82: + int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 82); + int length2 = this.systemAvailableFeature == null ? 0 : this.systemAvailableFeature.length; + String[] strArr2 = new String[repeatedFieldArrayLength2 + length2]; + if (length2 != 0) { + System.arraycopy(this.systemAvailableFeature, 0, strArr2, 0, length2); + } + while (length2 < strArr2.length - 1) { + strArr2[length2] = x0.readString(); + x0.readTag(); + length2++; + } + strArr2[length2] = x0.readString(); + this.systemAvailableFeature = strArr2; + break; + case 90: + int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 90); + int length3 = this.nativePlatform == null ? 0 : this.nativePlatform.length; + String[] strArr3 = new String[repeatedFieldArrayLength3 + length3]; + if (length3 != 0) { + System.arraycopy(this.nativePlatform, 0, strArr3, 0, length3); + } + while (length3 < strArr3.length - 1) { + strArr3[length3] = x0.readString(); + x0.readTag(); + length3++; + } + strArr3[length3] = x0.readString(); + this.nativePlatform = strArr3; + break; + case 96: + this.screenWidth = x0.readRawVarint32(); + this.hasScreenWidth = true; + break; + case 104: + this.screenHeight = x0.readRawVarint32(); + this.hasScreenHeight = true; + break; + case 114: + int repeatedFieldArrayLength4 = WireFormatNano.getRepeatedFieldArrayLength(x0, 114); + int length4 = this.systemSupportedLocale == null ? 0 : this.systemSupportedLocale.length; + String[] strArr4 = new String[repeatedFieldArrayLength4 + length4]; + if (length4 != 0) { + System.arraycopy(this.systemSupportedLocale, 0, strArr4, 0, length4); + } + while (length4 < strArr4.length - 1) { + strArr4[length4] = x0.readString(); + x0.readTag(); + length4++; + } + strArr4[length4] = x0.readString(); + this.systemSupportedLocale = strArr4; + break; + case 122: + int repeatedFieldArrayLength5 = WireFormatNano.getRepeatedFieldArrayLength(x0, 122); + int length5 = this.glExtension == null ? 0 : this.glExtension.length; + String[] strArr5 = new String[repeatedFieldArrayLength5 + length5]; + if (length5 != 0) { + System.arraycopy(this.glExtension, 0, strArr5, 0, length5); + } + while (length5 < strArr5.length - 1) { + strArr5[length5] = x0.readString(); + x0.readTag(); + length5++; + } + strArr5[length5] = x0.readString(); + this.glExtension = strArr5; + break; + case 136: + this.maxApkDownloadSizeMb = x0.readRawVarint32(); + this.hasMaxApkDownloadSizeMb = true; + break; + case 144: + this.smallestScreenWidthDp = x0.readRawVarint32(); + this.hasSmallestScreenWidthDp = true; + break; + case 152: + this.lowRamDevice = x0.readBool(); + this.hasLowRamDevice = true; + break; + case 160: + this.totalMemoryBytes = x0.readRawVarint64(); + this.hasTotalMemoryBytes = true; + break; + case 168: + this.maxNumOfCpuCores = x0.readRawVarint32(); + this.hasMaxNumOfCpuCores = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public DeviceConfigurationProto() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.touchScreen != 0 || this.hasTouchScreen) { + output.writeInt32(1, this.touchScreen); + } + if (this.keyboard != 0 || this.hasKeyboard) { + output.writeInt32(2, this.keyboard); + } + if (this.navigation != 0 || this.hasNavigation) { + output.writeInt32(3, this.navigation); + } + if (this.screenLayout != 0 || this.hasScreenLayout) { + output.writeInt32(4, this.screenLayout); + } + if (this.hasHasHardKeyboard || this.hasHardKeyboard) { + output.writeBool(5, this.hasHardKeyboard); + } + if (this.hasHasFiveWayNavigation || this.hasFiveWayNavigation) { + output.writeBool(6, this.hasFiveWayNavigation); + } + if (this.hasScreenDensity || this.screenDensity != 0) { + output.writeInt32(7, this.screenDensity); + } + if (this.hasGlEsVersion || this.glEsVersion != 0) { + output.writeInt32(8, this.glEsVersion); + } + if (this.systemSharedLibrary != null && this.systemSharedLibrary.length > 0) { + for (int i = 0; i < this.systemSharedLibrary.length; i++) { + String element = this.systemSharedLibrary[i]; + if (element != null) { + output.writeString(9, element); + } + } + } + if (this.systemAvailableFeature != null && this.systemAvailableFeature.length > 0) { + for (int i2 = 0; i2 < this.systemAvailableFeature.length; i2++) { + String element2 = this.systemAvailableFeature[i2]; + if (element2 != null) { + output.writeString(10, element2); + } + } + } + if (this.nativePlatform != null && this.nativePlatform.length > 0) { + for (int i3 = 0; i3 < this.nativePlatform.length; i3++) { + String element3 = this.nativePlatform[i3]; + if (element3 != null) { + output.writeString(11, element3); + } + } + } + if (this.hasScreenWidth || this.screenWidth != 0) { + output.writeInt32(12, this.screenWidth); + } + if (this.hasScreenHeight || this.screenHeight != 0) { + output.writeInt32(13, this.screenHeight); + } + if (this.systemSupportedLocale != null && this.systemSupportedLocale.length > 0) { + for (int i4 = 0; i4 < this.systemSupportedLocale.length; i4++) { + String element4 = this.systemSupportedLocale[i4]; + if (element4 != null) { + output.writeString(14, element4); + } + } + } + if (this.glExtension != null && this.glExtension.length > 0) { + for (int i5 = 0; i5 < this.glExtension.length; i5++) { + String element5 = this.glExtension[i5]; + if (element5 != null) { + output.writeString(15, element5); + } + } + } + if (this.hasMaxApkDownloadSizeMb || this.maxApkDownloadSizeMb != 50) { + output.writeInt32(17, this.maxApkDownloadSizeMb); + } + if (this.hasSmallestScreenWidthDp || this.smallestScreenWidthDp != 0) { + output.writeInt32(18, this.smallestScreenWidthDp); + } + if (this.hasLowRamDevice || this.lowRamDevice) { + output.writeBool(19, this.lowRamDevice); + } + if (this.hasTotalMemoryBytes || this.totalMemoryBytes != 0) { + output.writeInt64(20, this.totalMemoryBytes); + } + if (this.hasMaxNumOfCpuCores || this.maxNumOfCpuCores != 0) { + output.writeInt32(21, this.maxNumOfCpuCores); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.touchScreen != 0 || this.hasTouchScreen) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.touchScreen); + } + if (this.keyboard != 0 || this.hasKeyboard) { + size += CodedOutputByteBufferNano.computeInt32Size(2, this.keyboard); + } + if (this.navigation != 0 || this.hasNavigation) { + size += CodedOutputByteBufferNano.computeInt32Size(3, this.navigation); + } + if (this.screenLayout != 0 || this.hasScreenLayout) { + size += CodedOutputByteBufferNano.computeInt32Size(4, this.screenLayout); + } + if (this.hasHasHardKeyboard || this.hasHardKeyboard) { + size += CodedOutputByteBufferNano.computeTagSize(5) + 1; + } + if (this.hasHasFiveWayNavigation || this.hasFiveWayNavigation) { + size += CodedOutputByteBufferNano.computeTagSize(6) + 1; + } + if (this.hasScreenDensity || this.screenDensity != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(7, this.screenDensity); + } + if (this.hasGlEsVersion || this.glEsVersion != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(8, this.glEsVersion); + } + if (this.systemSharedLibrary != null && this.systemSharedLibrary.length > 0) { + int dataCount = 0; + int dataSize = 0; + for (int i = 0; i < this.systemSharedLibrary.length; i++) { + String element = this.systemSharedLibrary[i]; + if (element != null) { + dataCount++; + dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element); + } + } + size = size + dataSize + (dataCount * 1); + } + if (this.systemAvailableFeature != null && this.systemAvailableFeature.length > 0) { + int dataCount2 = 0; + int dataSize2 = 0; + for (int i2 = 0; i2 < this.systemAvailableFeature.length; i2++) { + String element2 = this.systemAvailableFeature[i2]; + if (element2 != null) { + dataCount2++; + dataSize2 += CodedOutputByteBufferNano.computeStringSizeNoTag(element2); + } + } + size = size + dataSize2 + (dataCount2 * 1); + } + if (this.nativePlatform != null && this.nativePlatform.length > 0) { + int dataCount3 = 0; + int dataSize3 = 0; + for (int i3 = 0; i3 < this.nativePlatform.length; i3++) { + String element3 = this.nativePlatform[i3]; + if (element3 != null) { + dataCount3++; + dataSize3 += CodedOutputByteBufferNano.computeStringSizeNoTag(element3); + } + } + size = size + dataSize3 + (dataCount3 * 1); + } + if (this.hasScreenWidth || this.screenWidth != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(12, this.screenWidth); + } + if (this.hasScreenHeight || this.screenHeight != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(13, this.screenHeight); + } + if (this.systemSupportedLocale != null && this.systemSupportedLocale.length > 0) { + int dataCount4 = 0; + int dataSize4 = 0; + for (int i4 = 0; i4 < this.systemSupportedLocale.length; i4++) { + String element4 = this.systemSupportedLocale[i4]; + if (element4 != null) { + dataCount4++; + dataSize4 += CodedOutputByteBufferNano.computeStringSizeNoTag(element4); + } + } + size = size + dataSize4 + (dataCount4 * 1); + } + if (this.glExtension != null && this.glExtension.length > 0) { + int dataCount5 = 0; + int dataSize5 = 0; + for (int i5 = 0; i5 < this.glExtension.length; i5++) { + String element5 = this.glExtension[i5]; + if (element5 != null) { + dataCount5++; + dataSize5 += CodedOutputByteBufferNano.computeStringSizeNoTag(element5); + } + } + size = size + dataSize5 + (dataCount5 * 1); + } + if (this.hasMaxApkDownloadSizeMb || this.maxApkDownloadSizeMb != 50) { + size += CodedOutputByteBufferNano.computeInt32Size(17, this.maxApkDownloadSizeMb); + } + if (this.hasSmallestScreenWidthDp || this.smallestScreenWidthDp != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(18, this.smallestScreenWidthDp); + } + if (this.hasLowRamDevice || this.lowRamDevice) { + size += CodedOutputByteBufferNano.computeTagSize(19) + 1; + } + if (this.hasTotalMemoryBytes || this.totalMemoryBytes != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(20, this.totalMemoryBytes); + } + if (this.hasMaxNumOfCpuCores || this.maxNumOfCpuCores != 0) { + return size + CodedOutputByteBufferNano.computeInt32Size(21, this.maxNumOfCpuCores); + } + return size; + } + } +} diff --git a/docs/com/google/android/finsky/protos/DocDetails.java b/docs/com/google/android/finsky/protos/DocDetails.java new file mode 100644 index 0000000..73c967c --- /dev/null +++ b/docs/com/google/android/finsky/protos/DocDetails.java @@ -0,0 +1,741 @@ +package com.google.android.finsky.protos; + +import com.google.android.finsky.protos.Common; +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public interface DocDetails { + + /* loaded from: classes.dex */ + public static final class DocumentDetails extends MessageNano { + public AppDetails appDetails = null; + public AlbumDetails albumDetails = null; + public ArtistDetails artistDetails = null; + public SongDetails songDetails = null; + public BookDetails bookDetails = null; + public VideoDetails videoDetails = null; + public SubscriptionDetails subscriptionDetails = null; + public MagazineDetails magazineDetails = null; + public TvShowDetails tvShowDetails = null; + public TvSeasonDetails tvSeasonDetails = null; + public TvEpisodeDetails tvEpisodeDetails = null; + public PersonDetails personDetails = null; + public TalentDetails talentDetails = null; + public DeveloperDetails developerDetails = null; + public BookSeriesDetails bookSeriesDetails = null; + + public DocumentDetails() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.appDetails != null) { + output.writeMessage(1, this.appDetails); + } + if (this.albumDetails != null) { + output.writeMessage(2, this.albumDetails); + } + if (this.artistDetails != null) { + output.writeMessage(3, this.artistDetails); + } + if (this.songDetails != null) { + output.writeMessage(4, this.songDetails); + } + if (this.bookDetails != null) { + output.writeMessage(5, this.bookDetails); + } + if (this.videoDetails != null) { + output.writeMessage(6, this.videoDetails); + } + if (this.subscriptionDetails != null) { + output.writeMessage(7, this.subscriptionDetails); + } + if (this.magazineDetails != null) { + output.writeMessage(8, this.magazineDetails); + } + if (this.tvShowDetails != null) { + output.writeMessage(9, this.tvShowDetails); + } + if (this.tvSeasonDetails != null) { + output.writeMessage(10, this.tvSeasonDetails); + } + if (this.tvEpisodeDetails != null) { + output.writeMessage(11, this.tvEpisodeDetails); + } + if (this.personDetails != null) { + output.writeMessage(12, this.personDetails); + } + if (this.talentDetails != null) { + output.writeMessage(13, this.talentDetails); + } + if (this.developerDetails != null) { + output.writeMessage(14, this.developerDetails); + } + if (this.bookSeriesDetails != null) { + output.writeMessage(15, this.bookSeriesDetails); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.appDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.appDetails); + } + if (this.albumDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.albumDetails); + } + if (this.artistDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.artistDetails); + } + if (this.songDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, this.songDetails); + } + if (this.bookDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(5, this.bookDetails); + } + if (this.videoDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(6, this.videoDetails); + } + if (this.subscriptionDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(7, this.subscriptionDetails); + } + if (this.magazineDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(8, this.magazineDetails); + } + if (this.tvShowDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(9, this.tvShowDetails); + } + if (this.tvSeasonDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(10, this.tvSeasonDetails); + } + if (this.tvEpisodeDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(11, this.tvEpisodeDetails); + } + if (this.personDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(12, this.personDetails); + } + if (this.talentDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(13, this.talentDetails); + } + if (this.developerDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(14, this.developerDetails); + } + if (this.bookSeriesDetails != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(15, this.bookSeriesDetails); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.appDetails == null) { + this.appDetails = new AppDetails(); + } + x0.readMessage(this.appDetails); + break; + case 18: + if (this.albumDetails == null) { + this.albumDetails = new AlbumDetails(); + } + x0.readMessage(this.albumDetails); + break; + case 26: + if (this.artistDetails == null) { + this.artistDetails = new ArtistDetails(); + } + x0.readMessage(this.artistDetails); + break; + case 34: + if (this.songDetails == null) { + this.songDetails = new SongDetails(); + } + x0.readMessage(this.songDetails); + break; + case 42: + if (this.bookDetails == null) { + this.bookDetails = new BookDetails(); + } + x0.readMessage(this.bookDetails); + break; + case 50: + if (this.videoDetails == null) { + this.videoDetails = new VideoDetails(); + } + x0.readMessage(this.videoDetails); + break; + case 58: + if (this.subscriptionDetails == null) { + this.subscriptionDetails = new SubscriptionDetails(); + } + x0.readMessage(this.subscriptionDetails); + break; + case 66: + if (this.magazineDetails == null) { + this.magazineDetails = new MagazineDetails(); + } + x0.readMessage(this.magazineDetails); + break; + case 74: + if (this.tvShowDetails == null) { + this.tvShowDetails = new TvShowDetails(); + } + x0.readMessage(this.tvShowDetails); + break; + case 82: + if (this.tvSeasonDetails == null) { + this.tvSeasonDetails = new TvSeasonDetails(); + } + x0.readMessage(this.tvSeasonDetails); + break; + case 90: + if (this.tvEpisodeDetails == null) { + this.tvEpisodeDetails = new TvEpisodeDetails(); + } + x0.readMessage(this.tvEpisodeDetails); + break; + case 98: + if (this.personDetails == null) { + this.personDetails = new PersonDetails(); + } + x0.readMessage(this.personDetails); + break; + case 106: + if (this.talentDetails == null) { + this.talentDetails = new TalentDetails(); + } + x0.readMessage(this.talentDetails); + break; + case 114: + if (this.developerDetails == null) { + this.developerDetails = new DeveloperDetails(); + } + x0.readMessage(this.developerDetails); + break; + case 122: + if (this.bookSeriesDetails == null) { + this.bookSeriesDetails = new BookSeriesDetails(); + } + x0.readMessage(this.bookSeriesDetails); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class ProductDetails extends MessageNano { + public String title = ""; + public boolean hasTitle = false; + public ProductDetailsSection[] section = ProductDetailsSection.emptyArray(); + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.title = x0.readString(); + this.hasTitle = true; + break; + case 18: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 18); + if (this.section == null) { + length = 0; + } else { + length = this.section.length; + } + ProductDetailsSection[] productDetailsSectionArr = new ProductDetailsSection[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.section, 0, productDetailsSectionArr, 0, length); + } + while (length < productDetailsSectionArr.length - 1) { + productDetailsSectionArr[length] = new ProductDetailsSection(); + x0.readMessage(productDetailsSectionArr[length]); + x0.readTag(); + length++; + } + productDetailsSectionArr[length] = new ProductDetailsSection(); + x0.readMessage(productDetailsSectionArr[length]); + this.section = productDetailsSectionArr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public ProductDetails() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasTitle || !this.title.equals("")) { + output.writeString(1, this.title); + } + if (this.section != null && this.section.length > 0) { + for (int i = 0; i < this.section.length; i++) { + ProductDetailsSection element = this.section[i]; + if (element != null) { + output.writeMessage(2, element); + } + } + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasTitle || !this.title.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.title); + } + if (this.section != null && this.section.length > 0) { + for (int i = 0; i < this.section.length; i++) { + ProductDetailsSection element = this.section[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, element); + } + } + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class ProductDetailsSection extends MessageNano { + private static volatile ProductDetailsSection[] _emptyArray; + public String title = ""; + public boolean hasTitle = false; + public ProductDetailsDescription[] description = ProductDetailsDescription.emptyArray(); + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.title = x0.readString(); + this.hasTitle = true; + break; + case 26: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 26); + if (this.description == null) { + length = 0; + } else { + length = this.description.length; + } + ProductDetailsDescription[] productDetailsDescriptionArr = new ProductDetailsDescription[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.description, 0, productDetailsDescriptionArr, 0, length); + } + while (length < productDetailsDescriptionArr.length - 1) { + productDetailsDescriptionArr[length] = new ProductDetailsDescription(); + x0.readMessage(productDetailsDescriptionArr[length]); + x0.readTag(); + length++; + } + productDetailsDescriptionArr[length] = new ProductDetailsDescription(); + x0.readMessage(productDetailsDescriptionArr[length]); + this.description = productDetailsDescriptionArr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static ProductDetailsSection[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new ProductDetailsSection[0]; + } + } + } + return _emptyArray; + } + + public ProductDetailsSection() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasTitle || !this.title.equals("")) { + output.writeString(1, this.title); + } + if (this.description != null && this.description.length > 0) { + for (int i = 0; i < this.description.length; i++) { + ProductDetailsDescription element = this.description[i]; + if (element != null) { + output.writeMessage(3, element); + } + } + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasTitle || !this.title.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.title); + } + if (this.description != null && this.description.length > 0) { + for (int i = 0; i < this.description.length; i++) { + ProductDetailsDescription element = this.description[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, element); + } + } + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class ProductDetailsDescription extends MessageNano { + private static volatile ProductDetailsDescription[] _emptyArray; + public Common.Image image = null; + public String description = ""; + public boolean hasDescription = false; + + public static ProductDetailsDescription[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new ProductDetailsDescription[0]; + } + } + } + return _emptyArray; + } + + public ProductDetailsDescription() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.image != null) { + output.writeMessage(1, this.image); + } + if (this.hasDescription || !this.description.equals("")) { + output.writeString(2, this.description); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.image != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.image); + } + if (this.hasDescription || !this.description.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(2, this.description); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.image == null) { + this.image = new Common.Image(); + } + x0.readMessage(this.image); + break; + case 18: + this.description = x0.readString(); + this.hasDescription = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class PersonDetails extends MessageNano { + public boolean personIsRequester = false; + public boolean hasPersonIsRequester = false; + public boolean isGplusUser = true; + public boolean hasIsGplusUser = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.personIsRequester = x0.readBool(); + this.hasPersonIsRequester = true; + break; + case 16: + this.isGplusUser = x0.readBool(); + this.hasIsGplusUser = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public PersonDetails() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasPersonIsRequester || this.personIsRequester) { + output.writeBool(1, this.personIsRequester); + } + if (this.hasIsGplusUser || !this.isGplusUser) { + output.writeBool(2, this.isGplusUser); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasPersonIsRequester || this.personIsRequester) { + size += CodedOutputByteBufferNano.computeTagSize(1) + 1; + } + if (this.hasIsGplusUser || !this.isGplusUser) { + return size + CodedOutputByteBufferNano.computeTagSize(2) + 1; + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class TalentDetails extends MessageNano { + public TalentExternalLinks externalLinks = null; + public int primaryRoleId = 0; + public boolean hasPrimaryRoleId = false; + + public TalentDetails() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.externalLinks != null) { + output.writeMessage(1, this.externalLinks); + } + if (this.primaryRoleId != 0 || this.hasPrimaryRoleId) { + output.writeInt32(2, this.primaryRoleId); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.externalLinks != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.externalLinks); + } + if (this.primaryRoleId != 0 || this.hasPrimaryRoleId) { + return size + CodedOutputByteBufferNano.computeInt32Size(2, this.primaryRoleId); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.externalLinks == null) { + this.externalLinks = new TalentExternalLinks(); + } + x0.readMessage(this.externalLinks); + break; + case 16: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + this.primaryRoleId = readRawVarint32; + this.hasPrimaryRoleId = true; + continue; + } + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } + + /* loaded from: classes.dex */ + public static final class TalentExternalLinks extends MessageNano { + public Link[] websiteUrl = Link.emptyArray(); + public Link googlePlusProfileUrl = null; + public Link youtubeChannelUrl = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10); + if (this.websiteUrl == null) { + length = 0; + } else { + length = this.websiteUrl.length; + } + Link[] linkArr = new Link[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.websiteUrl, 0, linkArr, 0, length); + } + while (length < linkArr.length - 1) { + linkArr[length] = new Link(); + x0.readMessage(linkArr[length]); + x0.readTag(); + length++; + } + linkArr[length] = new Link(); + x0.readMessage(linkArr[length]); + this.websiteUrl = linkArr; + break; + case 18: + if (this.googlePlusProfileUrl == null) { + this.googlePlusProfileUrl = new Link(); + } + x0.readMessage(this.googlePlusProfileUrl); + break; + case 26: + if (this.youtubeChannelUrl == null) { + this.youtubeChannelUrl = new Link(); + } + x0.readMessage(this.youtubeChannelUrl); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public TalentExternalLinks() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.websiteUrl != null && this.websiteUrl.length > 0) { + for (int i = 0; i < this.websiteUrl.length; i++) { + Link element = this.websiteUrl[i]; + if (element != null) { + output.writeMessage(1, element); + } + } + } + if (this.googlePlusProfileUrl != null) { + output.writeMessage(2, this.googlePlusProfileUrl); + } + if (this.youtubeChannelUrl != null) { + output.writeMessage(3, this.youtubeChannelUrl); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.websiteUrl != null && this.websiteUrl.length > 0) { + for (int i = 0; i < this.websiteUrl.length; i++) { + Link element = this.websiteUrl[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, element); + } + } + } + if (this.googlePlusProfileUrl != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.googlePlusProfileUrl); + } + if (this.youtubeChannelUrl != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(3, this.youtubeChannelUrl); + } + return size; + } + } +} diff --git a/docs/com/google/android/finsky/protos/DocV2.java b/docs/com/google/android/finsky/protos/DocV2.java new file mode 100644 index 0000000..8af33bd --- /dev/null +++ b/docs/com/google/android/finsky/protos/DocV2.java @@ -0,0 +1,628 @@ +package com.google.android.finsky.protos; + +import com.google.android.finsky.protos.Common; +import com.google.android.finsky.protos.Containers; +import com.google.android.finsky.protos.DocDetails; +import com.google.android.finsky.protos.FilterRules; +import com.google.android.finsky.protos.Rating; +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +import java.util.Arrays; +/* loaded from: classes.dex */ +public final class DocV2 extends MessageNano { + private static volatile DocV2[] _emptyArray; + public String docid = ""; + public boolean hasDocid = false; + public String backendDocid = ""; + public boolean hasBackendDocid = false; + public int docType = 1; + public boolean hasDocType = false; + public int backendId = 0; + public boolean hasBackendId = false; + public String title = ""; + public boolean hasTitle = false; + public String subtitle = ""; + public boolean hasSubtitle = false; + public String creator = ""; + public boolean hasCreator = false; + public String descriptionHtml = ""; + public boolean hasDescriptionHtml = false; + public String translatedDescriptionHtml = ""; + public boolean hasTranslatedDescriptionHtml = false; + public String promotionalDescription = ""; + public boolean hasPromotionalDescription = false; + public Common.Offer[] offer = Common.Offer.emptyArray(); + public FilterRules.Availability availability = null; + public Common.Image[] image = Common.Image.emptyArray(); + public DocV2[] child = emptyArray(); + public Containers.ContainerMetadata containerMetadata = null; + public DocDetails.DocumentDetails details = null; + public DocDetails.ProductDetails productDetails = null; + public Rating.AggregateRating aggregateRating = null; + public Annotations annotations = null; + public String detailsUrl = ""; + public boolean hasDetailsUrl = false; + public String shareUrl = ""; + public boolean hasShareUrl = false; + public String reviewsUrl = ""; + public boolean hasReviewsUrl = false; + public String snippetsUrl = ""; + public boolean hasSnippetsUrl = false; + public String backendUrl = ""; + public boolean hasBackendUrl = false; + public String purchaseDetailsUrl = ""; + public boolean hasPurchaseDetailsUrl = false; + public boolean detailsReusable = false; + public boolean hasDetailsReusable = false; + public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES; + public boolean hasServerLogsCookie = false; + public boolean mature = false; + public boolean hasMature = false; + public boolean availableForPreregistration = false; + public boolean hasAvailableForPreregistration = false; + public ReviewTip[] tip = ReviewTip.emptyArray(); + public boolean forceShareability = false; + public boolean hasForceShareability = false; + public boolean useWishlistAsPrimaryAction = false; + public boolean hasUseWishlistAsPrimaryAction = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + int length2; + int length3; + int length4; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.docid = x0.readString(); + this.hasDocid = true; + break; + case 18: + this.backendDocid = x0.readString(); + this.hasBackendDocid = true; + break; + case 24: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + this.docType = readRawVarint32; + this.hasDocType = true; + continue; + } + case 32: + int readRawVarint322 = x0.readRawVarint32(); + switch (readRawVarint322) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 10: + case 11: + case 12: + case 13: + this.backendId = readRawVarint322; + this.hasBackendId = true; + continue; + } + case 42: + this.title = x0.readString(); + this.hasTitle = true; + break; + case 50: + this.creator = x0.readString(); + this.hasCreator = true; + break; + case 58: + this.descriptionHtml = x0.readString(); + this.hasDescriptionHtml = true; + break; + case 66: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 66); + if (this.offer == null) { + length4 = 0; + } else { + length4 = this.offer.length; + } + Common.Offer[] offerArr = new Common.Offer[repeatedFieldArrayLength + length4]; + if (length4 != 0) { + System.arraycopy(this.offer, 0, offerArr, 0, length4); + } + while (length4 < offerArr.length - 1) { + offerArr[length4] = new Common.Offer(); + x0.readMessage(offerArr[length4]); + x0.readTag(); + length4++; + } + offerArr[length4] = new Common.Offer(); + x0.readMessage(offerArr[length4]); + this.offer = offerArr; + break; + case 74: + if (this.availability == null) { + this.availability = new FilterRules.Availability(); + } + x0.readMessage(this.availability); + break; + case 82: + int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 82); + if (this.image == null) { + length3 = 0; + } else { + length3 = this.image.length; + } + Common.Image[] imageArr = new Common.Image[repeatedFieldArrayLength2 + length3]; + if (length3 != 0) { + System.arraycopy(this.image, 0, imageArr, 0, length3); + } + while (length3 < imageArr.length - 1) { + imageArr[length3] = new Common.Image(); + x0.readMessage(imageArr[length3]); + x0.readTag(); + length3++; + } + imageArr[length3] = new Common.Image(); + x0.readMessage(imageArr[length3]); + this.image = imageArr; + break; + case 90: + int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 90); + if (this.child == null) { + length2 = 0; + } else { + length2 = this.child.length; + } + DocV2[] docV2Arr = new DocV2[repeatedFieldArrayLength3 + length2]; + if (length2 != 0) { + System.arraycopy(this.child, 0, docV2Arr, 0, length2); + } + while (length2 < docV2Arr.length - 1) { + docV2Arr[length2] = new DocV2(); + x0.readMessage(docV2Arr[length2]); + x0.readTag(); + length2++; + } + docV2Arr[length2] = new DocV2(); + x0.readMessage(docV2Arr[length2]); + this.child = docV2Arr; + break; + case 98: + if (this.containerMetadata == null) { + this.containerMetadata = new Containers.ContainerMetadata(); + } + x0.readMessage(this.containerMetadata); + break; + case 106: + if (this.details == null) { + this.details = new DocDetails.DocumentDetails(); + } + x0.readMessage(this.details); + break; + case 114: + if (this.aggregateRating == null) { + this.aggregateRating = new Rating.AggregateRating(); + } + x0.readMessage(this.aggregateRating); + break; + case 122: + if (this.annotations == null) { + this.annotations = new Annotations(); + } + x0.readMessage(this.annotations); + break; + case 130: + this.detailsUrl = x0.readString(); + this.hasDetailsUrl = true; + break; + case 138: + this.shareUrl = x0.readString(); + this.hasShareUrl = true; + break; + case 146: + this.reviewsUrl = x0.readString(); + this.hasReviewsUrl = true; + break; + case 154: + this.backendUrl = x0.readString(); + this.hasBackendUrl = true; + break; + case 162: + this.purchaseDetailsUrl = x0.readString(); + this.hasPurchaseDetailsUrl = true; + break; + case 168: + this.detailsReusable = x0.readBool(); + this.hasDetailsReusable = true; + break; + case 178: + this.subtitle = x0.readString(); + this.hasSubtitle = true; + break; + case 186: + this.translatedDescriptionHtml = x0.readString(); + this.hasTranslatedDescriptionHtml = true; + break; + case 194: + this.serverLogsCookie = x0.readBytes(); + this.hasServerLogsCookie = true; + break; + case 202: + if (this.productDetails == null) { + this.productDetails = new DocDetails.ProductDetails(); + } + x0.readMessage(this.productDetails); + break; + case 208: + this.mature = x0.readBool(); + this.hasMature = true; + break; + case 218: + this.promotionalDescription = x0.readString(); + this.hasPromotionalDescription = true; + break; + case 232: + this.availableForPreregistration = x0.readBool(); + this.hasAvailableForPreregistration = true; + break; + case 242: + int repeatedFieldArrayLength4 = WireFormatNano.getRepeatedFieldArrayLength(x0, 242); + if (this.tip == null) { + length = 0; + } else { + length = this.tip.length; + } + ReviewTip[] reviewTipArr = new ReviewTip[repeatedFieldArrayLength4 + length]; + if (length != 0) { + System.arraycopy(this.tip, 0, reviewTipArr, 0, length); + } + while (length < reviewTipArr.length - 1) { + reviewTipArr[length] = new ReviewTip(); + x0.readMessage(reviewTipArr[length]); + x0.readTag(); + length++; + } + reviewTipArr[length] = new ReviewTip(); + x0.readMessage(reviewTipArr[length]); + this.tip = reviewTipArr; + break; + case 250: + this.snippetsUrl = x0.readString(); + this.hasSnippetsUrl = true; + break; + case 256: + this.forceShareability = x0.readBool(); + this.hasForceShareability = true; + break; + case 264: + this.useWishlistAsPrimaryAction = x0.readBool(); + this.hasUseWishlistAsPrimaryAction = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static DocV2[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new DocV2[0]; + } + } + } + return _emptyArray; + } + + public DocV2() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasDocid || !this.docid.equals("")) { + output.writeString(1, this.docid); + } + if (this.hasBackendDocid || !this.backendDocid.equals("")) { + output.writeString(2, this.backendDocid); + } + if (this.docType != 1 || this.hasDocType) { + output.writeInt32(3, this.docType); + } + if (this.backendId != 0 || this.hasBackendId) { + output.writeInt32(4, this.backendId); + } + if (this.hasTitle || !this.title.equals("")) { + output.writeString(5, this.title); + } + if (this.hasCreator || !this.creator.equals("")) { + output.writeString(6, this.creator); + } + if (this.hasDescriptionHtml || !this.descriptionHtml.equals("")) { + output.writeString(7, this.descriptionHtml); + } + if (this.offer != null && this.offer.length > 0) { + for (int i = 0; i < this.offer.length; i++) { + Common.Offer element = this.offer[i]; + if (element != null) { + output.writeMessage(8, element); + } + } + } + if (this.availability != null) { + output.writeMessage(9, this.availability); + } + if (this.image != null && this.image.length > 0) { + for (int i2 = 0; i2 < this.image.length; i2++) { + Common.Image element2 = this.image[i2]; + if (element2 != null) { + output.writeMessage(10, element2); + } + } + } + if (this.child != null && this.child.length > 0) { + for (int i3 = 0; i3 < this.child.length; i3++) { + DocV2 element3 = this.child[i3]; + if (element3 != null) { + output.writeMessage(11, element3); + } + } + } + if (this.containerMetadata != null) { + output.writeMessage(12, this.containerMetadata); + } + if (this.details != null) { + output.writeMessage(13, this.details); + } + if (this.aggregateRating != null) { + output.writeMessage(14, this.aggregateRating); + } + if (this.annotations != null) { + output.writeMessage(15, this.annotations); + } + if (this.hasDetailsUrl || !this.detailsUrl.equals("")) { + output.writeString(16, this.detailsUrl); + } + if (this.hasShareUrl || !this.shareUrl.equals("")) { + output.writeString(17, this.shareUrl); + } + if (this.hasReviewsUrl || !this.reviewsUrl.equals("")) { + output.writeString(18, this.reviewsUrl); + } + if (this.hasBackendUrl || !this.backendUrl.equals("")) { + output.writeString(19, this.backendUrl); + } + if (this.hasPurchaseDetailsUrl || !this.purchaseDetailsUrl.equals("")) { + output.writeString(20, this.purchaseDetailsUrl); + } + if (this.hasDetailsReusable || this.detailsReusable) { + output.writeBool(21, this.detailsReusable); + } + if (this.hasSubtitle || !this.subtitle.equals("")) { + output.writeString(22, this.subtitle); + } + if (this.hasTranslatedDescriptionHtml || !this.translatedDescriptionHtml.equals("")) { + output.writeString(23, this.translatedDescriptionHtml); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + output.writeBytes(24, this.serverLogsCookie); + } + if (this.productDetails != null) { + output.writeMessage(25, this.productDetails); + } + if (this.hasMature || this.mature) { + output.writeBool(26, this.mature); + } + if (this.hasPromotionalDescription || !this.promotionalDescription.equals("")) { + output.writeString(27, this.promotionalDescription); + } + if (this.hasAvailableForPreregistration || this.availableForPreregistration) { + output.writeBool(29, this.availableForPreregistration); + } + if (this.tip != null && this.tip.length > 0) { + for (int i4 = 0; i4 < this.tip.length; i4++) { + ReviewTip element4 = this.tip[i4]; + if (element4 != null) { + output.writeMessage(30, element4); + } + } + } + if (this.hasSnippetsUrl || !this.snippetsUrl.equals("")) { + output.writeString(31, this.snippetsUrl); + } + if (this.hasForceShareability || this.forceShareability) { + output.writeBool(32, this.forceShareability); + } + if (this.hasUseWishlistAsPrimaryAction || this.useWishlistAsPrimaryAction) { + output.writeBool(33, this.useWishlistAsPrimaryAction); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasDocid || !this.docid.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.docid); + } + if (this.hasBackendDocid || !this.backendDocid.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.backendDocid); + } + if (this.docType != 1 || this.hasDocType) { + size += CodedOutputByteBufferNano.computeInt32Size(3, this.docType); + } + if (this.backendId != 0 || this.hasBackendId) { + size += CodedOutputByteBufferNano.computeInt32Size(4, this.backendId); + } + if (this.hasTitle || !this.title.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(5, this.title); + } + if (this.hasCreator || !this.creator.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(6, this.creator); + } + if (this.hasDescriptionHtml || !this.descriptionHtml.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(7, this.descriptionHtml); + } + if (this.offer != null && this.offer.length > 0) { + for (int i = 0; i < this.offer.length; i++) { + Common.Offer element = this.offer[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(8, element); + } + } + } + if (this.availability != null) { + size += CodedOutputByteBufferNano.computeMessageSize(9, this.availability); + } + if (this.image != null && this.image.length > 0) { + for (int i2 = 0; i2 < this.image.length; i2++) { + Common.Image element2 = this.image[i2]; + if (element2 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(10, element2); + } + } + } + if (this.child != null && this.child.length > 0) { + for (int i3 = 0; i3 < this.child.length; i3++) { + DocV2 element3 = this.child[i3]; + if (element3 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(11, element3); + } + } + } + if (this.containerMetadata != null) { + size += CodedOutputByteBufferNano.computeMessageSize(12, this.containerMetadata); + } + if (this.details != null) { + size += CodedOutputByteBufferNano.computeMessageSize(13, this.details); + } + if (this.aggregateRating != null) { + size += CodedOutputByteBufferNano.computeMessageSize(14, this.aggregateRating); + } + if (this.annotations != null) { + size += CodedOutputByteBufferNano.computeMessageSize(15, this.annotations); + } + if (this.hasDetailsUrl || !this.detailsUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(16, this.detailsUrl); + } + if (this.hasShareUrl || !this.shareUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(17, this.shareUrl); + } + if (this.hasReviewsUrl || !this.reviewsUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(18, this.reviewsUrl); + } + if (this.hasBackendUrl || !this.backendUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(19, this.backendUrl); + } + if (this.hasPurchaseDetailsUrl || !this.purchaseDetailsUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(20, this.purchaseDetailsUrl); + } + if (this.hasDetailsReusable || this.detailsReusable) { + size += CodedOutputByteBufferNano.computeTagSize(21) + 1; + } + if (this.hasSubtitle || !this.subtitle.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(22, this.subtitle); + } + if (this.hasTranslatedDescriptionHtml || !this.translatedDescriptionHtml.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(23, this.translatedDescriptionHtml); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + size += CodedOutputByteBufferNano.computeBytesSize(24, this.serverLogsCookie); + } + if (this.productDetails != null) { + size += CodedOutputByteBufferNano.computeMessageSize(25, this.productDetails); + } + if (this.hasMature || this.mature) { + size += CodedOutputByteBufferNano.computeTagSize(26) + 1; + } + if (this.hasPromotionalDescription || !this.promotionalDescription.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(27, this.promotionalDescription); + } + if (this.hasAvailableForPreregistration || this.availableForPreregistration) { + size += CodedOutputByteBufferNano.computeTagSize(29) + 1; + } + if (this.tip != null && this.tip.length > 0) { + for (int i4 = 0; i4 < this.tip.length; i4++) { + ReviewTip element4 = this.tip[i4]; + if (element4 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(30, element4); + } + } + } + if (this.hasSnippetsUrl || !this.snippetsUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(31, this.snippetsUrl); + } + if (this.hasForceShareability || this.forceShareability) { + size += CodedOutputByteBufferNano.computeTagSize(32) + 1; + } + if (this.hasUseWishlistAsPrimaryAction || this.useWishlistAsPrimaryAction) { + return size + CodedOutputByteBufferNano.computeTagSize(33) + 1; + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/FileMetadata.java b/docs/com/google/android/finsky/protos/FileMetadata.java new file mode 100644 index 0000000..109e915 --- /dev/null +++ b/docs/com/google/android/finsky/protos/FileMetadata.java @@ -0,0 +1,162 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class FileMetadata extends MessageNano { + private static volatile FileMetadata[] _emptyArray; + public int fileType = 0; + public boolean hasFileType = false; + public int versionCode = 0; + public boolean hasVersionCode = false; + public long size = 0; + public boolean hasSize = false; + public long compressedSize = 0; + public boolean hasCompressedSize = false; + public PatchDetails[] patchDetails = PatchDetails.emptyArray(); + public String splitId = ""; + public boolean hasSplitId = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + this.fileType = readRawVarint32; + this.hasFileType = true; + continue; + } + case 16: + this.versionCode = x0.readRawVarint32(); + this.hasVersionCode = true; + break; + case 24: + this.size = x0.readRawVarint64(); + this.hasSize = true; + break; + case 34: + this.splitId = x0.readString(); + this.hasSplitId = true; + break; + case 40: + this.compressedSize = x0.readRawVarint64(); + this.hasCompressedSize = true; + break; + case 50: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 50); + if (this.patchDetails == null) { + length = 0; + } else { + length = this.patchDetails.length; + } + PatchDetails[] patchDetailsArr = new PatchDetails[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.patchDetails, 0, patchDetailsArr, 0, length); + } + while (length < patchDetailsArr.length - 1) { + patchDetailsArr[length] = new PatchDetails(); + x0.readMessage(patchDetailsArr[length]); + x0.readTag(); + length++; + } + patchDetailsArr[length] = new PatchDetails(); + x0.readMessage(patchDetailsArr[length]); + this.patchDetails = patchDetailsArr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static FileMetadata[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new FileMetadata[0]; + } + } + } + return _emptyArray; + } + + public FileMetadata() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.fileType != 0 || this.hasFileType) { + output.writeInt32(1, this.fileType); + } + if (this.hasVersionCode || this.versionCode != 0) { + output.writeInt32(2, this.versionCode); + } + if (this.hasSize || this.size != 0) { + output.writeInt64(3, this.size); + } + if (this.hasSplitId || !this.splitId.equals("")) { + output.writeString(4, this.splitId); + } + if (this.hasCompressedSize || this.compressedSize != 0) { + output.writeInt64(5, this.compressedSize); + } + if (this.patchDetails != null && this.patchDetails.length > 0) { + for (int i = 0; i < this.patchDetails.length; i++) { + PatchDetails element = this.patchDetails[i]; + if (element != null) { + output.writeMessage(6, element); + } + } + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.fileType != 0 || this.hasFileType) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.fileType); + } + if (this.hasVersionCode || this.versionCode != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(2, this.versionCode); + } + if (this.hasSize || this.size != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(3, this.size); + } + if (this.hasSplitId || !this.splitId.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(4, this.splitId); + } + if (this.hasCompressedSize || this.compressedSize != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(5, this.compressedSize); + } + if (this.patchDetails != null && this.patchDetails.length > 0) { + for (int i = 0; i < this.patchDetails.length; i++) { + PatchDetails element = this.patchDetails[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(6, element); + } + } + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/GetReviewsResponse.java b/docs/com/google/android/finsky/protos/GetReviewsResponse.java new file mode 100644 index 0000000..c027471 --- /dev/null +++ b/docs/com/google/android/finsky/protos/GetReviewsResponse.java @@ -0,0 +1,108 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class GetReviewsResponse extends MessageNano { + public Review[] review = Review.emptyArray(); + public ReviewTip tip = null; + public long matchingCount = 0; + public boolean hasMatchingCount = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10); + if (this.review == null) { + length = 0; + } else { + length = this.review.length; + } + Review[] reviewArr = new Review[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.review, 0, reviewArr, 0, length); + } + while (length < reviewArr.length - 1) { + reviewArr[length] = new Review(); + x0.readMessage(reviewArr[length]); + x0.readTag(); + length++; + } + reviewArr[length] = new Review(); + x0.readMessage(reviewArr[length]); + this.review = reviewArr; + break; + case 16: + this.matchingCount = x0.readRawVarint64(); + this.hasMatchingCount = true; + break; + case 26: + if (this.tip == null) { + this.tip = new ReviewTip(); + } + x0.readMessage(this.tip); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public GetReviewsResponse() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.review != null && this.review.length > 0) { + for (int i = 0; i < this.review.length; i++) { + Review element = this.review[i]; + if (element != null) { + output.writeMessage(1, element); + } + } + } + if (this.hasMatchingCount || this.matchingCount != 0) { + output.writeInt64(2, this.matchingCount); + } + if (this.tip != null) { + output.writeMessage(3, this.tip); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.review != null && this.review.length > 0) { + for (int i = 0; i < this.review.length; i++) { + Review element = this.review[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, element); + } + } + } + if (this.hasMatchingCount || this.matchingCount != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(2, this.matchingCount); + } + if (this.tip != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(3, this.tip); + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/InstallDetails.java b/docs/com/google/android/finsky/protos/InstallDetails.java new file mode 100644 index 0000000..78238d6 --- /dev/null +++ b/docs/com/google/android/finsky/protos/InstallDetails.java @@ -0,0 +1,125 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class InstallDetails extends MessageNano { + public int installLocation = 0; + public boolean hasInstallLocation = false; + public long size = 0; + public boolean hasSize = false; + public Dependency[] dependency = Dependency.emptyArray(); + public int targetSdkVersion = 0; + public boolean hasTargetSdkVersion = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + case 3: + this.installLocation = readRawVarint32; + this.hasInstallLocation = true; + continue; + } + case 16: + this.size = x0.readRawVarint64(); + this.hasSize = true; + break; + case 26: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 26); + if (this.dependency == null) { + length = 0; + } else { + length = this.dependency.length; + } + Dependency[] dependencyArr = new Dependency[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.dependency, 0, dependencyArr, 0, length); + } + while (length < dependencyArr.length - 1) { + dependencyArr[length] = new Dependency(); + x0.readMessage(dependencyArr[length]); + x0.readTag(); + length++; + } + dependencyArr[length] = new Dependency(); + x0.readMessage(dependencyArr[length]); + this.dependency = dependencyArr; + break; + case 32: + this.targetSdkVersion = x0.readRawVarint32(); + this.hasTargetSdkVersion = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public InstallDetails() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.installLocation != 0 || this.hasInstallLocation) { + output.writeInt32(1, this.installLocation); + } + if (this.hasSize || this.size != 0) { + output.writeInt64(2, this.size); + } + if (this.dependency != null && this.dependency.length > 0) { + for (int i = 0; i < this.dependency.length; i++) { + Dependency element = this.dependency[i]; + if (element != null) { + output.writeMessage(3, element); + } + } + } + if (this.hasTargetSdkVersion || this.targetSdkVersion != 0) { + output.writeInt32(4, this.targetSdkVersion); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.installLocation != 0 || this.hasInstallLocation) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.installLocation); + } + if (this.hasSize || this.size != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(2, this.size); + } + if (this.dependency != null && this.dependency.length > 0) { + for (int i = 0; i < this.dependency.length; i++) { + Dependency element = this.dependency[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, element); + } + } + } + if (this.hasTargetSdkVersion || this.targetSdkVersion != 0) { + return size + CodedOutputByteBufferNano.computeInt32Size(4, this.targetSdkVersion); + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/ListResponse.java b/docs/com/google/android/finsky/protos/ListResponse.java new file mode 100644 index 0000000..0508b5d --- /dev/null +++ b/docs/com/google/android/finsky/protos/ListResponse.java @@ -0,0 +1,122 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class ListResponse extends MessageNano { + public Bucket[] bucket = Bucket.emptyArray(); + public DocV2[] doc = DocV2.emptyArray(); + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + int length2; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10); + if (this.bucket == null) { + length2 = 0; + } else { + length2 = this.bucket.length; + } + Bucket[] bucketArr = new Bucket[repeatedFieldArrayLength + length2]; + if (length2 != 0) { + System.arraycopy(this.bucket, 0, bucketArr, 0, length2); + } + while (length2 < bucketArr.length - 1) { + bucketArr[length2] = new Bucket(); + x0.readMessage(bucketArr[length2]); + x0.readTag(); + length2++; + } + bucketArr[length2] = new Bucket(); + x0.readMessage(bucketArr[length2]); + this.bucket = bucketArr; + break; + case 18: + int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 18); + if (this.doc == null) { + length = 0; + } else { + length = this.doc.length; + } + DocV2[] docV2Arr = new DocV2[repeatedFieldArrayLength2 + length]; + if (length != 0) { + System.arraycopy(this.doc, 0, docV2Arr, 0, length); + } + while (length < docV2Arr.length - 1) { + docV2Arr[length] = new DocV2(); + x0.readMessage(docV2Arr[length]); + x0.readTag(); + length++; + } + docV2Arr[length] = new DocV2(); + x0.readMessage(docV2Arr[length]); + this.doc = docV2Arr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public ListResponse() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.bucket != null && this.bucket.length > 0) { + for (int i = 0; i < this.bucket.length; i++) { + Bucket element = this.bucket[i]; + if (element != null) { + output.writeMessage(1, element); + } + } + } + if (this.doc != null && this.doc.length > 0) { + for (int i2 = 0; i2 < this.doc.length; i2++) { + DocV2 element2 = this.doc[i2]; + if (element2 != null) { + output.writeMessage(2, element2); + } + } + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.bucket != null && this.bucket.length > 0) { + for (int i = 0; i < this.bucket.length; i++) { + Bucket element = this.bucket[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, element); + } + } + } + if (this.doc != null && this.doc.length > 0) { + for (int i2 = 0; i2 < this.doc.length; i2++) { + DocV2 element2 = this.doc[i2]; + if (element2 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, element2); + } + } + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/PreFetch.java b/docs/com/google/android/finsky/protos/PreFetch.java new file mode 100644 index 0000000..d0cfd94 --- /dev/null +++ b/docs/com/google/android/finsky/protos/PreFetch.java @@ -0,0 +1,118 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +import java.util.Arrays; +/* loaded from: classes.dex */ +public final class PreFetch extends MessageNano { + private static volatile PreFetch[] _emptyArray; + public String url = ""; + public boolean hasUrl = false; + public byte[] response = WireFormatNano.EMPTY_BYTES; + public boolean hasResponse = false; + public String etag = ""; + public boolean hasEtag = false; + public long ttl = 0; + public boolean hasTtl = false; + public long softTtl = 0; + public boolean hasSoftTtl = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.url = x0.readString(); + this.hasUrl = true; + break; + case 18: + this.response = x0.readBytes(); + this.hasResponse = true; + break; + case 26: + this.etag = x0.readString(); + this.hasEtag = true; + break; + case 32: + this.ttl = x0.readRawVarint64(); + this.hasTtl = true; + break; + case 40: + this.softTtl = x0.readRawVarint64(); + this.hasSoftTtl = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static PreFetch[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new PreFetch[0]; + } + } + } + return _emptyArray; + } + + public PreFetch() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasUrl || !this.url.equals("")) { + output.writeString(1, this.url); + } + if (this.hasResponse || !Arrays.equals(this.response, WireFormatNano.EMPTY_BYTES)) { + output.writeBytes(2, this.response); + } + if (this.hasEtag || !this.etag.equals("")) { + output.writeString(3, this.etag); + } + if (this.hasTtl || this.ttl != 0) { + output.writeInt64(4, this.ttl); + } + if (this.hasSoftTtl || this.softTtl != 0) { + output.writeInt64(5, this.softTtl); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasUrl || !this.url.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.url); + } + if (this.hasResponse || !Arrays.equals(this.response, WireFormatNano.EMPTY_BYTES)) { + size += CodedOutputByteBufferNano.computeBytesSize(2, this.response); + } + if (this.hasEtag || !this.etag.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.etag); + } + if (this.hasTtl || this.ttl != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(4, this.ttl); + } + if (this.hasSoftTtl || this.softTtl != 0) { + return size + CodedOutputByteBufferNano.computeInt64Size(5, this.softTtl); + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/Rating.java b/docs/com/google/android/finsky/protos/Rating.java new file mode 100644 index 0000000..201bdab --- /dev/null +++ b/docs/com/google/android/finsky/protos/Rating.java @@ -0,0 +1,390 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public interface Rating { + + /* loaded from: classes.dex */ + public static final class AggregateRating extends MessageNano { + public int type = 1; + public boolean hasType = false; + public float starRating = 0.0f; + public boolean hasStarRating = false; + public long ratingsCount = 0; + public boolean hasRatingsCount = false; + public long commentCount = 0; + public boolean hasCommentCount = false; + public long oneStarRatings = 0; + public boolean hasOneStarRatings = false; + public long twoStarRatings = 0; + public boolean hasTwoStarRatings = false; + public long threeStarRatings = 0; + public boolean hasThreeStarRatings = false; + public long fourStarRatings = 0; + public boolean hasFourStarRatings = false; + public long fiveStarRatings = 0; + public boolean hasFiveStarRatings = false; + public double bayesianMeanRating = 0.0d; + public boolean hasBayesianMeanRating = false; + public long thumbsUpCount = 0; + public boolean hasThumbsUpCount = false; + public long thumbsDownCount = 0; + public boolean hasThumbsDownCount = false; + public Tip[] tip = Tip.emptyArray(); + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 1: + case 2: + case 3: + this.type = readRawVarint32; + this.hasType = true; + continue; + } + case 21: + this.starRating = Float.intBitsToFloat(x0.readRawLittleEndian32()); + this.hasStarRating = true; + break; + case 24: + this.ratingsCount = x0.readRawVarint64(); + this.hasRatingsCount = true; + break; + case 32: + this.oneStarRatings = x0.readRawVarint64(); + this.hasOneStarRatings = true; + break; + case 40: + this.twoStarRatings = x0.readRawVarint64(); + this.hasTwoStarRatings = true; + break; + case 48: + this.threeStarRatings = x0.readRawVarint64(); + this.hasThreeStarRatings = true; + break; + case 56: + this.fourStarRatings = x0.readRawVarint64(); + this.hasFourStarRatings = true; + break; + case 64: + this.fiveStarRatings = x0.readRawVarint64(); + this.hasFiveStarRatings = true; + break; + case 72: + this.thumbsUpCount = x0.readRawVarint64(); + this.hasThumbsUpCount = true; + break; + case 80: + this.thumbsDownCount = x0.readRawVarint64(); + this.hasThumbsDownCount = true; + break; + case 88: + this.commentCount = x0.readRawVarint64(); + this.hasCommentCount = true; + break; + case 97: + this.bayesianMeanRating = Double.longBitsToDouble(x0.readRawLittleEndian64()); + this.hasBayesianMeanRating = true; + break; + case 106: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 106); + if (this.tip == null) { + length = 0; + } else { + length = this.tip.length; + } + Tip[] tipArr = new Tip[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.tip, 0, tipArr, 0, length); + } + while (length < tipArr.length - 1) { + tipArr[length] = new Tip(); + x0.readMessage(tipArr[length]); + x0.readTag(); + length++; + } + tipArr[length] = new Tip(); + x0.readMessage(tipArr[length]); + this.tip = tipArr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public AggregateRating() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.type != 1 || this.hasType) { + output.writeInt32(1, this.type); + } + if (this.hasStarRating || Float.floatToIntBits(this.starRating) != Float.floatToIntBits(0.0f)) { + output.writeFloat(2, this.starRating); + } + if (this.hasRatingsCount || this.ratingsCount != 0) { + output.writeUInt64(3, this.ratingsCount); + } + if (this.hasOneStarRatings || this.oneStarRatings != 0) { + output.writeUInt64(4, this.oneStarRatings); + } + if (this.hasTwoStarRatings || this.twoStarRatings != 0) { + output.writeUInt64(5, this.twoStarRatings); + } + if (this.hasThreeStarRatings || this.threeStarRatings != 0) { + output.writeUInt64(6, this.threeStarRatings); + } + if (this.hasFourStarRatings || this.fourStarRatings != 0) { + output.writeUInt64(7, this.fourStarRatings); + } + if (this.hasFiveStarRatings || this.fiveStarRatings != 0) { + output.writeUInt64(8, this.fiveStarRatings); + } + if (this.hasThumbsUpCount || this.thumbsUpCount != 0) { + output.writeUInt64(9, this.thumbsUpCount); + } + if (this.hasThumbsDownCount || this.thumbsDownCount != 0) { + output.writeUInt64(10, this.thumbsDownCount); + } + if (this.hasCommentCount || this.commentCount != 0) { + output.writeUInt64(11, this.commentCount); + } + if (this.hasBayesianMeanRating || Double.doubleToLongBits(this.bayesianMeanRating) != Double.doubleToLongBits(0.0d)) { + output.writeDouble(12, this.bayesianMeanRating); + } + if (this.tip != null && this.tip.length > 0) { + for (int i = 0; i < this.tip.length; i++) { + Tip element = this.tip[i]; + if (element != null) { + output.writeMessage(13, element); + } + } + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.type != 1 || this.hasType) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.type); + } + if (this.hasStarRating || Float.floatToIntBits(this.starRating) != Float.floatToIntBits(0.0f)) { + size += CodedOutputByteBufferNano.computeTagSize(2) + 4; + } + if (this.hasRatingsCount || this.ratingsCount != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(3, this.ratingsCount); + } + if (this.hasOneStarRatings || this.oneStarRatings != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(4, this.oneStarRatings); + } + if (this.hasTwoStarRatings || this.twoStarRatings != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(5, this.twoStarRatings); + } + if (this.hasThreeStarRatings || this.threeStarRatings != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(6, this.threeStarRatings); + } + if (this.hasFourStarRatings || this.fourStarRatings != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(7, this.fourStarRatings); + } + if (this.hasFiveStarRatings || this.fiveStarRatings != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(8, this.fiveStarRatings); + } + if (this.hasThumbsUpCount || this.thumbsUpCount != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(9, this.thumbsUpCount); + } + if (this.hasThumbsDownCount || this.thumbsDownCount != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(10, this.thumbsDownCount); + } + if (this.hasCommentCount || this.commentCount != 0) { + size += CodedOutputByteBufferNano.computeUInt64Size(11, this.commentCount); + } + if (this.hasBayesianMeanRating || Double.doubleToLongBits(this.bayesianMeanRating) != Double.doubleToLongBits(0.0d)) { + size += CodedOutputByteBufferNano.computeTagSize(12) + 8; + } + if (this.tip != null && this.tip.length > 0) { + for (int i = 0; i < this.tip.length; i++) { + Tip element = this.tip[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(13, element); + } + } + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class Tip extends MessageNano { + private static volatile Tip[] _emptyArray; + public String tipId = ""; + public boolean hasTipId = false; + public String text = ""; + public boolean hasText = false; + public int polarity = 0; + public boolean hasPolarity = false; + public long reviewCount = 0; + public boolean hasReviewCount = false; + public String language = ""; + public boolean hasLanguage = false; + public String[] snippetReviewId = WireFormatNano.EMPTY_STRING_ARRAY; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.tipId = x0.readString(); + this.hasTipId = true; + break; + case 18: + this.text = x0.readString(); + this.hasText = true; + break; + case 24: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 0: + case 1: + case 2: + this.polarity = readRawVarint32; + this.hasPolarity = true; + continue; + } + case 32: + this.reviewCount = x0.readRawVarint64(); + this.hasReviewCount = true; + break; + case 42: + this.language = x0.readString(); + this.hasLanguage = true; + break; + case 50: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 50); + int length = this.snippetReviewId == null ? 0 : this.snippetReviewId.length; + String[] strArr = new String[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.snippetReviewId, 0, strArr, 0, length); + } + while (length < strArr.length - 1) { + strArr[length] = x0.readString(); + x0.readTag(); + length++; + } + strArr[length] = x0.readString(); + this.snippetReviewId = strArr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static Tip[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new Tip[0]; + } + } + } + return _emptyArray; + } + + public Tip() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasTipId || !this.tipId.equals("")) { + output.writeString(1, this.tipId); + } + if (this.hasText || !this.text.equals("")) { + output.writeString(2, this.text); + } + if (this.polarity != 0 || this.hasPolarity) { + output.writeInt32(3, this.polarity); + } + if (this.hasReviewCount || this.reviewCount != 0) { + output.writeInt64(4, this.reviewCount); + } + if (this.hasLanguage || !this.language.equals("")) { + output.writeString(5, this.language); + } + if (this.snippetReviewId != null && this.snippetReviewId.length > 0) { + for (int i = 0; i < this.snippetReviewId.length; i++) { + String element = this.snippetReviewId[i]; + if (element != null) { + output.writeString(6, element); + } + } + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasTipId || !this.tipId.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.tipId); + } + if (this.hasText || !this.text.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.text); + } + if (this.polarity != 0 || this.hasPolarity) { + size += CodedOutputByteBufferNano.computeInt32Size(3, this.polarity); + } + if (this.hasReviewCount || this.reviewCount != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(4, this.reviewCount); + } + if (this.hasLanguage || !this.language.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(5, this.language); + } + if (this.snippetReviewId == null || this.snippetReviewId.length <= 0) { + return size; + } + int dataCount = 0; + int dataSize = 0; + for (int i = 0; i < this.snippetReviewId.length; i++) { + String element = this.snippetReviewId[i]; + if (element != null) { + dataCount++; + dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element); + } + } + return size + dataSize + (dataCount * 1); + } + } +} diff --git a/docs/com/google/android/finsky/protos/Response.java b/docs/com/google/android/finsky/protos/Response.java new file mode 100644 index 0000000..54969b0 --- /dev/null +++ b/docs/com/google/android/finsky/protos/Response.java @@ -0,0 +1,1152 @@ +package com.google.android.finsky.protos; + +import com.google.android.finsky.protos.Browse; +import com.google.android.finsky.protos.Buy; +import com.google.android.finsky.protos.BuyInstruments; +import com.google.android.finsky.protos.CarrierBilling; +import com.google.android.finsky.protos.ContentFilters; +import com.google.android.finsky.protos.ContentFlagging; +import com.google.android.finsky.protos.Details; +import com.google.android.finsky.protos.Log; +import com.google.android.finsky.protos.ModifyLibrary; +import com.google.android.finsky.protos.Preloads; +import com.google.android.finsky.protos.PromoCode; +import com.google.android.finsky.protos.Purchase; +import com.google.android.finsky.protos.ResolveLink; +import com.google.android.finsky.protos.Restore; +import com.google.android.finsky.protos.Search; +import com.google.android.finsky.protos.SearchSuggest; +import com.google.android.finsky.protos.SharingSetting; +import com.google.android.finsky.protos.Toc; +import com.google.android.finsky.protos.UploadDeviceConfig; +import com.google.android.finsky.protos.UserActivity; +import com.google.android.finsky.protos.UserRefund; +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InvalidProtocolBufferNanoException; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public interface Response { + + /* loaded from: classes.dex */ + public static final class ResponseWrapper extends MessageNano { + public Payload payload = null; + public ServerCommands commands = null; + public PreFetch[] preFetch = PreFetch.emptyArray(); + public Notification[] notification = Notification.emptyArray(); + public ServerMetadata serverMetadata = null; + public Targets targets = null; + public ServerCookies serverCookies = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + int length2; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.payload == null) { + this.payload = new Payload(); + } + x0.readMessage(this.payload); + break; + case 18: + if (this.commands == null) { + this.commands = new ServerCommands(); + } + x0.readMessage(this.commands); + break; + case 26: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 26); + if (this.preFetch == null) { + length2 = 0; + } else { + length2 = this.preFetch.length; + } + PreFetch[] preFetchArr = new PreFetch[repeatedFieldArrayLength + length2]; + if (length2 != 0) { + System.arraycopy(this.preFetch, 0, preFetchArr, 0, length2); + } + while (length2 < preFetchArr.length - 1) { + preFetchArr[length2] = new PreFetch(); + x0.readMessage(preFetchArr[length2]); + x0.readTag(); + length2++; + } + preFetchArr[length2] = new PreFetch(); + x0.readMessage(preFetchArr[length2]); + this.preFetch = preFetchArr; + break; + case 34: + int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 34); + if (this.notification == null) { + length = 0; + } else { + length = this.notification.length; + } + Notification[] notificationArr = new Notification[repeatedFieldArrayLength2 + length]; + if (length != 0) { + System.arraycopy(this.notification, 0, notificationArr, 0, length); + } + while (length < notificationArr.length - 1) { + notificationArr[length] = new Notification(); + x0.readMessage(notificationArr[length]); + x0.readTag(); + length++; + } + notificationArr[length] = new Notification(); + x0.readMessage(notificationArr[length]); + this.notification = notificationArr; + break; + case 42: + if (this.serverMetadata == null) { + this.serverMetadata = new ServerMetadata(); + } + x0.readMessage(this.serverMetadata); + break; + case 50: + if (this.targets == null) { + this.targets = new Targets(); + } + x0.readMessage(this.targets); + break; + case 58: + if (this.serverCookies == null) { + this.serverCookies = new ServerCookies(); + } + x0.readMessage(this.serverCookies); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public ResponseWrapper() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.payload != null) { + output.writeMessage(1, this.payload); + } + if (this.commands != null) { + output.writeMessage(2, this.commands); + } + if (this.preFetch != null && this.preFetch.length > 0) { + for (int i = 0; i < this.preFetch.length; i++) { + PreFetch element = this.preFetch[i]; + if (element != null) { + output.writeMessage(3, element); + } + } + } + if (this.notification != null && this.notification.length > 0) { + for (int i2 = 0; i2 < this.notification.length; i2++) { + Notification element2 = this.notification[i2]; + if (element2 != null) { + output.writeMessage(4, element2); + } + } + } + if (this.serverMetadata != null) { + output.writeMessage(5, this.serverMetadata); + } + if (this.targets != null) { + output.writeMessage(6, this.targets); + } + if (this.serverCookies != null) { + output.writeMessage(7, this.serverCookies); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.payload != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.payload); + } + if (this.commands != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.commands); + } + if (this.preFetch != null && this.preFetch.length > 0) { + for (int i = 0; i < this.preFetch.length; i++) { + PreFetch element = this.preFetch[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, element); + } + } + } + if (this.notification != null && this.notification.length > 0) { + for (int i2 = 0; i2 < this.notification.length; i2++) { + Notification element2 = this.notification[i2]; + if (element2 != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, element2); + } + } + } + if (this.serverMetadata != null) { + size += CodedOutputByteBufferNano.computeMessageSize(5, this.serverMetadata); + } + if (this.targets != null) { + size += CodedOutputByteBufferNano.computeMessageSize(6, this.targets); + } + if (this.serverCookies != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(7, this.serverCookies); + } + return size; + } + + public static ResponseWrapper parseFrom(byte[] data) throws InvalidProtocolBufferNanoException { + return (ResponseWrapper) MessageNano.mergeFrom$1ec43da(new ResponseWrapper(), data, data.length); + } + } + + /* loaded from: classes.dex */ + public static final class Payload extends MessageNano { + public ListResponse listResponse = null; + public Details.DetailsResponse detailsResponse = null; + public ReviewResponse reviewResponse = null; + public Buy.BuyResponse buyResponse = null; + public Search.SearchResponse searchResponse = null; + public Toc.TocResponse tocResponse = null; + public Browse.BrowseResponse browseResponse = null; + public Buy.PurchaseStatusResponse purchaseStatusResponse = null; + public BuyInstruments.UpdateInstrumentResponse updateInstrumentResponse = null; + public Log.LogResponse logResponse = null; + public BuyInstruments.CheckInstrumentResponse checkInstrumentResponse = null; + public PlusOneResponse plusOneResponse = null; + public ContentFlagging.FlagContentResponse flagContentResponse = null; + public AckNotificationResponse ackNotificationResponse = null; + public CarrierBilling.InitiateAssociationResponse initiateAssociationResponse = null; + public CarrierBilling.VerifyAssociationResponse verifyAssociationResponse = null; + public LibraryReplicationResponse libraryReplicationResponse = null; + public RevokeResponse revokeResponse = null; + public Details.BulkDetailsResponse bulkDetailsResponse = null; + public ResolveLink.ResolvedLink resolveLinkResponse = null; + public DeliveryResponse deliveryResponse = null; + public AcceptTosResponse acceptTosResponse = null; + public RateSuggestedContentResponse rateSuggestedContentResponse = null; + public CheckPromoOfferResponse checkPromoOfferResponse = null; + public BuyInstruments.InstrumentSetupInfoResponse instrumentSetupInfoResponse = null; + public BuyInstruments.RedeemGiftCardResponse redeemGiftCardResponse = null; + public ModifyLibrary.ModifyLibraryResponse modifyLibraryResponse = null; + public UploadDeviceConfig.UploadDeviceConfigResponse uploadDeviceConfigResponse = null; + public PlusProfileResponse plusProfileResponse = null; + public ConsumePurchaseResponse consumePurchaseResponse = null; + public BuyInstruments.BillingProfileResponse billingProfileResponse = null; + public Purchase.PreparePurchaseResponse preparePurchaseResponse = null; + public Purchase.CommitPurchaseResponse commitPurchaseResponse = null; + public DebugSettingsResponse debugSettingsResponse = null; + public BuyInstruments.CheckIabPromoResponse checkIabPromoResponse = null; + public UserActivity.UserActivitySettingsResponse userActivitySettingsResponse = null; + public UserActivity.RecordUserActivityResponse recordUserActivityResponse = null; + public PromoCode.RedeemCodeResponse redeemCodeResponse = null; + public SelfUpdateResponse selfUpdateResponse = null; + public SearchSuggest.SearchSuggestResponse searchSuggestResponse = null; + public BuyInstruments.GetInitialInstrumentFlowStateResponse getInitialInstrumentFlowStateResponse = null; + public BuyInstruments.CreateInstrumentResponse createInstrumentResponse = null; + public ChallengeResponse challengeResponse = null; + public Restore.GetBackupDeviceChoicesResponse backupDeviceChoicesResponse = null; + public Restore.GetBackupDocumentChoicesResponse backupDocumentChoicesResponse = null; + public EarlyUpdateResponse earlyUpdateResponse = null; + public Preloads.PreloadsResponse preloadsResponse = null; + public MyAccountResponse myAccountResponse = null; + public ContentFilters.ContentFilterSettingsResponse contentFilterResponse = null; + public ExperimentsResponse experimentsResponse = null; + public SurveyResponse surveyResponse = null; + public PingResponse pingResponse = null; + public UpdateUserSettingResponse updateUserSettingResponse = null; + public GetUserSettingsResponse getUserSettingsResponse = null; + public SharingSetting.GetFamilySharingSettingsResponse getSharingSettingsResponse = null; + public SharingSetting.UpdateFamilySharingSettingsResponse updateSharingSettingsResponse = null; + public ReviewSnippetsResponse reviewSnippetsResponse = null; + public DocumentSharingStateResponse documentSharingStateResponse = null; + public GetFamilyPurchaseSettingResponse getFamilyPurchaseSettingResponse = null; + public SetFamilyPurchaseSettingResponse setFamilyPurchaseSettingReponse = null; + public DismissSurveyResponse dismissSurveyResponse = null; + public Purchase.InstantPurchaseResponse instantPurchaseResponse = null; + public FamilyFopResponse familyFopResponse = null; + public MonetaryGiftDetailsResponse monetaryGiftDetailsResponse = null; + public GiftDialogDetailsResponse giftDialogDetailsResponse = null; + public Purchase.InAppPurchaseHistoryResponse inAppPurchaseHistoryResponse = null; + public UserRefund.PrepareUserRefundResponse prepareUserRefundResponse = null; + public UserRefund.CommitUserRefundResponse commitUserRefundResponse = null; + public ModuleDeliveryResponse moduleDeliveryResponse = null; + + public Payload() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.listResponse != null) { + output.writeMessage(1, this.listResponse); + } + if (this.detailsResponse != null) { + output.writeMessage(2, this.detailsResponse); + } + if (this.reviewResponse != null) { + output.writeMessage(3, this.reviewResponse); + } + if (this.buyResponse != null) { + output.writeMessage(4, this.buyResponse); + } + if (this.searchResponse != null) { + output.writeMessage(5, this.searchResponse); + } + if (this.tocResponse != null) { + output.writeMessage(6, this.tocResponse); + } + if (this.browseResponse != null) { + output.writeMessage(7, this.browseResponse); + } + if (this.purchaseStatusResponse != null) { + output.writeMessage(8, this.purchaseStatusResponse); + } + if (this.updateInstrumentResponse != null) { + output.writeMessage(9, this.updateInstrumentResponse); + } + if (this.logResponse != null) { + output.writeMessage(10, this.logResponse); + } + if (this.checkInstrumentResponse != null) { + output.writeMessage(11, this.checkInstrumentResponse); + } + if (this.plusOneResponse != null) { + output.writeMessage(12, this.plusOneResponse); + } + if (this.flagContentResponse != null) { + output.writeMessage(13, this.flagContentResponse); + } + if (this.ackNotificationResponse != null) { + output.writeMessage(14, this.ackNotificationResponse); + } + if (this.initiateAssociationResponse != null) { + output.writeMessage(15, this.initiateAssociationResponse); + } + if (this.verifyAssociationResponse != null) { + output.writeMessage(16, this.verifyAssociationResponse); + } + if (this.libraryReplicationResponse != null) { + output.writeMessage(17, this.libraryReplicationResponse); + } + if (this.revokeResponse != null) { + output.writeMessage(18, this.revokeResponse); + } + if (this.bulkDetailsResponse != null) { + output.writeMessage(19, this.bulkDetailsResponse); + } + if (this.resolveLinkResponse != null) { + output.writeMessage(20, this.resolveLinkResponse); + } + if (this.deliveryResponse != null) { + output.writeMessage(21, this.deliveryResponse); + } + if (this.acceptTosResponse != null) { + output.writeMessage(22, this.acceptTosResponse); + } + if (this.rateSuggestedContentResponse != null) { + output.writeMessage(23, this.rateSuggestedContentResponse); + } + if (this.checkPromoOfferResponse != null) { + output.writeMessage(24, this.checkPromoOfferResponse); + } + if (this.instrumentSetupInfoResponse != null) { + output.writeMessage(25, this.instrumentSetupInfoResponse); + } + if (this.redeemGiftCardResponse != null) { + output.writeMessage(26, this.redeemGiftCardResponse); + } + if (this.modifyLibraryResponse != null) { + output.writeMessage(27, this.modifyLibraryResponse); + } + if (this.uploadDeviceConfigResponse != null) { + output.writeMessage(28, this.uploadDeviceConfigResponse); + } + if (this.plusProfileResponse != null) { + output.writeMessage(29, this.plusProfileResponse); + } + if (this.consumePurchaseResponse != null) { + output.writeMessage(30, this.consumePurchaseResponse); + } + if (this.billingProfileResponse != null) { + output.writeMessage(31, this.billingProfileResponse); + } + if (this.preparePurchaseResponse != null) { + output.writeMessage(32, this.preparePurchaseResponse); + } + if (this.commitPurchaseResponse != null) { + output.writeMessage(33, this.commitPurchaseResponse); + } + if (this.debugSettingsResponse != null) { + output.writeMessage(34, this.debugSettingsResponse); + } + if (this.checkIabPromoResponse != null) { + output.writeMessage(35, this.checkIabPromoResponse); + } + if (this.userActivitySettingsResponse != null) { + output.writeMessage(36, this.userActivitySettingsResponse); + } + if (this.recordUserActivityResponse != null) { + output.writeMessage(37, this.recordUserActivityResponse); + } + if (this.redeemCodeResponse != null) { + output.writeMessage(38, this.redeemCodeResponse); + } + if (this.selfUpdateResponse != null) { + output.writeMessage(39, this.selfUpdateResponse); + } + if (this.searchSuggestResponse != null) { + output.writeMessage(40, this.searchSuggestResponse); + } + if (this.getInitialInstrumentFlowStateResponse != null) { + output.writeMessage(41, this.getInitialInstrumentFlowStateResponse); + } + if (this.createInstrumentResponse != null) { + output.writeMessage(42, this.createInstrumentResponse); + } + if (this.challengeResponse != null) { + output.writeMessage(43, this.challengeResponse); + } + if (this.backupDeviceChoicesResponse != null) { + output.writeMessage(44, this.backupDeviceChoicesResponse); + } + if (this.backupDocumentChoicesResponse != null) { + output.writeMessage(45, this.backupDocumentChoicesResponse); + } + if (this.earlyUpdateResponse != null) { + output.writeMessage(46, this.earlyUpdateResponse); + } + if (this.preloadsResponse != null) { + output.writeMessage(47, this.preloadsResponse); + } + if (this.myAccountResponse != null) { + output.writeMessage(48, this.myAccountResponse); + } + if (this.contentFilterResponse != null) { + output.writeMessage(49, this.contentFilterResponse); + } + if (this.experimentsResponse != null) { + output.writeMessage(50, this.experimentsResponse); + } + if (this.surveyResponse != null) { + output.writeMessage(51, this.surveyResponse); + } + if (this.pingResponse != null) { + output.writeMessage(52, this.pingResponse); + } + if (this.updateUserSettingResponse != null) { + output.writeMessage(53, this.updateUserSettingResponse); + } + if (this.getUserSettingsResponse != null) { + output.writeMessage(54, this.getUserSettingsResponse); + } + if (this.getSharingSettingsResponse != null) { + output.writeMessage(56, this.getSharingSettingsResponse); + } + if (this.updateSharingSettingsResponse != null) { + output.writeMessage(57, this.updateSharingSettingsResponse); + } + if (this.reviewSnippetsResponse != null) { + output.writeMessage(58, this.reviewSnippetsResponse); + } + if (this.documentSharingStateResponse != null) { + output.writeMessage(59, this.documentSharingStateResponse); + } + if (this.getFamilyPurchaseSettingResponse != null) { + output.writeMessage(60, this.getFamilyPurchaseSettingResponse); + } + if (this.setFamilyPurchaseSettingReponse != null) { + output.writeMessage(61, this.setFamilyPurchaseSettingReponse); + } + if (this.dismissSurveyResponse != null) { + output.writeMessage(62, this.dismissSurveyResponse); + } + if (this.instantPurchaseResponse != null) { + output.writeMessage(63, this.instantPurchaseResponse); + } + if (this.familyFopResponse != null) { + output.writeMessage(64, this.familyFopResponse); + } + if (this.monetaryGiftDetailsResponse != null) { + output.writeMessage(65, this.monetaryGiftDetailsResponse); + } + if (this.giftDialogDetailsResponse != null) { + output.writeMessage(66, this.giftDialogDetailsResponse); + } + if (this.inAppPurchaseHistoryResponse != null) { + output.writeMessage(67, this.inAppPurchaseHistoryResponse); + } + if (this.prepareUserRefundResponse != null) { + output.writeMessage(68, this.prepareUserRefundResponse); + } + if (this.commitUserRefundResponse != null) { + output.writeMessage(69, this.commitUserRefundResponse); + } + if (this.moduleDeliveryResponse != null) { + output.writeMessage(70, this.moduleDeliveryResponse); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.listResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.listResponse); + } + if (this.detailsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(2, this.detailsResponse); + } + if (this.reviewResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.reviewResponse); + } + if (this.buyResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, this.buyResponse); + } + if (this.searchResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(5, this.searchResponse); + } + if (this.tocResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(6, this.tocResponse); + } + if (this.browseResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(7, this.browseResponse); + } + if (this.purchaseStatusResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(8, this.purchaseStatusResponse); + } + if (this.updateInstrumentResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(9, this.updateInstrumentResponse); + } + if (this.logResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(10, this.logResponse); + } + if (this.checkInstrumentResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(11, this.checkInstrumentResponse); + } + if (this.plusOneResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(12, this.plusOneResponse); + } + if (this.flagContentResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(13, this.flagContentResponse); + } + if (this.ackNotificationResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(14, this.ackNotificationResponse); + } + if (this.initiateAssociationResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(15, this.initiateAssociationResponse); + } + if (this.verifyAssociationResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(16, this.verifyAssociationResponse); + } + if (this.libraryReplicationResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(17, this.libraryReplicationResponse); + } + if (this.revokeResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(18, this.revokeResponse); + } + if (this.bulkDetailsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(19, this.bulkDetailsResponse); + } + if (this.resolveLinkResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(20, this.resolveLinkResponse); + } + if (this.deliveryResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(21, this.deliveryResponse); + } + if (this.acceptTosResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(22, this.acceptTosResponse); + } + if (this.rateSuggestedContentResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(23, this.rateSuggestedContentResponse); + } + if (this.checkPromoOfferResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(24, this.checkPromoOfferResponse); + } + if (this.instrumentSetupInfoResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(25, this.instrumentSetupInfoResponse); + } + if (this.redeemGiftCardResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(26, this.redeemGiftCardResponse); + } + if (this.modifyLibraryResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(27, this.modifyLibraryResponse); + } + if (this.uploadDeviceConfigResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(28, this.uploadDeviceConfigResponse); + } + if (this.plusProfileResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(29, this.plusProfileResponse); + } + if (this.consumePurchaseResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(30, this.consumePurchaseResponse); + } + if (this.billingProfileResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(31, this.billingProfileResponse); + } + if (this.preparePurchaseResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(32, this.preparePurchaseResponse); + } + if (this.commitPurchaseResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(33, this.commitPurchaseResponse); + } + if (this.debugSettingsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(34, this.debugSettingsResponse); + } + if (this.checkIabPromoResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(35, this.checkIabPromoResponse); + } + if (this.userActivitySettingsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(36, this.userActivitySettingsResponse); + } + if (this.recordUserActivityResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(37, this.recordUserActivityResponse); + } + if (this.redeemCodeResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(38, this.redeemCodeResponse); + } + if (this.selfUpdateResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(39, this.selfUpdateResponse); + } + if (this.searchSuggestResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(40, this.searchSuggestResponse); + } + if (this.getInitialInstrumentFlowStateResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(41, this.getInitialInstrumentFlowStateResponse); + } + if (this.createInstrumentResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(42, this.createInstrumentResponse); + } + if (this.challengeResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(43, this.challengeResponse); + } + if (this.backupDeviceChoicesResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(44, this.backupDeviceChoicesResponse); + } + if (this.backupDocumentChoicesResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(45, this.backupDocumentChoicesResponse); + } + if (this.earlyUpdateResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(46, this.earlyUpdateResponse); + } + if (this.preloadsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(47, this.preloadsResponse); + } + if (this.myAccountResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(48, this.myAccountResponse); + } + if (this.contentFilterResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(49, this.contentFilterResponse); + } + if (this.experimentsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(50, this.experimentsResponse); + } + if (this.surveyResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(51, this.surveyResponse); + } + if (this.pingResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(52, this.pingResponse); + } + if (this.updateUserSettingResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(53, this.updateUserSettingResponse); + } + if (this.getUserSettingsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(54, this.getUserSettingsResponse); + } + if (this.getSharingSettingsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(56, this.getSharingSettingsResponse); + } + if (this.updateSharingSettingsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(57, this.updateSharingSettingsResponse); + } + if (this.reviewSnippetsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(58, this.reviewSnippetsResponse); + } + if (this.documentSharingStateResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(59, this.documentSharingStateResponse); + } + if (this.getFamilyPurchaseSettingResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(60, this.getFamilyPurchaseSettingResponse); + } + if (this.setFamilyPurchaseSettingReponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(61, this.setFamilyPurchaseSettingReponse); + } + if (this.dismissSurveyResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(62, this.dismissSurveyResponse); + } + if (this.instantPurchaseResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(63, this.instantPurchaseResponse); + } + if (this.familyFopResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(64, this.familyFopResponse); + } + if (this.monetaryGiftDetailsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(65, this.monetaryGiftDetailsResponse); + } + if (this.giftDialogDetailsResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(66, this.giftDialogDetailsResponse); + } + if (this.inAppPurchaseHistoryResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(67, this.inAppPurchaseHistoryResponse); + } + if (this.prepareUserRefundResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(68, this.prepareUserRefundResponse); + } + if (this.commitUserRefundResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(69, this.commitUserRefundResponse); + } + if (this.moduleDeliveryResponse != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(70, this.moduleDeliveryResponse); + } + return size; + } + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.listResponse == null) { + this.listResponse = new ListResponse(); + } + x0.readMessage(this.listResponse); + break; + case 18: + if (this.detailsResponse == null) { + this.detailsResponse = new Details.DetailsResponse(); + } + x0.readMessage(this.detailsResponse); + break; + case 26: + if (this.reviewResponse == null) { + this.reviewResponse = new ReviewResponse(); + } + x0.readMessage(this.reviewResponse); + break; + case 34: + if (this.buyResponse == null) { + this.buyResponse = new Buy.BuyResponse(); + } + x0.readMessage(this.buyResponse); + break; + case 42: + if (this.searchResponse == null) { + this.searchResponse = new Search.SearchResponse(); + } + x0.readMessage(this.searchResponse); + break; + case 50: + if (this.tocResponse == null) { + this.tocResponse = new Toc.TocResponse(); + } + x0.readMessage(this.tocResponse); + break; + case 58: + if (this.browseResponse == null) { + this.browseResponse = new Browse.BrowseResponse(); + } + x0.readMessage(this.browseResponse); + break; + case 66: + if (this.purchaseStatusResponse == null) { + this.purchaseStatusResponse = new Buy.PurchaseStatusResponse(); + } + x0.readMessage(this.purchaseStatusResponse); + break; + case 74: + if (this.updateInstrumentResponse == null) { + this.updateInstrumentResponse = new BuyInstruments.UpdateInstrumentResponse(); + } + x0.readMessage(this.updateInstrumentResponse); + break; + case 82: + if (this.logResponse == null) { + this.logResponse = new Log.LogResponse(); + } + x0.readMessage(this.logResponse); + break; + case 90: + if (this.checkInstrumentResponse == null) { + this.checkInstrumentResponse = new BuyInstruments.CheckInstrumentResponse(); + } + x0.readMessage(this.checkInstrumentResponse); + break; + case 98: + if (this.plusOneResponse == null) { + this.plusOneResponse = new PlusOneResponse(); + } + x0.readMessage(this.plusOneResponse); + break; + case 106: + if (this.flagContentResponse == null) { + this.flagContentResponse = new ContentFlagging.FlagContentResponse(); + } + x0.readMessage(this.flagContentResponse); + break; + case 114: + if (this.ackNotificationResponse == null) { + this.ackNotificationResponse = new AckNotificationResponse(); + } + x0.readMessage(this.ackNotificationResponse); + break; + case 122: + if (this.initiateAssociationResponse == null) { + this.initiateAssociationResponse = new CarrierBilling.InitiateAssociationResponse(); + } + x0.readMessage(this.initiateAssociationResponse); + break; + case 130: + if (this.verifyAssociationResponse == null) { + this.verifyAssociationResponse = new CarrierBilling.VerifyAssociationResponse(); + } + x0.readMessage(this.verifyAssociationResponse); + break; + case 138: + if (this.libraryReplicationResponse == null) { + this.libraryReplicationResponse = new LibraryReplicationResponse(); + } + x0.readMessage(this.libraryReplicationResponse); + break; + case 146: + if (this.revokeResponse == null) { + this.revokeResponse = new RevokeResponse(); + } + x0.readMessage(this.revokeResponse); + break; + case 154: + if (this.bulkDetailsResponse == null) { + this.bulkDetailsResponse = new Details.BulkDetailsResponse(); + } + x0.readMessage(this.bulkDetailsResponse); + break; + case 162: + if (this.resolveLinkResponse == null) { + this.resolveLinkResponse = new ResolveLink.ResolvedLink(); + } + x0.readMessage(this.resolveLinkResponse); + break; + case 170: + if (this.deliveryResponse == null) { + this.deliveryResponse = new DeliveryResponse(); + } + x0.readMessage(this.deliveryResponse); + break; + case 178: + if (this.acceptTosResponse == null) { + this.acceptTosResponse = new AcceptTosResponse(); + } + x0.readMessage(this.acceptTosResponse); + break; + case 186: + if (this.rateSuggestedContentResponse == null) { + this.rateSuggestedContentResponse = new RateSuggestedContentResponse(); + } + x0.readMessage(this.rateSuggestedContentResponse); + break; + case 194: + if (this.checkPromoOfferResponse == null) { + this.checkPromoOfferResponse = new CheckPromoOfferResponse(); + } + x0.readMessage(this.checkPromoOfferResponse); + break; + case 202: + if (this.instrumentSetupInfoResponse == null) { + this.instrumentSetupInfoResponse = new BuyInstruments.InstrumentSetupInfoResponse(); + } + x0.readMessage(this.instrumentSetupInfoResponse); + break; + case 210: + if (this.redeemGiftCardResponse == null) { + this.redeemGiftCardResponse = new BuyInstruments.RedeemGiftCardResponse(); + } + x0.readMessage(this.redeemGiftCardResponse); + break; + case 218: + if (this.modifyLibraryResponse == null) { + this.modifyLibraryResponse = new ModifyLibrary.ModifyLibraryResponse(); + } + x0.readMessage(this.modifyLibraryResponse); + break; + case 226: + if (this.uploadDeviceConfigResponse == null) { + this.uploadDeviceConfigResponse = new UploadDeviceConfig.UploadDeviceConfigResponse(); + } + x0.readMessage(this.uploadDeviceConfigResponse); + break; + case 234: + if (this.plusProfileResponse == null) { + this.plusProfileResponse = new PlusProfileResponse(); + } + x0.readMessage(this.plusProfileResponse); + break; + case 242: + if (this.consumePurchaseResponse == null) { + this.consumePurchaseResponse = new ConsumePurchaseResponse(); + } + x0.readMessage(this.consumePurchaseResponse); + break; + case 250: + if (this.billingProfileResponse == null) { + this.billingProfileResponse = new BuyInstruments.BillingProfileResponse(); + } + x0.readMessage(this.billingProfileResponse); + break; + case 258: + if (this.preparePurchaseResponse == null) { + this.preparePurchaseResponse = new Purchase.PreparePurchaseResponse(); + } + x0.readMessage(this.preparePurchaseResponse); + break; + case 266: + if (this.commitPurchaseResponse == null) { + this.commitPurchaseResponse = new Purchase.CommitPurchaseResponse(); + } + x0.readMessage(this.commitPurchaseResponse); + break; + case 274: + if (this.debugSettingsResponse == null) { + this.debugSettingsResponse = new DebugSettingsResponse(); + } + x0.readMessage(this.debugSettingsResponse); + break; + case 282: + if (this.checkIabPromoResponse == null) { + this.checkIabPromoResponse = new BuyInstruments.CheckIabPromoResponse(); + } + x0.readMessage(this.checkIabPromoResponse); + break; + case 290: + if (this.userActivitySettingsResponse == null) { + this.userActivitySettingsResponse = new UserActivity.UserActivitySettingsResponse(); + } + x0.readMessage(this.userActivitySettingsResponse); + break; + case 298: + if (this.recordUserActivityResponse == null) { + this.recordUserActivityResponse = new UserActivity.RecordUserActivityResponse(); + } + x0.readMessage(this.recordUserActivityResponse); + break; + case 306: + if (this.redeemCodeResponse == null) { + this.redeemCodeResponse = new PromoCode.RedeemCodeResponse(); + } + x0.readMessage(this.redeemCodeResponse); + break; + case 314: + if (this.selfUpdateResponse == null) { + this.selfUpdateResponse = new SelfUpdateResponse(); + } + x0.readMessage(this.selfUpdateResponse); + break; + case 322: + if (this.searchSuggestResponse == null) { + this.searchSuggestResponse = new SearchSuggest.SearchSuggestResponse(); + } + x0.readMessage(this.searchSuggestResponse); + break; + case 330: + if (this.getInitialInstrumentFlowStateResponse == null) { + this.getInitialInstrumentFlowStateResponse = new BuyInstruments.GetInitialInstrumentFlowStateResponse(); + } + x0.readMessage(this.getInitialInstrumentFlowStateResponse); + break; + case 338: + if (this.createInstrumentResponse == null) { + this.createInstrumentResponse = new BuyInstruments.CreateInstrumentResponse(); + } + x0.readMessage(this.createInstrumentResponse); + break; + case 346: + if (this.challengeResponse == null) { + this.challengeResponse = new ChallengeResponse(); + } + x0.readMessage(this.challengeResponse); + break; + case 354: + if (this.backupDeviceChoicesResponse == null) { + this.backupDeviceChoicesResponse = new Restore.GetBackupDeviceChoicesResponse(); + } + x0.readMessage(this.backupDeviceChoicesResponse); + break; + case 362: + if (this.backupDocumentChoicesResponse == null) { + this.backupDocumentChoicesResponse = new Restore.GetBackupDocumentChoicesResponse(); + } + x0.readMessage(this.backupDocumentChoicesResponse); + break; + case 370: + if (this.earlyUpdateResponse == null) { + this.earlyUpdateResponse = new EarlyUpdateResponse(); + } + x0.readMessage(this.earlyUpdateResponse); + break; + case 378: + if (this.preloadsResponse == null) { + this.preloadsResponse = new Preloads.PreloadsResponse(); + } + x0.readMessage(this.preloadsResponse); + break; + case 386: + if (this.myAccountResponse == null) { + this.myAccountResponse = new MyAccountResponse(); + } + x0.readMessage(this.myAccountResponse); + break; + case 394: + if (this.contentFilterResponse == null) { + this.contentFilterResponse = new ContentFilters.ContentFilterSettingsResponse(); + } + x0.readMessage(this.contentFilterResponse); + break; + case 402: + if (this.experimentsResponse == null) { + this.experimentsResponse = new ExperimentsResponse(); + } + x0.readMessage(this.experimentsResponse); + break; + case 410: + if (this.surveyResponse == null) { + this.surveyResponse = new SurveyResponse(); + } + x0.readMessage(this.surveyResponse); + break; + case 418: + if (this.pingResponse == null) { + this.pingResponse = new PingResponse(); + } + x0.readMessage(this.pingResponse); + break; + case 426: + if (this.updateUserSettingResponse == null) { + this.updateUserSettingResponse = new UpdateUserSettingResponse(); + } + x0.readMessage(this.updateUserSettingResponse); + break; + case 434: + if (this.getUserSettingsResponse == null) { + this.getUserSettingsResponse = new GetUserSettingsResponse(); + } + x0.readMessage(this.getUserSettingsResponse); + break; + case 450: + if (this.getSharingSettingsResponse == null) { + this.getSharingSettingsResponse = new SharingSetting.GetFamilySharingSettingsResponse(); + } + x0.readMessage(this.getSharingSettingsResponse); + break; + case 458: + if (this.updateSharingSettingsResponse == null) { + this.updateSharingSettingsResponse = new SharingSetting.UpdateFamilySharingSettingsResponse(); + } + x0.readMessage(this.updateSharingSettingsResponse); + break; + case 466: + if (this.reviewSnippetsResponse == null) { + this.reviewSnippetsResponse = new ReviewSnippetsResponse(); + } + x0.readMessage(this.reviewSnippetsResponse); + break; + case 474: + if (this.documentSharingStateResponse == null) { + this.documentSharingStateResponse = new DocumentSharingStateResponse(); + } + x0.readMessage(this.documentSharingStateResponse); + break; + case 482: + if (this.getFamilyPurchaseSettingResponse == null) { + this.getFamilyPurchaseSettingResponse = new GetFamilyPurchaseSettingResponse(); + } + x0.readMessage(this.getFamilyPurchaseSettingResponse); + break; + case 490: + if (this.setFamilyPurchaseSettingReponse == null) { + this.setFamilyPurchaseSettingReponse = new SetFamilyPurchaseSettingResponse(); + } + x0.readMessage(this.setFamilyPurchaseSettingReponse); + break; + case 498: + if (this.dismissSurveyResponse == null) { + this.dismissSurveyResponse = new DismissSurveyResponse(); + } + x0.readMessage(this.dismissSurveyResponse); + break; + case 506: + if (this.instantPurchaseResponse == null) { + this.instantPurchaseResponse = new Purchase.InstantPurchaseResponse(); + } + x0.readMessage(this.instantPurchaseResponse); + break; + case 514: + if (this.familyFopResponse == null) { + this.familyFopResponse = new FamilyFopResponse(); + } + x0.readMessage(this.familyFopResponse); + break; + case 522: + if (this.monetaryGiftDetailsResponse == null) { + this.monetaryGiftDetailsResponse = new MonetaryGiftDetailsResponse(); + } + x0.readMessage(this.monetaryGiftDetailsResponse); + break; + case 530: + if (this.giftDialogDetailsResponse == null) { + this.giftDialogDetailsResponse = new GiftDialogDetailsResponse(); + } + x0.readMessage(this.giftDialogDetailsResponse); + break; + case 538: + if (this.inAppPurchaseHistoryResponse == null) { + this.inAppPurchaseHistoryResponse = new Purchase.InAppPurchaseHistoryResponse(); + } + x0.readMessage(this.inAppPurchaseHistoryResponse); + break; + case 546: + if (this.prepareUserRefundResponse == null) { + this.prepareUserRefundResponse = new UserRefund.PrepareUserRefundResponse(); + } + x0.readMessage(this.prepareUserRefundResponse); + break; + case 554: + if (this.commitUserRefundResponse == null) { + this.commitUserRefundResponse = new UserRefund.CommitUserRefundResponse(); + } + x0.readMessage(this.commitUserRefundResponse); + break; + case 562: + if (this.moduleDeliveryResponse == null) { + this.moduleDeliveryResponse = new ModuleDeliveryResponse(); + } + x0.readMessage(this.moduleDeliveryResponse); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + } +} diff --git a/docs/com/google/android/finsky/protos/Review.java b/docs/com/google/android/finsky/protos/Review.java new file mode 100644 index 0000000..17ae154 --- /dev/null +++ b/docs/com/google/android/finsky/protos/Review.java @@ -0,0 +1,264 @@ +package com.google.android.finsky.protos; + +import com.google.android.finsky.protos.Common; +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class Review extends MessageNano { + private static volatile Review[] _emptyArray; + public String commentId = ""; + public boolean hasCommentId = false; + public DocV2 author = null; + public int starRating = 0; + public boolean hasStarRating = false; + public Common.Image sentiment = null; + public String title = ""; + public boolean hasTitle = false; + public String comment = ""; + public boolean hasComment = false; + public String url = ""; + public boolean hasUrl = false; + public String source = ""; + public boolean hasSource = false; + public String documentVersion = ""; + public boolean hasDocumentVersion = false; + public long timestampMsec = 0; + public boolean hasTimestampMsec = false; + public String deviceName = ""; + public boolean hasDeviceName = false; + public String replyText = ""; + public boolean hasReplyText = false; + public long replyTimestampMsec = 0; + public boolean hasReplyTimestampMsec = false; + public int helpfulCount = 0; + public boolean hasHelpfulCount = false; + public long thumbsUpCount = 0; + public boolean hasThumbsUpCount = false; + public OBSOLETE_PlusProfile oBSOLETEPlusProfile = null; + public String authorName = ""; + public boolean hasAuthorName = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.authorName = x0.readString(); + this.hasAuthorName = true; + break; + case 18: + this.url = x0.readString(); + this.hasUrl = true; + break; + case 26: + this.source = x0.readString(); + this.hasSource = true; + break; + case 34: + this.documentVersion = x0.readString(); + this.hasDocumentVersion = true; + break; + case 40: + this.timestampMsec = x0.readRawVarint64(); + this.hasTimestampMsec = true; + break; + case 48: + this.starRating = x0.readRawVarint32(); + this.hasStarRating = true; + break; + case 58: + this.title = x0.readString(); + this.hasTitle = true; + break; + case 66: + this.comment = x0.readString(); + this.hasComment = true; + break; + case 74: + this.commentId = x0.readString(); + this.hasCommentId = true; + break; + case 154: + this.deviceName = x0.readString(); + this.hasDeviceName = true; + break; + case 234: + this.replyText = x0.readString(); + this.hasReplyText = true; + break; + case 240: + this.replyTimestampMsec = x0.readRawVarint64(); + this.hasReplyTimestampMsec = true; + break; + case 250: + if (this.oBSOLETEPlusProfile == null) { + this.oBSOLETEPlusProfile = new OBSOLETE_PlusProfile(); + } + x0.readMessage(this.oBSOLETEPlusProfile); + break; + case 266: + if (this.author == null) { + this.author = new DocV2(); + } + x0.readMessage(this.author); + break; + case 274: + if (this.sentiment == null) { + this.sentiment = new Common.Image(); + } + x0.readMessage(this.sentiment); + break; + case 280: + this.helpfulCount = x0.readRawVarint32(); + this.hasHelpfulCount = true; + break; + case 304: + this.thumbsUpCount = x0.readRawVarint64(); + this.hasThumbsUpCount = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static Review[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new Review[0]; + } + } + } + return _emptyArray; + } + + public Review() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasAuthorName || !this.authorName.equals("")) { + output.writeString(1, this.authorName); + } + if (this.hasUrl || !this.url.equals("")) { + output.writeString(2, this.url); + } + if (this.hasSource || !this.source.equals("")) { + output.writeString(3, this.source); + } + if (this.hasDocumentVersion || !this.documentVersion.equals("")) { + output.writeString(4, this.documentVersion); + } + if (this.hasTimestampMsec || this.timestampMsec != 0) { + output.writeInt64(5, this.timestampMsec); + } + if (this.hasStarRating || this.starRating != 0) { + output.writeInt32(6, this.starRating); + } + if (this.hasTitle || !this.title.equals("")) { + output.writeString(7, this.title); + } + if (this.hasComment || !this.comment.equals("")) { + output.writeString(8, this.comment); + } + if (this.hasCommentId || !this.commentId.equals("")) { + output.writeString(9, this.commentId); + } + if (this.hasDeviceName || !this.deviceName.equals("")) { + output.writeString(19, this.deviceName); + } + if (this.hasReplyText || !this.replyText.equals("")) { + output.writeString(29, this.replyText); + } + if (this.hasReplyTimestampMsec || this.replyTimestampMsec != 0) { + output.writeInt64(30, this.replyTimestampMsec); + } + if (this.oBSOLETEPlusProfile != null) { + output.writeMessage(31, this.oBSOLETEPlusProfile); + } + if (this.author != null) { + output.writeMessage(33, this.author); + } + if (this.sentiment != null) { + output.writeMessage(34, this.sentiment); + } + if (this.hasHelpfulCount || this.helpfulCount != 0) { + output.writeInt32(35, this.helpfulCount); + } + if (this.hasThumbsUpCount || this.thumbsUpCount != 0) { + output.writeUInt64(38, this.thumbsUpCount); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasAuthorName || !this.authorName.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.authorName); + } + if (this.hasUrl || !this.url.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.url); + } + if (this.hasSource || !this.source.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.source); + } + if (this.hasDocumentVersion || !this.documentVersion.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(4, this.documentVersion); + } + if (this.hasTimestampMsec || this.timestampMsec != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(5, this.timestampMsec); + } + if (this.hasStarRating || this.starRating != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(6, this.starRating); + } + if (this.hasTitle || !this.title.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(7, this.title); + } + if (this.hasComment || !this.comment.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(8, this.comment); + } + if (this.hasCommentId || !this.commentId.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(9, this.commentId); + } + if (this.hasDeviceName || !this.deviceName.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(19, this.deviceName); + } + if (this.hasReplyText || !this.replyText.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(29, this.replyText); + } + if (this.hasReplyTimestampMsec || this.replyTimestampMsec != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(30, this.replyTimestampMsec); + } + if (this.oBSOLETEPlusProfile != null) { + size += CodedOutputByteBufferNano.computeMessageSize(31, this.oBSOLETEPlusProfile); + } + if (this.author != null) { + size += CodedOutputByteBufferNano.computeMessageSize(33, this.author); + } + if (this.sentiment != null) { + size += CodedOutputByteBufferNano.computeMessageSize(34, this.sentiment); + } + if (this.hasHelpfulCount || this.helpfulCount != 0) { + size += CodedOutputByteBufferNano.computeInt32Size(35, this.helpfulCount); + } + if (this.hasThumbsUpCount || this.thumbsUpCount != 0) { + return size + CodedOutputByteBufferNano.computeUInt64Size(38, this.thumbsUpCount); + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/ReviewResponse.java b/docs/com/google/android/finsky/protos/ReviewResponse.java new file mode 100644 index 0000000..45b7d65 --- /dev/null +++ b/docs/com/google/android/finsky/protos/ReviewResponse.java @@ -0,0 +1,106 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class ReviewResponse extends MessageNano { + public GetReviewsResponse getResponse = null; + public CriticReviewsResponse criticReviewsResponse = null; + public String nextPageUrl = ""; + public boolean hasNextPageUrl = false; + public Review updatedReview = null; + public String suggestionsListUrl = ""; + public boolean hasSuggestionsListUrl = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + if (this.getResponse == null) { + this.getResponse = new GetReviewsResponse(); + } + x0.readMessage(this.getResponse); + break; + case 18: + this.nextPageUrl = x0.readString(); + this.hasNextPageUrl = true; + break; + case 26: + if (this.updatedReview == null) { + this.updatedReview = new Review(); + } + x0.readMessage(this.updatedReview); + break; + case 34: + this.suggestionsListUrl = x0.readString(); + this.hasSuggestionsListUrl = true; + break; + case 42: + if (this.criticReviewsResponse == null) { + this.criticReviewsResponse = new CriticReviewsResponse(); + } + x0.readMessage(this.criticReviewsResponse); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public ReviewResponse() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.getResponse != null) { + output.writeMessage(1, this.getResponse); + } + if (this.hasNextPageUrl || !this.nextPageUrl.equals("")) { + output.writeString(2, this.nextPageUrl); + } + if (this.updatedReview != null) { + output.writeMessage(3, this.updatedReview); + } + if (this.hasSuggestionsListUrl || !this.suggestionsListUrl.equals("")) { + output.writeString(4, this.suggestionsListUrl); + } + if (this.criticReviewsResponse != null) { + output.writeMessage(5, this.criticReviewsResponse); + } + super.writeTo(output); + } + + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.getResponse != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, this.getResponse); + } + if (this.hasNextPageUrl || !this.nextPageUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.nextPageUrl); + } + if (this.updatedReview != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.updatedReview); + } + if (this.hasSuggestionsListUrl || !this.suggestionsListUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(4, this.suggestionsListUrl); + } + if (this.criticReviewsResponse != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(5, this.criticReviewsResponse); + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/SearchSuggest.java b/docs/com/google/android/finsky/protos/SearchSuggest.java new file mode 100644 index 0000000..31f0275 --- /dev/null +++ b/docs/com/google/android/finsky/protos/SearchSuggest.java @@ -0,0 +1,373 @@ +package com.google.android.finsky.protos; + +import com.google.android.finsky.protos.Common; +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +import java.util.Arrays; +/* loaded from: classes.dex */ +public interface SearchSuggest { + + /* loaded from: classes.dex */ + public static final class Suggestion extends MessageNano { + private static volatile Suggestion[] _emptyArray; + public int type = 1; + public boolean hasType = false; + public String displayText = ""; + public boolean hasDisplayText = false; + public Common.Image image = null; + public Link link = null; + public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES; + public boolean hasServerLogsCookie = false; + public DocV2 document = null; + public int searchBackend = 0; + public boolean hasSearchBackend = false; + public String suggestedQuery = ""; + public boolean hasSuggestedQuery = false; + public NavSuggestion navSuggestion = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + int readRawVarint32 = x0.readRawVarint32(); + switch (readRawVarint32) { + case 1: + case 2: + case 3: + this.type = readRawVarint32; + this.hasType = true; + continue; + } + case 18: + this.suggestedQuery = x0.readString(); + this.hasSuggestedQuery = true; + break; + case 26: + if (this.navSuggestion == null) { + this.navSuggestion = new NavSuggestion(); + } + x0.readMessage(this.navSuggestion); + break; + case 34: + this.serverLogsCookie = x0.readBytes(); + this.hasServerLogsCookie = true; + break; + case 42: + if (this.image == null) { + this.image = new Common.Image(); + } + x0.readMessage(this.image); + break; + case 50: + this.displayText = x0.readString(); + this.hasDisplayText = true; + break; + case 58: + if (this.link == null) { + this.link = new Link(); + } + x0.readMessage(this.link); + break; + case 66: + if (this.document == null) { + this.document = new DocV2(); + } + x0.readMessage(this.document); + break; + case 72: + int readRawVarint322 = x0.readRawVarint32(); + switch (readRawVarint322) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 10: + case 11: + case 12: + case 13: + this.searchBackend = readRawVarint322; + this.hasSearchBackend = true; + continue; + } + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static Suggestion[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new Suggestion[0]; + } + } + } + return _emptyArray; + } + + public Suggestion() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.type != 1 || this.hasType) { + output.writeInt32(1, this.type); + } + if (this.hasSuggestedQuery || !this.suggestedQuery.equals("")) { + output.writeString(2, this.suggestedQuery); + } + if (this.navSuggestion != null) { + output.writeMessage(3, this.navSuggestion); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + output.writeBytes(4, this.serverLogsCookie); + } + if (this.image != null) { + output.writeMessage(5, this.image); + } + if (this.hasDisplayText || !this.displayText.equals("")) { + output.writeString(6, this.displayText); + } + if (this.link != null) { + output.writeMessage(7, this.link); + } + if (this.document != null) { + output.writeMessage(8, this.document); + } + if (this.searchBackend != 0 || this.hasSearchBackend) { + output.writeInt32(9, this.searchBackend); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.type != 1 || this.hasType) { + size += CodedOutputByteBufferNano.computeInt32Size(1, this.type); + } + if (this.hasSuggestedQuery || !this.suggestedQuery.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.suggestedQuery); + } + if (this.navSuggestion != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.navSuggestion); + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + size += CodedOutputByteBufferNano.computeBytesSize(4, this.serverLogsCookie); + } + if (this.image != null) { + size += CodedOutputByteBufferNano.computeMessageSize(5, this.image); + } + if (this.hasDisplayText || !this.displayText.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(6, this.displayText); + } + if (this.link != null) { + size += CodedOutputByteBufferNano.computeMessageSize(7, this.link); + } + if (this.document != null) { + size += CodedOutputByteBufferNano.computeMessageSize(8, this.document); + } + if (this.searchBackend != 0 || this.hasSearchBackend) { + return size + CodedOutputByteBufferNano.computeInt32Size(9, this.searchBackend); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class SearchSuggestResponse extends MessageNano { + public Suggestion[] suggestion = Suggestion.emptyArray(); + public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES; + public boolean hasServerLogsCookie = false; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10); + if (this.suggestion == null) { + length = 0; + } else { + length = this.suggestion.length; + } + Suggestion[] suggestionArr = new Suggestion[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.suggestion, 0, suggestionArr, 0, length); + } + while (length < suggestionArr.length - 1) { + suggestionArr[length] = new Suggestion(); + x0.readMessage(suggestionArr[length]); + x0.readTag(); + length++; + } + suggestionArr[length] = new Suggestion(); + x0.readMessage(suggestionArr[length]); + this.suggestion = suggestionArr; + break; + case 18: + this.serverLogsCookie = x0.readBytes(); + this.hasServerLogsCookie = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public SearchSuggestResponse() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.suggestion != null && this.suggestion.length > 0) { + for (int i = 0; i < this.suggestion.length; i++) { + Suggestion element = this.suggestion[i]; + if (element != null) { + output.writeMessage(1, element); + } + } + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + output.writeBytes(2, this.serverLogsCookie); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.suggestion != null && this.suggestion.length > 0) { + for (int i = 0; i < this.suggestion.length; i++) { + Suggestion element = this.suggestion[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(1, element); + } + } + } + if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) { + return size + CodedOutputByteBufferNano.computeBytesSize(2, this.serverLogsCookie); + } + return size; + } + } + + /* loaded from: classes.dex */ + public static final class NavSuggestion extends MessageNano { + public String docId = ""; + public boolean hasDocId = false; + public String description = ""; + public boolean hasDescription = false; + public byte[] imageBlob = WireFormatNano.EMPTY_BYTES; + public boolean hasImageBlob = false; + public Common.Image image = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.docId = x0.readString(); + this.hasDocId = true; + break; + case 18: + this.imageBlob = x0.readBytes(); + this.hasImageBlob = true; + break; + case 26: + if (this.image == null) { + this.image = new Common.Image(); + } + x0.readMessage(this.image); + break; + case 34: + this.description = x0.readString(); + this.hasDescription = true; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public NavSuggestion() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasDocId || !this.docId.equals("")) { + output.writeString(1, this.docId); + } + if (this.hasImageBlob || !Arrays.equals(this.imageBlob, WireFormatNano.EMPTY_BYTES)) { + output.writeBytes(2, this.imageBlob); + } + if (this.image != null) { + output.writeMessage(3, this.image); + } + if (this.hasDescription || !this.description.equals("")) { + output.writeString(4, this.description); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasDocId || !this.docId.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.docId); + } + if (this.hasImageBlob || !Arrays.equals(this.imageBlob, WireFormatNano.EMPTY_BYTES)) { + size += CodedOutputByteBufferNano.computeBytesSize(2, this.imageBlob); + } + if (this.image != null) { + size += CodedOutputByteBufferNano.computeMessageSize(3, this.image); + } + if (this.hasDescription || !this.description.equals("")) { + return size + CodedOutputByteBufferNano.computeStringSize(4, this.description); + } + return size; + } + } +} diff --git a/docs/com/google/android/finsky/protos/ServerCommands.java b/docs/com/google/android/finsky/protos/ServerCommands.java new file mode 100644 index 0000000..fa0248a --- /dev/null +++ b/docs/com/google/android/finsky/protos/ServerCommands.java @@ -0,0 +1,119 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class ServerCommands extends MessageNano { + public boolean clearCache = false; + public boolean hasClearCache = false; + public String displayErrorMessage = ""; + public boolean hasDisplayErrorMessage = false; + public String logErrorStacktrace = ""; + public boolean hasLogErrorStacktrace = false; + public UserSettingDirtyData[] userSettingDirtyData = UserSettingDirtyData.emptyArray(); + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + int length; + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 8: + this.clearCache = x0.readBool(); + this.hasClearCache = true; + break; + case 18: + this.displayErrorMessage = x0.readString(); + this.hasDisplayErrorMessage = true; + break; + case 26: + this.logErrorStacktrace = x0.readString(); + this.hasLogErrorStacktrace = true; + break; + case 34: + int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 34); + if (this.userSettingDirtyData == null) { + length = 0; + } else { + length = this.userSettingDirtyData.length; + } + UserSettingDirtyData[] userSettingDirtyDataArr = new UserSettingDirtyData[repeatedFieldArrayLength + length]; + if (length != 0) { + System.arraycopy(this.userSettingDirtyData, 0, userSettingDirtyDataArr, 0, length); + } + while (length < userSettingDirtyDataArr.length - 1) { + userSettingDirtyDataArr[length] = new UserSettingDirtyData(); + x0.readMessage(userSettingDirtyDataArr[length]); + x0.readTag(); + length++; + } + userSettingDirtyDataArr[length] = new UserSettingDirtyData(); + x0.readMessage(userSettingDirtyDataArr[length]); + this.userSettingDirtyData = userSettingDirtyDataArr; + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public ServerCommands() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasClearCache || this.clearCache) { + output.writeBool(1, this.clearCache); + } + if (this.hasDisplayErrorMessage || !this.displayErrorMessage.equals("")) { + output.writeString(2, this.displayErrorMessage); + } + if (this.hasLogErrorStacktrace || !this.logErrorStacktrace.equals("")) { + output.writeString(3, this.logErrorStacktrace); + } + if (this.userSettingDirtyData != null && this.userSettingDirtyData.length > 0) { + for (int i = 0; i < this.userSettingDirtyData.length; i++) { + UserSettingDirtyData element = this.userSettingDirtyData[i]; + if (element != null) { + output.writeMessage(4, element); + } + } + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasClearCache || this.clearCache) { + size += CodedOutputByteBufferNano.computeTagSize(1) + 1; + } + if (this.hasDisplayErrorMessage || !this.displayErrorMessage.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(2, this.displayErrorMessage); + } + if (this.hasLogErrorStacktrace || !this.logErrorStacktrace.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(3, this.logErrorStacktrace); + } + if (this.userSettingDirtyData != null && this.userSettingDirtyData.length > 0) { + for (int i = 0; i < this.userSettingDirtyData.length; i++) { + UserSettingDirtyData element = this.userSettingDirtyData[i]; + if (element != null) { + size += CodedOutputByteBufferNano.computeMessageSize(4, element); + } + } + } + return size; + } +} diff --git a/docs/com/google/android/finsky/protos/SplitDeliveryData.java b/docs/com/google/android/finsky/protos/SplitDeliveryData.java new file mode 100644 index 0000000..23dae91 --- /dev/null +++ b/docs/com/google/android/finsky/protos/SplitDeliveryData.java @@ -0,0 +1,142 @@ +package com.google.android.finsky.protos; + +import com.google.protobuf.nano.CodedInputByteBufferNano; +import com.google.protobuf.nano.CodedOutputByteBufferNano; +import com.google.protobuf.nano.InternalNano; +import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.nano.WireFormatNano; +import java.io.IOException; +/* loaded from: classes.dex */ +public final class SplitDeliveryData extends MessageNano { + private static volatile SplitDeliveryData[] _emptyArray; + public String id = ""; + public boolean hasId = false; + public long downloadSize = 0; + public boolean hasDownloadSize = false; + public long gzippedDownloadSize = 0; + public boolean hasGzippedDownloadSize = false; + public String signature = ""; + public boolean hasSignature = false; + public String downloadUrl = ""; + public boolean hasDownloadUrl = false; + public String gzippedDownloadUrl = ""; + public boolean hasGzippedDownloadUrl = false; + public AndroidAppPatchData patchData = null; + + @Override // com.google.protobuf.nano.MessageNano + public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException { + while (true) { + int readTag = x0.readTag(); + switch (readTag) { + case 0: + break; + case 10: + this.id = x0.readString(); + this.hasId = true; + break; + case 16: + this.downloadSize = x0.readRawVarint64(); + this.hasDownloadSize = true; + break; + case 24: + this.gzippedDownloadSize = x0.readRawVarint64(); + this.hasGzippedDownloadSize = true; + break; + case 34: + this.signature = x0.readString(); + this.hasSignature = true; + break; + case 42: + this.downloadUrl = x0.readString(); + this.hasDownloadUrl = true; + break; + case 50: + this.gzippedDownloadUrl = x0.readString(); + this.hasGzippedDownloadUrl = true; + break; + case 58: + if (this.patchData == null) { + this.patchData = new AndroidAppPatchData(); + } + x0.readMessage(this.patchData); + break; + default: + if (WireFormatNano.parseUnknownField(x0, readTag)) { + break; + } else { + break; + } + } + } + return this; + } + + public static SplitDeliveryData[] emptyArray() { + if (_emptyArray == null) { + synchronized (InternalNano.LAZY_INIT_LOCK) { + if (_emptyArray == null) { + _emptyArray = new SplitDeliveryData[0]; + } + } + } + return _emptyArray; + } + + public SplitDeliveryData() { + this.cachedSize = -1; + } + + @Override // com.google.protobuf.nano.MessageNano + public final void writeTo(CodedOutputByteBufferNano output) throws IOException { + if (this.hasId || !this.id.equals("")) { + output.writeString(1, this.id); + } + if (this.hasDownloadSize || this.downloadSize != 0) { + output.writeInt64(2, this.downloadSize); + } + if (this.hasGzippedDownloadSize || this.gzippedDownloadSize != 0) { + output.writeInt64(3, this.gzippedDownloadSize); + } + if (this.hasSignature || !this.signature.equals("")) { + output.writeString(4, this.signature); + } + if (this.hasDownloadUrl || !this.downloadUrl.equals("")) { + output.writeString(5, this.downloadUrl); + } + if (this.hasGzippedDownloadUrl || !this.gzippedDownloadUrl.equals("")) { + output.writeString(6, this.gzippedDownloadUrl); + } + if (this.patchData != null) { + output.writeMessage(7, this.patchData); + } + super.writeTo(output); + } + + /* JADX INFO: Access modifiers changed from: protected */ + @Override // com.google.protobuf.nano.MessageNano + public final int computeSerializedSize() { + int size = super.computeSerializedSize(); + if (this.hasId || !this.id.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(1, this.id); + } + if (this.hasDownloadSize || this.downloadSize != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(2, this.downloadSize); + } + if (this.hasGzippedDownloadSize || this.gzippedDownloadSize != 0) { + size += CodedOutputByteBufferNano.computeInt64Size(3, this.gzippedDownloadSize); + } + if (this.hasSignature || !this.signature.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(4, this.signature); + } + if (this.hasDownloadUrl || !this.downloadUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(5, this.downloadUrl); + } + if (this.hasGzippedDownloadUrl || !this.gzippedDownloadUrl.equals("")) { + size += CodedOutputByteBufferNano.computeStringSize(6, this.gzippedDownloadUrl); + } + if (this.patchData != null) { + return size + CodedOutputByteBufferNano.computeMessageSize(7, this.patchData); + } + return size; + } +} diff --git a/docs/readme.md b/docs/readme.md new file mode 100644 index 0000000..e48a7d7 --- /dev/null +++ b/docs/readme.md @@ -0,0 +1,145 @@ +# Docs + +## Geo-blocking + +Some apps are specific to region. For example, `air.ITVMobilePlayer` is specifc +to GB. If you try it from US, details will work, but delivery will fail: + +~~~ +> googleplay -a air.ITVMobilePlayer +Title: ITV Hub: Your TV Player - Watch Live & On Demand +UploadDate: Dec 9, 2021 +VersionString: 9.19.0 +VersionCode: 901900000 +NumDownloads: 17.429 M +Size: 35.625 MB +Offer: 0.00 USD + +> googleplay -a air.ITVMobilePlayer -v 901900000 +panic: Geo-blocking +~~~ + +It seems headers are ignored as well: + +~~~ +Accept-Language: es +Accept-Language: es-AR +Accept-Language: es-ES +~~~ + +You can change the country [1], and then you get expected result: + +~~~ +> googleplay -a air.ITVMobilePlayer +Title: ITV Hub: Your TV Player - Watch Live & On Demand +UploadDate: Dec 9, 2021 +VersionString: 9.19.0 +VersionCode: 901900000 +NumDownloads: 17.429 M +Size: 35.625 MB +Offer: 0.00 GBP + +> googleplay -a air.ITVMobilePlayer -v 901900000 +GET https://play.googleapis.com/download/by-token/download?token=AOTCm0TiBZQdp... +~~~ + +1. https://support.google.com/googleplay/answer/7431675 + +## How to determine required features? + +Use a command like this: + +~~~ +aapt dump badging file.apk +~~~ + +or check the `cmd/badging` folder. + +## How to get device info? + +1. https://play.google.com/store/apps/details?id=ru.andr7e.deviceinfohw +2. https://play.google.com/store/apps/details?id=flar2.devcheck + +## How to get Protocol Buffer fields? + +Check Google Play Store (`com.android.vending`) with JADX, with the last +working version (2016): + +~~~ +versionCode='80441400' versionName='6.1.14' +~~~ + +- https://apkmirror.com/apk/google-inc/google-play-store +- https://github.com/MCMrARM/Google-Play-API/blob/master/proto/gsf.proto + +## How to install Android App Bundle? + +Bash: + +~~~ +adb install-multiple *.apk +~~~ + +PowerShell: + +~~~ +adb install-multiple (Get-ChildItem *.apk) +~~~ + +https://developer.android.com/guide/app-bundle/app-bundle-format + +## How to install expansion file? + +~~~ +adb shell mkdir -p /sdcard/Android/obb/com.PirateBayGames.ZombieDefense2 + +adb push main.41.com.PirateBayGames.ZombieDefense2.obb ` +/sdcard/Android/obb/com.PirateBayGames.ZombieDefense2/ +~~~ + +https://developer.android.com/google/play/expansion-files + +## INSTALL\_FAILED\_NO\_MATCHING\_ABIS + +This can happen when trying to install ARM app on `x86`. If the APK is +`armeabi-v7a`, then Android 9 (API 28) will work. Also the emulator should be +`x86`. If the APK is `arm64-v8a`, then Android 11 (API 30) will work. Also the +emulator should be `x86_64`. + +- https://android.stackexchange.com/questions/222094/install-failed +- https://stackoverflow.com/questions/36414219/install-failed-no-matching-abis + +However note that this will still fail in some cases: + +https://issuetracker.google.com/issues/253778985 + +## System Image + +API Level | Target +----------|----------------- +33 | Android Tiramisu +32 | Android 12L +31 | Android 12 +30 | Android 11 +29 | Android 10 +28 | Android 9 +27 | Android 8.1 +26 | Android 8 +25 | Android 7.1 +24 | Android 7 +23 | Android 6 +22 | Android 5.1 + +## Version history + +If you know the `versionCode`, you can get older APK [1]. Here is one from 2014: + +~~~ +googleplay -a com.google.android.youtube -v 5110 +~~~ + +but I dont know how to get the old version codes, other than looking at +websites [2] that host the APKs. + +1. https://android.stackexchange.com/questions/163181/how-to-download-old-app +2. https://apkmirror.com/uploads?appcategory=youtube diff --git a/get_items.go b/get_items.go new file mode 100644 index 0000000..586c239 --- /dev/null +++ b/get_items.go @@ -0,0 +1,91 @@ +package googleplay + +import ( + "2a.pages.dev/rosso/protobuf" + "bytes" + "encoding/base64" + "net/http" + "os" +) + +func (h Header) Get_Items(app string) (*Response, error) { + body := protobuf.Message{ + 2: protobuf.Message{ + 1: protobuf.Message{ + 1: protobuf.Message{ + 1: protobuf.String(app), + }, + }, + }, + }.Marshal() + req, err := http.NewRequest( + "POST", "https://play-fe.googleapis.com/fdfe/getItems", + bytes.NewReader(body), + ) + if err != nil { + return nil, err + } + h.Set_Device(req.Header) + field := protobuf.Message{ + // valid range 0xC0 - 0xFFFFFFFF + 3: protobuf.Bytes{0xFF, 0xFF, 0xFF, 0xFF}, + // valid range 0xC0 - 0xFFFFFFFF + 4: protobuf.Bytes{0xFF, 0xFF, 0xFF, 0xFF}, + }.Marshal() + mask := base64.StdEncoding.EncodeToString(field) + req.Header.Set("X-Dfe-Item-Field-Mask", mask) + res, err := Client.Do(req) + if err != nil { + return nil, err + } + return &Response{res}, nil +} + +type Items struct { + protobuf.Message +} + +func Open_Items(name string) (*Items, error) { + data, err := os.ReadFile(name) + if err != nil { + return nil, err + } + message, err := protobuf.Unmarshal(data) + if err != nil { + return nil, err + } + message = message.Get(11).Get(2) + return &Items{message}, nil +} + +func (i Items) Num_Downloads() (uint64, error) { + return i.Get(3).Get(8).Get_Varint(3) +} + +func (i Items) Version_Code() (uint64, error) { + return i.Get(3).Get(2).Get_Varint(1) +} + +func (i Items) Version() (string, error) { + return i.Get(3).Get(2).Get_String(2) +} + +func (i Items) Upload_Date() (string, error) { + return i.Get(3).Get(9).Get_String(2) +} + +func (i Items) Title() (string, error) { + return i.Get(2).Get(1).Get_String(1) +} + +func (i Items) Category() (string, error) { + return i.Get(2).Get(30).Get_String(1) +} + +func (i Items) Creator() (string, error) { + return i.Get(3).Get(14).Get_String(1) +} + +func (i Items) Offer() (string, error) { + return i.Get(2).Get(10).Get(1).Get(1).Get(2).Get(1).Get_String(2) +} diff --git a/get_items_test.go b/get_items_test.go new file mode 100644 index 0000000..70da260 --- /dev/null +++ b/get_items_test.go @@ -0,0 +1,69 @@ +package googleplay + +import ( + "os" + "testing" +) + +func Test_Get_Items(t *testing.T) { + home, err := os.UserHomeDir() + if err != nil { + t.Fatal(err) + } + var head Header + if err := head.Open_Device(home + "/googleplay/x86.bin"); err != nil { + t.Fatal(err) + } + res, err := head.Get_Items("com.watchfacestudio.md307digital") + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + if err := res.Create("ignore.txt"); err != nil { + t.Fatal(err) + } + item, err := Open_Items("ignore.txt") + if err != nil { + t.Fatal(err) + } + if v, err := item.Category(); err != nil { + t.Fatal(err) + } else if v != "Personalization" { + t.Fatal(v) + } + if v, err := item.Creator(); err != nil { + t.Fatal(err) + } else if v != "Matteo Dini MD ®" { + t.Fatal(v) + } + if v, err := item.Offer(); err != nil { + t.Fatal(err) + } else if v != "$0.99" { + t.Fatal(v) + } + if v, err := item.Title(); err != nil { + t.Fatal(err) + } else if v != "MD307 Digital watch face" { + t.Fatal(v) + } + if v, err := item.Upload_Date(); err != nil { + t.Fatal(err) + } else if v != "Nov 3, 2022" { + t.Fatal(v) + } + if v, err := item.Version(); err != nil { + t.Fatal(err) + } else if v != "3.0.0" { + t.Fatal(v) + } + if v, err := item.Version_Code(); err != nil { + t.Fatal(err) + } else if v != 7 { + t.Fatal(v) + } + if v, err := item.Num_Downloads(); err != nil { + t.Fatal(err) + } else if v < 5023 { + t.Fatal(v) + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5d3f4a8 --- /dev/null +++ b/go.mod @@ -0,0 +1,14 @@ +module 2a.pages.dev/googleplay + +go 1.19 + +require 2a.pages.dev/rosso v1.0.4 + +require ( + github.com/andybalholm/brotli v1.0.4 // indirect + github.com/klauspost/compress v1.15.15 // indirect + github.com/refraction-networking/utls v1.2.0 // indirect + golang.org/x/crypto v0.5.0 // indirect + golang.org/x/sys v0.4.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..42269f9 --- /dev/null +++ b/go.sum @@ -0,0 +1,18 @@ +2a.pages.dev/rosso v1.0.4 h1:uoC+r9bXq+HaN0azso5dS2oc0MvsZ00lbeXH4dObD20= +2a.pages.dev/rosso v1.0.4/go.mod h1:twDYItUP96cqhHbqoNNoIQHW+h4qIyU6eTCANscMsLw= +github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= +github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= +github.com/refraction-networking/utls v1.2.0 h1:U5f8wkij2NVinfLuJdFP3gCMwIHs+EzvhxmYdXgiapo= +github.com/refraction-networking/utls v1.2.0/go.mod h1:NPq+cVqzH7D1BeOkmOcb5O/8iVewAsiVt2x1/eO0hgQ= +golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/license.md b/license.md new file mode 100644 index 0000000..1a71cb6 --- /dev/null +++ b/license.md @@ -0,0 +1,131 @@ +# PolyForm Noncommercial License 1.0.0 + + + +## Acceptance + +In order to get any license under these terms, you must agree +to them as both strict obligations and conditions to all +your licenses. + +## Copyright License + +The licensor grants you a copyright license for the +software to do everything you might do with the software +that would otherwise infringe the licensor's copyright +in it for any permitted purpose. However, you may +only distribute the software according to [Distribution +License](#distribution-license) and make changes or new works +based on the software according to [Changes and New Works +License](#changes-and-new-works-license). + +## Distribution License + +The licensor grants you an additional copyright license +to distribute copies of the software. Your license +to distribute covers distributing the software with +changes and new works permitted by [Changes and New Works +License](#changes-and-new-works-license). + +## Notices + +You must ensure that anyone who gets a copy of any part of +the software from you also gets a copy of these terms or the +URL for them above, as well as copies of any plain-text lines +beginning with `Required Notice:` that the licensor provided +with the software. For example: + +> Required Notice: Copyright Yoyodyne, Inc. (http://example.com) + +## Changes and New Works License + +The licensor grants you an additional copyright license to +make changes and new works based on the software for any +permitted purpose. + +## Patent License + +The licensor grants you a patent license for the software that +covers patent claims the licensor can license, or becomes able +to license, that you would infringe by using the software. + +## Noncommercial Purposes + +Any noncommercial purpose is a permitted purpose. + +## Personal Uses + +Personal use for research, experiment, and testing for +the benefit of public knowledge, personal study, private +entertainment, hobby projects, amateur pursuits, or religious +observance, without any anticipated commercial application, +is use for a permitted purpose. + +## Noncommercial Organizations + +Use by any charitable organization, educational institution, +public research organization, public safety or health +organization, environmental protection organization, +or government institution is use for a permitted purpose +regardless of the source of funding or obligations resulting +from the funding. + +## Fair Use + +You may have "fair use" rights for the software under the +law. These terms do not limit them. + +## No Other Rights + +These terms do not allow you to sublicense or transfer any of +your licenses to anyone else, or prevent the licensor from +granting licenses to anyone else. These terms do not imply +any other licenses. + +## Patent Defense + +If you make any written claim that the software infringes or +contributes to infringement of any patent, your patent license +for the software granted under these terms ends immediately. If +your company makes such a claim, your patent license ends +immediately for work on behalf of your company. + +## Violations + +The first time you are notified in writing that you have +violated any of these terms, or done anything with the software +not covered by your licenses, your licenses can nonetheless +continue if you come into full compliance with these terms, +and take practical steps to correct past violations, within +32 days of receiving notice. Otherwise, all your licenses +end immediately. + +## No Liability + +***As far as the law allows, the software comes as is, without +any warranty or condition, and the licensor will not be liable +to you for any damages arising out of these terms or the use +or nature of the software, under any kind of legal claim.*** + +## Definitions + +The **licensor** is the individual or entity offering these +terms, and the **software** is the software the licensor makes +available under these terms. + +**You** refers to the individual or entity agreeing to these +terms. + +**Your company** is any legal entity, sole proprietorship, +or other kind of organization that you work for, plus all +organizations that have control over, are under the control of, +or are under common control with that organization. **Control** +means ownership of substantially all the assets of an entity, +or the power to direct its management and policies by vote, +contract, or otherwise. Control can be direct or indirect. + +**Your licenses** are all the licenses granted to you for the +software under these terms. + +**Use** means anything you do with the software requiring one +of your licenses. diff --git a/purchase.go b/purchase.go new file mode 100644 index 0000000..6dbc88d --- /dev/null +++ b/purchase.go @@ -0,0 +1,28 @@ +package googleplay + +import ( + "net/http" + "net/url" + "strings" +) + +// Purchase app. Only needs to be done once per Google account. +func (h Header) Purchase(app string) error { + body := make(url.Values) + body.Set("doc", app) + req, err := http.NewRequest( + "POST", "https://android.clients.google.com/fdfe/purchase", + strings.NewReader(body.Encode()), + ) + if err != nil { + return err + } + h.Set_Auth(req.Header) + h.Set_Device(req.Header) + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + res, err := Client.Do(req) + if err != nil { + return err + } + return res.Body.Close() +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..ce525d1 --- /dev/null +++ b/readme.md @@ -0,0 +1,99 @@ +# GooglePlay + +> I’m not really sure what the point of this video is, but I guess just be +> generous. Be kind to people, because you never know how much they might need +> it, or how far it’ll go. +> +> [NakeyJakey (2018)](//youtube.com/watch?v=Cr0UYNKmrUs) + +Download APK from Google Play or send API requests + +## How to install? + +This module works with Windows, macOS or Linux. First, [download Go][2] and +extract archive. Then download GooglePlay Zip and extract archive. Then +navigate to: + +~~~ +googleplay-main/cmd/googleplay +~~~ + +and enter: + +~~~ +go build +~~~ + +[2]://go.dev/dl + +## Tool examples + +Before trying to Sign in, make sure your location is correct, to avoid +geo-blocking. You can test by logging into your Google account with a web +browser. Also, make sure the Google account you are using has logged into the +Play Store at least once before, using a physical or virtual Android device. +Create a file containing token (`aas_et`) for future requests: + +~~~ +googleplay -email EMAIL -password PASSWORD +~~~ + +Create a file containing `X-DFE-Device-ID` (GSF ID) for future requests: + +~~~ +googleplay -device +~~~ + +Get app details: + +~~~ +> googleplay -a com.google.android.youtube +Title: YouTube +Creator: Google LLC +Upload Date: Jan 9, 2023 +Version: 18.01.36 +Version Code: 1535370688 +Num Downloads: 13.27 billion +Installation Size: 47.42 megabyte +File: APK APK APK APK +Offer: 0 USD +~~~ + +Purchase app. Only needs to be done once per Google account: + +~~~ +googleplay -a com.google.android.youtube -purchase +~~~ + +Download APK. You need to specify any valid version code. The latest code is +provided by the previous details command. If APK is split, all pieces will be +downloaded: + +~~~ +googleplay -a com.google.android.youtube -v 1535370688 +~~~ + +## Contact + +
+
+ email +
+
+ srpen6@gmail.com +
+
+ Discord +
+
+ srpen6#6983 +
+
+ https://discord.com/invite/WWq6rFb8Rf +
+
+ +## Money + +Software is not licensed for commercial use. If you wish to purchase a +commercial license, or for other business questions, contact me. diff --git a/research/2022-11-13/readme.md b/research/2022-11-13/readme.md new file mode 100644 index 0000000..ada4055 --- /dev/null +++ b/research/2022-11-13/readme.md @@ -0,0 +1,178 @@ +# Research + +Google Play Store: +com.android.vending + +Google Play services: +com.google.android.gms + +Google Services Framework: +com.google.android.gsf + +pull: + +~~~ +adb pull ` +/system/priv-app/GoogleServicesFramework/GoogleServicesFramework.apk ` +GoogleServicesFramework.apk + +adb pull ` +/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk ` +PrebuiltGmsCore.apk + +adb pull ` +/system/priv-app/Phonesky/Phonesky.apk ` +Phonesky.apk +~~~ + +push: + +~~~ +adb remount +adb push GoogleServicesFramework.apk /system/priv-app +adb push Phonesky.apk /system/priv-app +adb push PrebuiltGmsCore.apk /system/priv-app +adb reboot +~~~ + +## API 24 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=7.0 + +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=11.7.43 (470-172403884) + +> adb shell dumpsys package com.android.vending | rg versionName + versionName=6.7.15.E-all [0] 2987020 +> adb shell dumpsys package com.android.vending | rg versionCode + versionCode=80671500 minSdk=14 targetSdk=23 +~~~ + +## API 25 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=7.1.1 +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=10.2.98 (470-146496160) +> adb shell dumpsys package com.android.vending | rg versionName + versionName=6.9.43.G-all [0] 3363388 +~~~ + +## API 26 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=8.0.0 + +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=11.7.43 (470-172403884) + +> adb shell dumpsys package com.android.vending | rg versionName + versionName=7.9.66.Q-all [0] [PR] 163928463 +> adb shell dumpsys package com.android.vending | rg versionCode + versionCode=80796600 minSdk=14 targetSdk=25 +~~~ + +## API 27 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=8.1.0 +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=11.5.80 (470-175107017) +> adb shell dumpsys package com.android.vending | rg versionName + versionName=8.0.62.R-all [0] [PR] 172052298 +~~~ + +## API 28 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=9 +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=16.0.89 (040700-239467275) +> adb shell dumpsys package com.android.vending | rg versionName + versionName=10.1.41-all [0] [PR] 197615634 +~~~ + +## API 29 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=10 +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=17.7.86 (040700-256199907) +> adb shell dumpsys package com.android.vending | rg versionName + versionName=15.2.67-all [0] [PR] 256058878 +~~~ + +## API 30 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=11 +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=20.18.17 (040700-311416286) +> adb shell dumpsys package com.android.vending | rg versionName + versionName=20.4.33-all [0] [PR] 319051143 +~~~ + +## API 31 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=12 +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=21.24.23 (190800-396046673) +> adb shell dumpsys package com.android.vending | rg versionName + versionName=25.9.49-21 [0] [PR] 386309911 +~~~ + +## API 32 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=12 + +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=21.24.23 (190800-396046673) + +> adb shell dumpsys package com.android.vending | rg versionName + versionName=25.9.50-21 [0] [PR] 400852117 +> adb shell dumpsys package com.android.vending | rg versionCode + versionCode=82595010 minSdk=21 targetSdk=30 +~~~ + +For some reason, these will not download: + +~~~ +8_25_9_50_00 +8_25_9_50_10 +~~~ + +but these work fine: + +~~~ +8_25_9_19_00 +8_25_9_19_10 +8_25_9_29_00 +8_25_9_29_10 +~~~ + +## API 33 + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=13 + +> adb shell dumpsys package com.google.android.gms | rg versionName + versionName=22.18.21 (190800-453244992) + +> adb shell dumpsys package com.android.vending | rg versionName + versionName=30.4.17-21 [0] [PR] 445549118 +> adb shell dumpsys package com.android.vending | rg versionCode + versionCode=83041710 minSdk=21 targetSdk=31 +~~~ diff --git a/research/2022-11-16/readme.md b/research/2022-11-16/readme.md new file mode 100644 index 0000000..aed4baf --- /dev/null +++ b/research/2022-11-16/readme.md @@ -0,0 +1,74 @@ +# November 16 2022 + +https://xda-developers.com/download-google-apps-gapps + +## BiT GApps + +Only ARM is offered: + +https://github.com/BiTGApps/BiTGApps/issues/4 + +## Flame GApps + +Only ARM is offered: + +https://pling.com/p/1341681 + +## Lite GApps + +all the Lite GApps use this Play Store: + +~~~ +name='com.android.vending' versionCode='83032110' +versionName='30.3.21-21 [0] [PR] 445437866' platformBuildVersionName='Tiramisu' +~~~ + +closest match with Android Studio is API 33: + +~~~ +> adb shell dumpsys package com.android.vending | rg versionName + versionName=30.4.17-21 [0] [PR] 445549118 +> adb shell dumpsys package com.android.vending | rg versionCode + versionCode=83041710 minSdk=21 targetSdk=31 +~~~ + +but Lite GApps does not offer API 33: + +https://github.com/litegapps1/litegapps1.github.io/issues/1 + +## Mind The GApps + +Only ARM is offered: + +http://downloads.codefi.re/jdcteam/javelinanddart/gapps + +## Nik GApps + +Only ARM is offered: + +https://sourceforge.net/projects/nikgapps/files/Releases + +## Open GApps + +all the Open GApps use this Play Store: + +~~~ +name='com.android.vending' versionCode='83032100' +versionName='30.3.21-19 [0] [PR] 445437866' platformBuildVersionName='Tiramisu' +~~~ + +closest match with Android Studio is API 33: + +~~~ +> adb shell dumpsys package com.google.android.gsf | rg versionName + versionName=13 + +> adb shell dumpsys package com.android.vending | rg versionName + versionName=30.4.17-21 [0] [PR] 445549118 +> adb shell dumpsys package com.android.vending | rg versionCode + versionCode=83041710 minSdk=21 targetSdk=31 +~~~ + +but Open GApps does not offer Android 13: + +https://github.com/opengapps/opengapps/issues/973 diff --git a/research/2022-11-17/80620200 b/research/2022-11-17/80620200 new file mode 100644 index 0000000..e69de29 diff --git a/research/2022-11-17/80807600 b/research/2022-11-17/80807600 new file mode 100644 index 0000000..e69de29 diff --git a/research/2022-11-17/80875000 b/research/2022-11-17/80875000 new file mode 100644 index 0000000..e69de29 diff --git a/research/2022-11-17/delivery.go b/research/2022-11-17/delivery.go new file mode 100644 index 0000000..a3da080 --- /dev/null +++ b/research/2022-11-17/delivery.go @@ -0,0 +1,102 @@ +package main + +import ( + "bytes" + "fmt" + "io" + "net/http" + "net/url" + "os" + "time" +) + +type version struct { + major int + minor int + patch int +} + +func (v version) String() string { + b := []byte{'8'} + b = fmt.Appendf(b, "%02v", v.major) + b = fmt.Append(b, v.minor) + b = fmt.Appendf(b, "%02v", v.patch) + b = append(b, "00"...) + if len(b) > 8 { + panic(b) + } + return string(b) +} + +func main() { + var req http.Request + req.Header = make(http.Header) + req.URL = new(url.URL) + req.URL.Host = "play-fe.googleapis.com" + req.URL.Path = "/fdfe/delivery" + val := make(url.Values) + val["doc"] = []string{"com.android.vending"} + req.URL.Scheme = "https" + req.Header["User-Agent"] = []string{"Android-Finsky (sdk=9,versionCode=99999999)"} + req.Header["X-Dfe-Device-Id"] = []string{device} + // done + // v := version{major: 4} + // v := version{major: 5} + // v := version{major: 6} + // v := version{major: 7} + // v := version{major: 8} + + // to do + v := version{major: 9} + // v := version{major: 10} + // v := version{major: 11} + // v := version{major: 12} + // v := version{major: 13} + // v := version{major: 14} + // v := version{major: 15} + // v := version{major: 16} + // v := version{major: 17} + // v := version{major: 18} + // v := version{major: 19} + // v := version{major: 20} + // v := version{major: 21} + // v := version{major: 22} + // v := version{major: 23} + // v := version{major: 24} + // v := version{major: 25} + // v := version{major: 26} + // v := version{major: 27} + // v := version{major: 28} + // v := version{major: 29} + // v := version{major: 30} + for v.minor = 0; v.minor <= 9; v.minor++ { + for v.patch = 0; v.patch <= 99; v.patch++ { + val["vc"] = []string{v.String()} + req.URL.RawQuery = val.Encode() + res, err := new(http.Transport).RoundTrip(&req) + if err != nil { + panic(err) + } + body, err := io.ReadAll(res.Body) + if err != nil { + panic(err) + } + if bytes.Contains(body, []byte("/by-token/")) { + fmt.Println(res.Status, "pass", v.String()) + file, err := os.Create(v.String()) + if err != nil { + panic(err) + } + if err := file.Close(); err != nil { + panic(err) + } + } else { + fmt.Println(res.Status, "fail", v.String()) + } + if err := res.Body.Close(); err != nil { + panic(err) + } + time.Sleep(199 * time.Millisecond) + } + } +} diff --git a/research/2022-11-17/readme.md b/research/2022-11-17/readme.md new file mode 100644 index 0000000..5277a20 --- /dev/null +++ b/research/2022-11-17/readme.md @@ -0,0 +1,24 @@ +# November 17 2022 + +We want to match the Android Studio pull with something. We need to pull direct +from Google Play. Since we cant get version history, we need to brute force it. +Whats the oldest version we care about? This: + +~~~ +> adb shell dumpsys package com.android.vending | rg versionName + versionName=6.7.15.E-all [0] 2987020 +> adb shell dumpsys package com.android.vending | rg versionCode + versionCode=80671500 minSdk=14 targetSdk=23 +~~~ + +whats the newest version we care about? This: + +~~~ +> adb shell dumpsys package com.android.vending | rg versionName + versionName=30.4.17-21 [0] [PR] 445549118 +> adb shell dumpsys package com.android.vending | rg versionCode + versionCode=83041710 minSdk=21 targetSdk=31 +~~~ + +We cannot use `/fdfe/details` for this, as it fails even with `vc`. So we need +to use `/fdfe/delivery`. diff --git a/research/2022-11-18/readme.md b/research/2022-11-18/readme.md new file mode 100644 index 0000000..5ed2dd1 --- /dev/null +++ b/research/2022-11-18/readme.md @@ -0,0 +1,29 @@ +# 2022-11-19 + +## GenyMotion + +Create Virtual device using Android version 6.0.0. Install Open GApps. Then +click Restart now. If you have trouble at this point, you might need to End +task: + +~~~ +C:\Program Files\Genymobile\Genymotion\tools\adb.exe +~~~ + +Then install system certificate. Then start proxy: + +~~~ +mitmproxy +~~~ + +then set proxy: + +~~~ +adb shell settings put global http_proxy 192.168.56.1:8080 +~~~ + +Note if you restart the device, you need to install system certificate again. +Make sure you do the above quickly, as the `/checkin` request happens upon +boot, before Play Store app is even launched. + +https://support.genymotion.com/hc/articles/360002778137-How-to-connect diff --git a/research/2022-11-20/get_items.go b/research/2022-11-20/get_items.go new file mode 100644 index 0000000..ecdf8b7 --- /dev/null +++ b/research/2022-11-20/get_items.go @@ -0,0 +1,273 @@ +package main + +import ( + "2a.pages.dev/rosso/http" + "2a.pages.dev/rosso/protobuf" + "bytes" + "encoding/base64" + "fmt" + "io" + "net/url" + "strconv" + "time" +) + +var checkin_body = protobuf.Message{ + 4: protobuf.Message{ // checkin + 1: protobuf.Message{ // build + 10: protobuf.Varint(28), + }, + 18: protobuf.Varint(1), // voiceCapable + }, + 14: protobuf.Varint(3), + 18: protobuf.Message{ // deviceConfiguration + 1: protobuf.Varint(0), + 2: protobuf.Varint(0), + 3: protobuf.Varint(0), + 4: protobuf.Varint(0), + 5: protobuf.Varint(0), + 6: protobuf.Varint(0), + 7: protobuf.Varint(0), + 8: protobuf.Varint(0xF_FFFF), + 9: protobuf.Slice[protobuf.String]{ + "android.test.runner", + "global-miui11-empty.jar", + "org.apache.http.legacy", + }, + 11: protobuf.String("x86"), + 15: protobuf.Slice[protobuf.String]{ + "GL_OES_compressed_ETC1_RGB8_texture", + "GL_KHR_texture_compression_astc_ldr", + }, + 26: protobuf.Slice[protobuf.Message]{ + protobuf.Message{ + 1: protobuf.String("android.hardware.camera.autofocus"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.camera.front"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.camera"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.location.network"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.location.gps"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.location"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.microphone"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.screen.landscape"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.screen.portrait"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.sensor.accelerometer"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.telephony"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.touchscreen"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.touchscreen.multitouch"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.usb.host"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.wifi"), + }, + protobuf.Message{ + 1: protobuf.String("android.software.device_admin"), + }, + }, + }, +} + +func checkin() (string, error) { + req, err := http.NewRequest( + "POST", "https://android.googleapis.com/checkin", + bytes.NewReader(checkin_body.Marshal()), + ) + if err != nil { + return "", err + } + req.Header.Set("Content-Type", "application/x-protobuffer") + res, err := client.Do(req) + if err != nil { + return "", err + } + defer res.Body.Close() + body, err := io.ReadAll(res.Body) + if err != nil { + return "", err + } + message, err := protobuf.Unmarshal(body) + if err != nil { + return "", err + } + id, err := message.Get_Fixed64(7) + if err != nil { + return "", err + } + return strconv.FormatUint(id, 16), nil +} + +func sync(device string) error { + req := new(http.Request) + req.Body = io.NopCloser(bytes.NewReader(sync_body.Marshal())) + req.Header = make(http.Header) + req.Method = "POST" + req.URL = new(url.URL) + req.URL.Host = "play-fe.googleapis.com" + req.URL.Path = "/fdfe/sync" + req.URL.Scheme = "https" + req.Header["X-Dfe-Device-Id"] = []string{device} + if _, err := client.Do(req); err != nil { + return err + } + return nil +} + +func main() { + device, err := checkin() + if err != nil { + panic(err) + } + if err := sync(device); err != nil { + panic(err) + } + fmt.Println("Sleep", sleep) + time.Sleep(sleep) + req := new(http.Request) + req_body := protobuf.Message{ + 2: protobuf.Message{ + 1: protobuf.Message{ + 1: protobuf.Message{ + 1: protobuf.String("com.watchfacestudio.md307digital"), + }, + }, + }, + }.Marshal() + req.Body = io.NopCloser(bytes.NewReader(req_body)) + req.Header = make(http.Header) + req.Method = "POST" + req.URL = new(url.URL) + req.URL.Host = "play-fe.googleapis.com" + req.URL.Path = "/fdfe/getItems" + req.URL.Scheme = "https" + req.Header["X-Dfe-Device-Id"] = []string{device} + field := protobuf.Message{ + 4: protobuf.Bytes{0xFF, 0xFF, 0xFF, 0xFF}, + }.Marshal() + mask := base64.StdEncoding.EncodeToString(field) + req.Header.Set("X-Dfe-Item-Field-Mask", mask) + fmt.Println(device) + res, err := client.Do(req) + if err != nil { + panic(err) + } + defer res.Body.Close() + res_body, err := io.ReadAll(res.Body) + if err != nil { + panic(err) + } + if bytes.Contains(res_body, []byte("config.xhdpi")) { + fmt.Println("pass") + } else { + fmt.Println("fail") + } +} + +const sleep = 16 * time.Second + +var client = http.Default_Client + +var sync_body = protobuf.Message{ + 1: protobuf.Slice[protobuf.Message]{ + protobuf.Message{ + 10: protobuf.Message{ + 1: protobuf.Slice[protobuf.Message]{ + protobuf.Message{ + 1: protobuf.String("android.hardware.camera.autofocus"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.camera.front"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.camera"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.location.network"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.location.gps"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.location"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.microphone"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.screen.landscape"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.screen.portrait"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.sensor.accelerometer"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.telephony"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.touchscreen"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.touchscreen.multitouch"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.usb.host"), + }, + protobuf.Message{ + 1: protobuf.String("android.hardware.wifi"), + }, + protobuf.Message{ + 1: protobuf.String("android.software.device_admin"), + }, + }, + 2: protobuf.Slice[protobuf.String]{ + "org.apache.http.legacy", + "android.test.runner", + }, + 4: protobuf.Slice[protobuf.String]{ + "GL_OES_compressed_ETC1_RGB8_texture", + "GL_KHR_texture_compression_astc_ldr", + }, + }, + }, + protobuf.Message{ + 19: protobuf.Message{ + 2: protobuf.Varint(83032110), + }, + }, + protobuf.Message{ + 20: protobuf.Message{ + 2: protobuf.Varint(768), + 3: protobuf.Varint(1280), + 4: protobuf.Varint(2), + 5: protobuf.Varint(320), + 1: protobuf.Varint(3), + }, + }, + }, +} diff --git a/research/2022-11-21/autoUpdate.go b/research/2022-11-21/autoUpdate.go new file mode 100644 index 0000000..be8f162 --- /dev/null +++ b/research/2022-11-21/autoUpdate.go @@ -0,0 +1,52 @@ +package main + +import ( + "io" + "net/http" + "net/http/httputil" + "net/url" + "os" +) + +func main() { + var req http.Request + req.Header = make(http.Header) + req.Header["Accept-Encoding"] = []string{"gzip"} + req.Header["Accept-Language"] = []string{"en-US"} + req.Header["Connection"] = []string{"Keep-Alive"} + req.Header["Content-Length"] = []string{"11026"} + req.Header["Content-Type"] = []string{"application/x-protobuf"} + req.Header["Host"] = []string{"play-fe.googleapis.com"} + req.Header["User-Agent"] = []string{"Android-Finsky/33.2.12-21%20%5B0%5D%20%5BPR%5D%20487986790 (api=3,versionCode=83321210,sdk=24,device=vbox86p,hardware=vbox86,product=vbox86p,platformVersionRelease=7.0,model=Nexus%204,buildId=NBD92Y,isWideScreen=0,supportedAbis=x86)"} + req.Header["X-Dfe-Build-Fingerprint"] = []string{"google/vbox86p/vbox86p:7.0/NBD92Y/433:userdebug/test-keys"} + req.Header["X-Dfe-Client-Id"] = []string{"am-unknown"} + req.Header["X-Dfe-Device-Checkin-Consistency-Token"] = []string{"ABFEt1VnT2UviOAHydPMSmM3NrW_RLHtLIqNrxYrNRPX_5Uhto1QyU3jjlYVOfYBRtjKjh_lJMOST_zB_BmFhykXJwCz7ScpErsPnJ90V6-khkwCS_b58dWE5FGhnqv4CEY4blReAIQi07WOi4hiJRTyg-p2mGsQ1_7jhVOK_5o7HLbalunP81QZZ6FlAWn75pM_VoJ33xSq0mI9GCVJZFhhzkGgtr6klVxVwRYI7A_G8F1OtOywP3DEin0psoPrmoXMv6eAoZ_LUkIyyknDPyDzSZh6QNCOGqUrtjLUv1BJfunZ2oHcQPe0G2zQPLy1pb7RNDsLb9UMs0CSileEk-P1482HCC1_jCJtjJ3yrE4R3y1s7ex66lPJajm5sQ-LgkWQZASHF8DM_vYjlV0odgZYX_UqTGsH870brPBmmBV-Zz1EW1h7cug"} + req.Header["X-Dfe-Device-Id"] = []string{device} + req.Header["X-Dfe-Encoded-Targets"] = []string{"CAEaCoqYgQayBZkJ2Qs"} + req.Header["X-Dfe-Mccmnc"] = []string{"310270"} + req.Header["X-Dfe-Network-Type"] = []string{"4"} + req.Header["X-Dfe-Phenotype"] = []string{"H4sIAAAAAAAAABXQO5KbMAAA0EzKlClzh52BCDBbbIEAIVbmzy5YDcNHxgYbm7VARpMiR8_kHeH9-PvdttxsSVzLvHH_CFe59PNg1WzZK9apZEjn0jKsrKmvwaTynUndjoY170TJiDfc0_1nt81syoF9dlwfgPo6ZRp1yZIcH0_kdylurAdw9Kig0Ivs0d88CUa4XPhLKYo42mGRYa7zWSSEHSsDTzD1AyEvYrjkcwvzEN_YmuwlusPCvDhEgndxq0K6BXz8yAyjAtWuVtFat48OroufD0-76xW1MVLRGGGgbpHckuzUZj0yx9accYV1CLzDmWFdvL39_PN_oEic7ayczGtWHqI4zmEIh94o4YemxE8leOWBRr78ilGVnZ-kxabTr1_FC6Gpi0Zald3tOPx2ACdoi5RXKbX7IW1pqileAKocDfb07hKUqDFfGuuzUDbP6HanSf769g8RwBEYgwEAAA"} + req.Header["X-Dfe-Request-Params"] = []string{"timeoutMs=30000"} + req.Header["X-Dfe-Userlanguages"] = []string{"en_US"} + req.Header["X-Ps-Rh"] = []string{"H4sIAAAAAAAAAONqZuRqYPQwKfZ0hIJ4U99KkwpPo5Isx0q_Kv8qXx9fgxIXxwrfqlBj3xDXStconzzXLEcDX3Nfg2IXR6OSkMAK36xQ98r0nIpk0wqzeHdXo1wLZ_ckU6OwoDyv5DS3cgsPxzInxwzf8HhLc2cfzxBnx3In3SAnM7NwsI22tgCrOwMMhgAAAA"} + req.Method = "POST" + req.URL = new(url.URL) + req.URL.Host = "play-fe.googleapis.com" + req.URL.Path = "/fdfe/autoUpdate" + req.URL.RawPath = "" + val := make(url.Values) + val["nocache_qos"] = []string{"lt"} + req.URL.RawQuery = val.Encode() + req.URL.Scheme = "https" + req.Body = io.NopCloser(req_body) + res, err := new(http.Transport).RoundTrip(&req) + if err != nil { + panic(err) + } + defer res.Body.Close() + res_body, err := httputil.DumpResponse(res, true) + if err != nil { + panic(err) + } + os.Stdout.Write(res_body) +} diff --git a/research/2022-11-21/readme.md b/research/2022-11-21/readme.md new file mode 100644 index 0000000..8623813 --- /dev/null +++ b/research/2022-11-21/readme.md @@ -0,0 +1,7 @@ +# November 21 2022 + +~~~ +fdfe "com.google.android.trichromelibrary" +~~~ + +https://gitlab.com/AuroraOSS/AuroraStore/-/issues/346 diff --git a/research/2022-11-23/readme.md b/research/2022-11-23/readme.md new file mode 100644 index 0000000..c250822 --- /dev/null +++ b/research/2022-11-23/readme.md @@ -0,0 +1,176 @@ +# November 22 2022 + +## Android 10.0 (Google APIs) + +then start the Google APIs device: + +~~~ +emulator -avd Pixel_3a_XL_API_29 -writable-system +~~~ + +and push: + +~~~ +adb root +adb remount +~~~ + +Result: + +~~~ +W Disabling verity for /system +E Skipping /system +Skip mounting partition: /product +Skip mounting partition: /product_services +Skip mounting partition: /product +Skip mounting partition: /product_services +Skip mounting partition: /product +Skip mounting partition: /product_services +Skip mounting partition: /product +Skip mounting partition: /product_services +Skip mounting partition: /product +Skip mounting partition: /product_services +Skip mounting partition: /product +Skip mounting partition: /product_services +Skip mounting partition: /product +Skip mounting partition: /product_services +W DM_DEV_STATUS failed for scratch: No such device or address +E [liblp]No device named scratch +[liblp]Partition scratch will resize from 0 bytes to 536870912 bytes +[liblp]Updated logical partition table at slot 0 on device /dev/block/by-name/super +[libfs_mgr]Created logical partition scratch on device /dev/block/dm-3 +[libfs_mgr]__mount(source=/dev/block/dm-3,target=/mnt/scratch,type=f2fs)=0: Success +Skip mounting partition: /product +Skip mounting partition: /product_services +Using overlayfs for /vendor +Skip mounting partition: /product +Skip mounting partition: /product_services +Skip mounting partition: /product +Skip mounting partition: /product_services +Skip mounting partition: /product +Skip mounting partition: /product_services +[libfs_mgr]__mount(source=overlay,target=/vendor,type=overlay,upperdir=/mnt/scratch/overlay/vendor/upper)=0 +Skip mounting partition: /product +Skip mounting partition: /product_services +/system/bin/remount exited with status 7 +~~~ + +- https://android.stackexchange.com/questions/232234/why-adb-remount +- https://android.stackexchange.com/questions/52443/the-command-adb-root-works +- https://github.com/topjohnwu/Magisk/issues/2252 +- https://issuetracker.google.com/issues/260204230 +- https://stackoverflow.com/questions/58010655/is-adb-remount-broken-on-android +- https://stackoverflow.com/questions/60052458/adb-amulator-running-sdk-29 +- https://stackoverflow.com/questions/60867956/android-emulator-sdk-10-api-29 +- https://stackoverflow.com/questions/65627342/why-does-adb-remount-fail + +## Android 11.0 (Google APIs) + +then start the Google APIs device: + +~~~ +emulator -avd Pixel_3a_XL_API_30 -writable-system +~~~ + +and push: + +~~~ +adb root +adb remount +adb reboot +~~~ + +After two minutes, the device has not rebooted. Same result with `x86` or +`x86_64`: + +https://issuetracker.google.com/issues/260134707 + +## Android 12.0 (Google APIs) + +Start the Google Play device and pull: + +~~~ +adb pull /product/priv-app/Phonesky/Phonesky.apk Phonesky-31.apk +~~~ + +then start the Google APIs device: + +~~~ +emulator -avd Pixel_3a_XL_API_31 -writable-system +~~~ + +and push: + +~~~ +adb root +adb remount +adb reboot + +adb root +adb remount +adb push Phonesky-31.apk /product/priv-app +adb reboot +~~~ + +## Android 12L (Google APIs) + +Start the Google Play device and pull: + +~~~ +adb pull /product/priv-app/Phonesky/Phonesky.apk Phonesky-32.apk +~~~ + +then start the Google APIs device: + +~~~ +emulator -avd Pixel_3a_XL_API_32 -writable-system +~~~ + +and push: + +~~~ +adb root +adb remount +adb reboot + +adb root +adb remount +adb push Phonesky-32.apk /product/priv-app +adb reboot +~~~ + +## Android Tiramisu (Google APIs) + +Start the Google Play device and pull: + +~~~ +adb pull /product/priv-app/Phonesky/Phonesky.apk Phonesky-33.apk +~~~ + +then start the Google APIs device: + +~~~ +emulator -avd Pixel_3a_XL_API_33 -writable-system +~~~ + +and push: + +~~~ +adb root +adb remount +adb reboot + +adb root +adb remount +adb push Phonesky-33.apk /product/priv-app +adb reboot +~~~ + +## Android Tiramisu (Google Play) + +we cannot run as root: + +~~~ +> adb root +adbd cannot run as root in production builds +~~~ diff --git a/research/2022-12-08/readme.md b/research/2022-12-08/readme.md new file mode 100644 index 0000000..b205ce9 --- /dev/null +++ b/research/2022-12-08/readme.md @@ -0,0 +1,15 @@ +# December 9 2022 + +## use without authentication? + +need to finish `get_items.go` + +plus look into `/fdfe/delivery` + +## youtube OAuth? + +just change scope to `googleplay`? + +## manual OAuth entry? + +as workaround for login issues diff --git a/research/go.mod b/research/go.mod new file mode 100644 index 0000000..d8abe3a --- /dev/null +++ b/research/go.mod @@ -0,0 +1,3 @@ +module research + +go 1.19