Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c1647930 authored by Sumedh Sen's avatar Sumedh Sen Committed by Song Chun Fan
Browse files

Make AppSnippet parcelable

AppSnippet is used in Pia in 4 activities. Each time, it is expensive to
parse the app's logo and label from PackageManager and the APK file of
the app being installed. Thus, lets compute the AppSnippet once and pass
it as an intent extra to whichever activity needs it.

This also solves the bug where InstallSuccess showed an activity's name
in place of the app label since the temporary directory used to create
AppSnippet is already destroyed after app installation.

Bug: 290862169
Test: Manually install an APK and observe the app install / update
dialog
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:719d00a979005e1b5919694305b015e1970992d9)
Merged-In: I2095b092e1a7b3186ff4cdc4c81effce51377b19
Change-Id: I2095b092e1a7b3186ff4cdc4c81effce51377b19

Original patch:
 From 719d00a9 Mon Sep 17 00:00:00 2001
From: Sumedh Sen <sumedhsen@google.com>
Date: Tue, 18 Jul 2023 15:00:59 -0700
Subject: [PATCH] Make AppSnippet parcelable

AppSnippet is used in Pia in 4 activities. Each time, it is expensive to
parse the app's logo and label from PackageManager and the APK file of
the app being installed. Thus, lets compute the AppSnippet once and pass
it as an intent extra to whichever activity needs it.

This also solves the bug where InstallSuccess showed an activity's name
in place of the app label since the temporary directory used to create
AppSnippet is already destroyed after app installation.

Bug: 290862169
Test: Manually install an APK and observe the app install / update
dialog

Change-Id: I2095b092e1a7b3186ff4cdc4c81effce51377b19
---
parent 07b1e6f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment