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

Commit c0cdadc3 authored by Rhed Jao's avatar Rhed Jao
Browse files

Fix side channel package info disclosure in updateStatusIconAsync api

Bug: 227208010
Test: atest CtsInputMethodTestCases
Change-Id: I2b76be5dcb03ebd0c9aad8c9c3d38baae9155414
parent e2a41d35
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2961,9 +2961,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
                    try {
                        // Use PackageManager to load label
                        final PackageManager packageManager = mContext.getPackageManager();
                        contentDescription = packageManager.getApplicationLabel(
                                mIPackageManager.getApplicationInfo(packageName, 0,
                                        mSettings.getCurrentUserId()));
                        final ApplicationInfo applicationInfo = mIPackageManager
                                .getApplicationInfo(packageName, 0, mSettings.getCurrentUserId());
                        if (applicationInfo != null) {
                            contentDescription = packageManager
                                    .getApplicationLabel(applicationInfo);
                        }
                    } catch (RemoteException e) {
                        /* ignore */
                    }