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

Commit 13f8161a authored by Gavin Corkery's avatar Gavin Corkery
Browse files

Make updatedMillis a private field

Test: make
Bug: 122677682
Change-Id: I54804d589994b01ac358ac5a9d55672ee7339771
parent 5f9ec2c1
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;
@@ -1740,6 +1740,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;