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

Commit 9edce64e authored by Stanislav Zholnin's avatar Stanislav Zholnin
Browse files

Properly handle situation when currentOpPackageName returns null.

Fixes: 158309330
Test: adb shell content query --uri content://com.android.contacts/data --projection  contact_id:raw_contact_id:_id:display_name:last_time_used:data1:account_type:mimetype
Change-Id: I6c5d0c4fef150ba45721d474ac0f83778d543467
parent e3defa2d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -261,8 +261,9 @@ public class AppOpsManager {
                            < SystemClock.elapsedRealtime()) {
                        String stackTrace = getFormattedStackTrace();
                        try {
                            String packageName = ActivityThread.currentOpPackageName();
                            sConfig = getService().reportRuntimeAppOpAccessMessageAndGetConfig(
                                    ActivityThread.currentOpPackageName(), op, stackTrace);
                                    packageName == null ? "" : packageName, op, stackTrace);
                        } catch (RemoteException e) {
                            e.rethrowFromSystemServer();
                        }