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

Commit 4d07bc99 authored by Alan Viverette's avatar Alan Viverette
Browse files

Clean up usage of temporary TypedValue in Resources

Reduces the amount of time that a lock is held and reduces the scope of
the lock to only manage the temporary TypedValue. Also ensures that the
typed value is consistently returned to the (single item) pool.

Additionally, performs some refactoring:
- removes unused variables and constants
- moves the NotFoundException cause into the constructor for consistency
  with other Exceptions
- inlines sPreloadedDensity which was not used anywhere
- fixes line wrapping and indentation in nearby code

Aside from improvements to locking, there are no functional changes in
this CL.

Change-Id: I8c3059261e3cc2288a086e6637ab946e0b7d3741

Clean up usage of temporary TypedValue in Resources

Reduces the amount of time that a lock is held and reduces the scope of
the lock to only manage the temporary TypedValue. Also ensures that the
typed value is consistently returned to the (single item) pool.

Additionally, performs some refactoring:
- removes unused variables and constants
- moves the NotFoundException cause into the constructor for consistency
  with other Exceptions
- inlines sPreloadedDensity which was not used anywhere
- fixes line wrapping and indentation in nearby code

Aside from improvements to locking, there are no functional changes in
this CL.

Change-Id: I8c3059261e3cc2288a086e6637ab946e0b7d3741
parent 746955c0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9920,6 +9920,7 @@ package android.content.res {
  public static class Resources.NotFoundException extends java.lang.RuntimeException {
    ctor public Resources.NotFoundException();
    ctor public Resources.NotFoundException(java.lang.String);
    ctor public Resources.NotFoundException(java.lang.String, java.lang.Exception);
  }
  public final class Resources.Theme {
+1 −0
Original line number Diff line number Diff line
@@ -10261,6 +10261,7 @@ package android.content.res {
  public static class Resources.NotFoundException extends java.lang.RuntimeException {
    ctor public Resources.NotFoundException();
    ctor public Resources.NotFoundException(java.lang.String);
    ctor public Resources.NotFoundException(java.lang.String, java.lang.Exception);
  }
  public final class Resources.Theme {
+146 −191

File changed.

Preview size limit exceeded, changes collapsed.