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

Commit 0787f0ce authored by Gavin Corkery's avatar Gavin Corkery Committed by Android (Google) Code Review
Browse files

Merge "Make updatedMillis a private field"

parents b2913320 13f8161a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -360,7 +360,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements

                        final long age = System.currentTimeMillis() - session.createdMillis;
                        final long timeSinceUpdate =
                                System.currentTimeMillis() - session.updatedMillis;
                                System.currentTimeMillis() - session.getUpdatedMillis();
                        final boolean valid;
                        if (session.isStaged()) {
                            if (timeSinceUpdate >= MAX_TIME_SINCE_UPDATE_MILLIS
+10 −1
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {

    /** Timestamp of the last time this session changed state  */
    @GuardedBy("mLock")
    long updatedMillis;
    private long updatedMillis;

    /** Uid of the creator of this session. */
    private final int mOriginalInstallerUid;
@@ -1833,6 +1833,15 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
        }
    }

    /**
     * @return the timestamp of when this session last changed state
     */
    public long getUpdatedMillis() {
        synchronized (mLock) {
            return updatedMillis;
        }
    }

    String getInstallerPackageName() {
        synchronized (mLock) {
            return mInstallerPackageName;