Removing multiple system RPCs to packageMAnager and userManager from UI thread
Bug: 158427348 Change-Id: Ibb1837fe932000b69cf5683bb01727fc32abca91
This commit is contained in:
1 parent
70ff0c1144
commit
28daf4a76f
18 files changed
+213
-121
No files matched your search
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.launcher3.util;
|
||||
|
||||
import static android.content.pm.PackageInstaller.SessionInfo;
|
||||
import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
|
||||
|
||||
import android.app.AppOpsManager;
|
||||
@@ -45,8 +44,6 @@ import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.launcher3.PendingAddItemInfo;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
@@ -348,15 +345,4 @@ public class PackageManagerHelper {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the created time in millis of given session info. Returns 0 if not available.
|
||||
*/
|
||||
public static long getSessionCreatedTimeInMillis(@NonNull final SessionInfo info) {
|
||||
try {
|
||||
return (long) SessionInfo.class.getDeclaredMethod("getCreatedMillis").invoke(info);
|
||||
} catch (Exception e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user