diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2022-06-30 04:23:05 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2022-06-30 04:23:05 -0700 |
commit | b7042aa76a7bb60b9dd2a44a4558bb631f44cc5e (patch) | |
tree | 9152f2d2c3bae1fdf187f8b90b7896bbfd6e2aa5 | |
parent | e1627f5362f7239a0e920876621300c564e35cbf (diff) | |
parent | d9b68a9f5b630d57a37a789034a6f5ca78e0d8fb (diff) |
Merge d9b68a9f5b630d57a37a789034a6f5ca78e0d8fb on remote branch
Change-Id: Ic20032d2fcdc7c0864d145907b633ca59a212968
-rw-r--r-- | core/java/android/view/Choreographer.java | 4 | ||||
-rw-r--r-- | services/core/java/com/android/server/am/ActiveServices.java | 149 | ||||
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 3 | ||||
-rw-r--r--[-rwxr-xr-x] | services/core/java/com/android/server/wm/ActivityRecord.java | 31 |
4 files changed, 105 insertions, 82 deletions
diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java index 39beeeae11de..c3511e7c036d 100644 --- a/core/java/android/view/Choreographer.java +++ b/core/java/android/view/Choreographer.java @@ -844,6 +844,10 @@ public final class Choreographer { mLastVsyncEventData = vsyncEventData; } + if (frameIntervalNanos > 0 && frameIntervalNanos != mFrameIntervalNanos) { + mFrameIntervalNanos = frameIntervalNanos; + ScrollOptimizer.setFrameInterval(mFrameIntervalNanos); + } ScrollOptimizer.setUITaskStatus(true); AnimationUtils.lockAnimationClock(frameTimeNanos / TimeUtils.NANOS_PER_MS); diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 3e905960d4df..ee5bc5374df0 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -306,6 +306,9 @@ public final class ActiveServices { private IServicetracker mServicetracker; + private final boolean isLowRamDevice = + SystemProperties.getBoolean("ro.config.low_ram", false); + String mLastAnrDump; AppWidgetManagerInternal mAppWidgetManagerInternal; @@ -2848,28 +2851,30 @@ public final class ActiveServices { } clist.add(c); - ServiceData sData = new ServiceData(); - sData.packageName = s.packageName; - sData.processName = s.shortInstanceName; - sData.lastActivity = s.lastActivity; - if (s.app != null) { - sData.pid = s.app.getPid(); - sData.serviceB = s.app.mState.isServiceB(); - } else { - sData.pid = -1; - sData.serviceB = false; - } + if (!isLowRamDevice) { + ServiceData sData = new ServiceData(); + sData.packageName = s.packageName; + sData.processName = s.shortInstanceName; + sData.lastActivity = s.lastActivity; + if (s.app != null) { + sData.pid = s.app.getPid(); + sData.serviceB = s.app.mState.isServiceB(); + } else { + sData.pid = -1; + sData.serviceB = false; + } - ClientData cData = new ClientData(); - cData.processName = callerApp.processName; - cData.pid = callerApp.getPid(); - try { - if (getServicetrackerInstance()) { - mServicetracker.bindService(sData, cData); + ClientData cData = new ClientData(); + cData.processName = callerApp.processName; + cData.pid = callerApp.getPid(); + try { + if (getServicetrackerInstance()) { + mServicetracker.bindService(sData, cData); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send bind details to servicetracker HAL", e); + mServicetracker = null; } - } catch (RemoteException e) { - Slog.e(TAG, "Failed to send bind details to servicetracker HAL", e); - mServicetracker = null; } boolean needOomAdj = false; @@ -3054,28 +3059,30 @@ public final class ActiveServices { try { while (clist.size() > 0) { ConnectionRecord r = clist.get(0); - ServiceData sData = new ServiceData(); - sData.packageName = r.binding.service.packageName; - sData.processName = r.binding.service.shortInstanceName; - sData.lastActivity = r.binding.service.lastActivity; - if(r.binding.service.app != null) { - sData.pid = r.binding.service.app.getPid(); - sData.serviceB = r.binding.service.app.mState.isServiceB(); - } else { - sData.pid = -1; - sData.serviceB = false; - } + if (!isLowRamDevice) { + ServiceData sData = new ServiceData(); + sData.packageName = r.binding.service.packageName; + sData.processName = r.binding.service.shortInstanceName; + sData.lastActivity = r.binding.service.lastActivity; + if(r.binding.service.app != null) { + sData.pid = r.binding.service.app.getPid(); + sData.serviceB = r.binding.service.app.mState.isServiceB(); + } else { + sData.pid = -1; + sData.serviceB = false; + } - ClientData cData = new ClientData(); - cData.processName = r.binding.client.processName; - cData.pid = r.binding.client.getPid(); - try { - if (getServicetrackerInstance()) { - mServicetracker.unbindService(sData, cData); + ClientData cData = new ClientData(); + cData.processName = r.binding.client.processName; + cData.pid = r.binding.client.getPid(); + try { + if (getServicetrackerInstance()) { + mServicetracker.unbindService(sData, cData); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send unbind details to servicetracker HAL", e); + mServicetracker = null; } - } catch (RemoteException e) { - Slog.e(TAG, "Failed to send unbind details to servicetracker HAL", e); - mServicetracker = null; } removeConnectionLocked(r, null, null, true); if (clist.size() > 0 && clist.get(0) == r) { @@ -4086,20 +4093,22 @@ public final class ActiveServices { r.postNotification(); created = true; - ServiceData sData = new ServiceData(); - sData.packageName = r.packageName; - sData.processName = r.shortInstanceName; - sData.pid = r.app.getPid(); - sData.lastActivity = r.lastActivity; - sData.serviceB = r.app.mState.isServiceB(); + if (!isLowRamDevice) { + ServiceData sData = new ServiceData(); + sData.packageName = r.packageName; + sData.processName = r.shortInstanceName; + sData.pid = r.app.getPid(); + sData.lastActivity = r.lastActivity; + sData.serviceB = r.app.mState.isServiceB(); - try { - if (getServicetrackerInstance()) { - mServicetracker.startService(sData); + try { + if (getServicetrackerInstance()) { + mServicetracker.startService(sData); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send start details to servicetracker HAL", e); + mServicetracker = null; } - } catch (RemoteException e) { - Slog.e(TAG, "Failed to send start details to servicetracker HAL", e); - mServicetracker = null; } } catch (DeadObjectException e) { Slog.w(TAG, "Application dead when creating service " + r); @@ -4300,24 +4309,26 @@ public final class ActiveServices { private void bringDownServiceLocked(ServiceRecord r, boolean enqueueOomAdj) { //Slog.i(TAG, "Bring down service:"); //r.dump(" "); - ServiceData sData = new ServiceData(); - sData.packageName = r.packageName; - sData.processName = r.shortInstanceName; - sData.lastActivity = r.lastActivity; - if (r.app != null) { - sData.pid = r.app.getPid(); - } else { - sData.pid = -1; - sData.serviceB = false; - } + if (!isLowRamDevice) { + ServiceData sData = new ServiceData(); + sData.packageName = r.packageName; + sData.processName = r.shortInstanceName; + sData.lastActivity = r.lastActivity; + if (r.app != null) { + sData.pid = r.app.getPid(); + } else { + sData.pid = -1; + sData.serviceB = false; + } - try { - if (getServicetrackerInstance()) { - mServicetracker.destroyService(sData); + try { + if (getServicetrackerInstance()) { + mServicetracker.destroyService(sData); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send destroy details to servicetracker HAL", e); + mServicetracker = null; } - } catch (RemoteException e) { - Slog.e(TAG, "Failed to send destroy details to servicetracker HAL", e); - mServicetracker = null; } // Report to all of the connections that the service is no longer // available. @@ -5065,7 +5076,7 @@ public final class ActiveServices { } try { - if (getServicetrackerInstance()) { + if (!isLowRamDevice && getServicetrackerInstance()) { mServicetracker.killProcess(app.getPid()); } } catch (RemoteException e) { diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 3014b89651a1..8ebb3a910f8f 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -900,7 +900,8 @@ public class PackageManagerService extends IPackageManager.Stub * List of packages path on the file system. */ final private List<String> mPackagesPathToBeDisabledForQSPA = new ArrayList<String>(); - final private boolean mQspaEnabled = SystemProperties.getBoolean("ro.config.qspa.apps", false); + final private boolean mQspaEnabled = SystemProperties.getBoolean( + "ro.vendor.config.qspa.apps", false); /** * Tracks new system packages [received in an OTA] that we expect to diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index e4ee577d1aea..dc986e222e19 100755..100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -284,6 +284,7 @@ import android.os.PersistableBundle; import android.os.Process; import android.os.RemoteException; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.service.contentcapture.ActivityEvent; @@ -615,6 +616,9 @@ public final class ActivityRecord extends WindowToken implements WindowManagerSe public BoostFramework mPerf = null; public BoostFramework mPerf_iop = null; + private final boolean isLowRamDevice = + SystemProperties.getBoolean("ro.config.low_ram", false); + boolean mVoiceInteraction; private int mPendingRelaunchCount; @@ -5285,18 +5289,21 @@ public final class ActivityRecord extends WindowToken implements WindowManagerSe aState = ActivityStates.RESTARTING_PROCESS; break; } - if(DEBUG_SERVICETRACKER) { - Slog.v(TAG, "Calling mServicetracker.OnActivityStateChange with flag " + early_notify + " state " + state); - } - try { - mServicetracker = mAtmService.mTaskSupervisor.getServicetrackerInstance(); - if (mServicetracker != null) - mServicetracker.OnActivityStateChange(aState, aDetails, aStats, early_notify); - else - Slog.e(TAG, "Unable to get servicetracker HAL instance"); - } catch (RemoteException e) { - Slog.e(TAG, "Failed to send activity state change details to servicetracker HAL", e); - mAtmService.mTaskSupervisor.destroyServicetrackerInstance(); + if (!isLowRamDevice) { + if(DEBUG_SERVICETRACKER) { + Slog.v(TAG, "Calling mServicetracker.OnActivityStateChange with flag " + + early_notify + " state " + state); + } + try { + mServicetracker = mAtmService.mTaskSupervisor.getServicetrackerInstance(); + if (mServicetracker != null) + mServicetracker.OnActivityStateChange(aState, aDetails, aStats, early_notify); + else + Slog.e(TAG, "Unable to get servicetracker HAL instance"); + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send activity state change details to servicetracker HAL", e); + mAtmService.mTaskSupervisor.destroyServicetrackerInstance(); + } } } |