Age | Commit message (Collapse) | Author |
|
BatteryUsageStats is created under a BatteryStatsImpl lock. One of
the elements of BatteryUsageStats is the battery history buffer Parcel.
Once the BatteryUsageStats object is created, the BatteryStatsImpl lock
is released and the history buffer parcel continues to be appended
by BatteryStatsImpl. The Parcel may even be reset altogether if the
battery stats session is reset. The BatteryUsageStats object is parceled
during the getBatteryUsageStats binder call. Any modification of the
history buffer concurrent with parceling causes a crash.
Bug: 194256984
Test: atest FrameworksCoreTests:BatteryUsageStatsTest FrameworksCoreTests:BatteryUsageStatsProviderTest
Change-Id: I262c4608cd02943f926e8daaf3e782c6fe6eaee7
|
|
Change-Id: I63de5c36e4a2842dd2dbb1ecd5f9576faf155b95
|
|
Text in the QS status bar is medium in light mode and regular in dark
mode. Fix the mismatch.
Change-Id: Ic6e5dc547d4ded9d231f88f6cac3e1e9f8483d5e
|
|
On desktop Linux, subpixel text positioning is necessary to avoid
kerning issues, and Android is no different. Even though most phone
displays have relatively high DPIs, the lack of subpixel text
positioning is only unnoticeable on high-end devices such as the Pixel 4
XL (1440x3040 @ 6.3 in => 537 dpi).
For example, on the Pixel 5 (1080 x 2340 @ 6.0 in => 432 dpi),
horizontally-scrolling labels in QS tiles can be seen "jittering"
slightly upon close observation. This was tested with the Google Sans
font on Google's stock OS. At this lower DPI, there is still a need for
subpixel text positioning (at least in some cases).
Enable subpixel text positioning by default to fix occasional kerning
issues and jittering when text is in motion.
Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09
|
|
This looks outdated, since most apps are edge-to-edge nowadays.
Change-Id: I8c54e61e618a9b5bed1a59753ce76e8fbd69fae2
|
|
I'm not sure why Google decided to revert to a static variant of *only*
the regular non-italic and non-condensed weight, but using the default
"Roboto" font for the lock screen clock (i.e. AOSP default) is broken
with the change:
- Clock is too bold when notifications are present (because SystemUI
loads the regular font but can't change the weight to be less
bold)
- Weight animation between lock screen and AOD is broken (because
weight can't be animated without the variable font)
- AOD clock font is too bold (could cause burn-in)
Switch back to the variable font in order to fix the clock issues.
Change-Id: Ia2e5ef52e4edb5d4275f6d5faf8c74266b784762
|
|
The 2-second scrim color animation is far too long in contrast to the
dark theme QS tile's state animation, and it's long enough to be
something that users have to wait and watch.
Reduce the duration to 375 ms, following Launcher3's activity theme
cross-fade duration, which is much more reasonable.
Change-Id: Id74e3d266f2cdc14d0f5c87f7650d5be730cdb67
|
|
This is a new GLSL ripple animation inspired by Microsoft's Fluent
Design, with an emphasis on responsiveness. The first frame of the
animation includes a solid base highlight and a visible portion of the
ripple circle, together serving as immediate feedback on finger up
(especially in cases where few additional frames can be rendered, e.g.
opening activities/fragment and dismissing dialogs).
After the initial frame, the animation consists of a blurred circle that
gradually expands (increasing radius), becomes less blurred, and finally
fades out at the end of the animation. The animation timing follows a
sine-based ease out curve, which is a decent balance between the
animation feeling too fast and too slow/unnatural.
Demo video: https://twitter.com/kdrag0n/status/1445806323535269893
Change-Id: I27192bd406490c39487dc84941f2f5c4a0fb33fe
|
|
The sRGB transfer function is a piecewise function with linear and gamma
2.4 parts, not involving cosine or other magic constants.
Fade colors in linear sRGB instead of non-linear sRGB + magic gamma to
minimize color distortion as the animation progresses.
Change-Id: I57db834f938cc63b7298af1c9dfe8c284dc6abe2
|
|
In my opinion, this animation serves no purpose because it doesn't
correspond to any animations in the text selection/handle flow, and is
barely noticeable in typical text selection cases. In addition, it makes
the magnifier feel slow/laggy when selecting a large block of text
quickly.
Change-Id: I5fed9fc06db4491dc2811815741830001d295030
|
|
When opening and closing activities in Settings, a significant amount of
CPU time is spent in ART interface method call trampolines, as reported
by simpleperf:
0.32% /apex/com.android.art/lib64/libart.so art_quick_imt_conflict_trampoline
PackageInfoWithoutStateUtils is responsible for a substantial portion of
the time:
0.34% 0.24% /apex/com.android.art/lib64/libart.so art_quick_imt_conflict_trampoline
|
-- art_quick_imt_conflict_trampoline
|
|--5.48%-- android.content.pm.parsing.PackageInfoWithoutStateUtils.appInfoFlags
| com.android.server.pm.parsing.pkg.PackageImpl.toAppInfoWithoutState
| android.content.pm.parsing.PackageInfoWithoutStateUtils.generateApplicationInfoUnchecked
| com.android.server.pm.parsing.PackageInfoUtils.generateApplicationInfo
| |
| |--33.53%-- com.android.server.pm.parsing.PackageInfoUtils.generateActivityInfo
| | |
| | |--76.24%-- com.android.server.pm.ComponentResolver$ActivityIntentResolver.newResult
To avoid the overhead of calling methods through interfaces,
opportunistically cast ParsingPackageRead objects to the real
implementation and access fields directly on it. This isn't pretty, but
it reduces the CPU time wasted on interface method calls.
Test: simpleperf record -a; verify that PackageInfoWithoutStateUtils.appInfoFlags
no longer appears under art_quick_imt_conflict_trampoline
Change-Id: I475ba804c61739c7537e664b09973665f001270b
|
|
When opening and closing activities in Settings, a significant amount of
CPU time is spent performing JNI calls, as reported by simpleperf:
0.39% /system/framework/arm64/boot-framework.oat art_jni_trampoline
Reflection in LayoutInflater is responsible for a significant portion
of the time spent in the JNI trampoline:
6.08% 0.08% /apex/com.android.art/javalib/arm64/boot.oat art_jni_trampoline
|
-- art_jni_trampoline
|
|--12.38%-- java.lang.reflect.Constructor.newInstance
| |--0.09%-- [hit in function]
| |
| |--88.32%-- android.view.LayoutInflater.createView
| | |
| | |--83.39%-- com.android.internal.policy.PhoneLayoutInflater.onCreateView
| | | android.view.LayoutInflater.onCreateView
| | | android.view.LayoutInflater.onCreateView
| | | android.view.LayoutInflater.createViewFromTag
| | | |
| | | |--72.73%-- android.view.LayoutInflater.rInflate
| | | | |
| | | | |--57.90%-- android.view.LayoutInflater.rInflate
| | | | | |
| | | | | |--94.90%-- android.view.LayoutInflater.inflate
| | | | | | android.view.LayoutInflater.inflate
| | | | | | |--35.86%-- [hit in function]
| | | | | | |
| | | | | | |--58.15%-- androidx.preference.PreferenceGroupAdapter.onCreateViewHolder
Empirical testing of interacting with ~113 real-world apps reveals that
many of the most frequently-inflated views are framework classes:
13486 android.widget.LinearLayout
6930 android.widget.View
6447 android.widget.FrameLayout
5613 android.widget.ViewStub
5608 androidx.constraintlayout.widget.ConstraintLayout
4722 android.widget.TextView
4431 com.google.android.material.textview.MaterialTextView
3570 eu.faircode.email.FixedTextView
3044 android.widget.ImageView
2665 android.widget.RelativeLayout
1694 android.widget.Space
979 androidx.preference.internal.PreferenceImageView
926 androidx.appcompat.view.menu.ActionMenuItemView
884 androidx.appcompat.widget.AppCompatImageView
855 slack.uikit.components.icon.SKIconView
770 android.widget.ProgressBar
743 com.fastaccess.ui.widgets.FontTextView
541 androidx.recyclerview.widget.RecyclerView
442 androidx.appcompat.widget.AppCompatTextView
404 org.mariotaku.twidere.view.MediaPreviewImageView
393 com.moez.QKSMS.common.widget.QkTextView
382 android.widget.Button
365 slack.widgets.core.textview.ClickableLinkTextView
365 slack.uikit.components.avatar.SKAvatarView
352 com.google.android.libraries.inputmethod.widgets.SoftKeyView
351 com.android.launcher3.BubbleTextView
315 slack.widgets.core.viewcontainer.SingleViewContainer
315 slack.widgets.core.textview.MaxWidthTextView
313 androidx.constraintlayout.widget.Barrier
302 slack.app.ui.widgets.ReactionsLayout
302 slack.app.ui.messages.widgets.MessageLayout
302 slack.app.ui.messages.widgets.MessageHeader
290 com.android.launcher3.views.DoubleShadowBubbleTextView
285 com.android.internal.widget.CachingIconView
265 android.widget.ImageButton
262 androidx.constraintlayout.widget.Guideline
249 org.thoughtcrime.securesms.components.emoji.EmojiTextView
234 com.google.android.libraries.inputmethod.widgets.AutoSizeTextView
232 com.android.internal.widget.RemeasuringLinearLayout
228 android.view.ViewStub
227 android.app.ViewStub
226 android.webkit.ViewStub
221 im.vector.app.core.ui.views.ShieldImageView
219 androidx.constraintlayout.widget.Group
214 androidx.coordinatorlayout.widget.CoordinatorLayout
204 androidx.appcompat.widget.ContentFrameLayout
All framework classes seen:
13486 android.widget.LinearLayout
6930 android.widget.View
6447 android.widget.FrameLayout
5613 android.widget.ViewStub
4722 android.widget.TextView
3044 android.widget.ImageView
2665 android.widget.RelativeLayout
1694 android.widget.Space
770 android.widget.ProgressBar
382 android.widget.Button
265 android.widget.ImageButton
228 android.view.ViewStub
227 android.app.ViewStub
226 android.webkit.ViewStub
145 android.widget.Switch
117 android.widget.DateTimeView
86 android.widget.Toolbar
68 android.widget.HorizontalScrollView
67 android.widget.ScrollView
65 android.widget.NotificationHeaderView
65 android.webkit.NotificationHeaderView
65 android.view.NotificationHeaderView
65 android.app.NotificationHeaderView
63 android.webkit.View
63 android.view.View
62 android.app.View
58 android.widget.ListView
50 android.widget.QuickContactBadge
40 android.widget.SeekBar
38 android.widget.CheckBox
16 android.widget.GridLayout
15 android.widget.TableRow
15 android.widget.RadioGroup
15 android.widget.Chronometer
13 android.widget.ViewFlipper
9 android.widget.Spinner
8 android.widget.ViewSwitcher
8 android.widget.TextSwitcher
8 android.widget.SurfaceView
8 android.widget.CheckedTextView
8 android.preference.PreferenceFrameLayout
7 android.widget.TwoLineListItem
5 android.widget.TableLayout
5 android.widget.EditText
3 android.widget.TabWidget
3 android.widget.TabHost
2 android.widget.ZoomButton
2 android.widget.TextureView
2 android.widget.ExpandableListView
2 android.webkit.TextureView
2 android.view.TextureView
2 android.app.TextureView
1 android.widget.WebView
1 android.widget.ViewAnimator
1 android.widget.TextClock
1 android.widget.AutoCompleteTextView
1 android.webkit.WebView
1 android.webkit.SurfaceView
1 android.view.SurfaceView
1 android.app.SurfaceView
Unfortunately, replacing reflection with MethodHandle constructors is
counter-productive in terms of performance:
Constructor direct: create=5 invoke=42
Constructor reflection: create=310 invoke=433
Constructor MethodHandle: create=3283 invoke=3489
Constructor MethodHandle-exact: create=3273 invoke=3453
To reduce the performance impact of slow reflection, we can leverage the
fact that the most frequently-inflated classes are from the framework,
and hard-code direct constructor references for them in a switch-case
block. Reflection will automatically be used as a fallback for custom
app views.
Test: simpleperf record -a; verify that Constructor.newInstance ->
LayoutInflater no longer appears at the top under
art_jni_trampoline
Change-Id: I8fcc0e05813ff9ecf1eddca3cc6920e747adf4fc
|
|
When opening and closing activities in Settings, a significant amount of
CPU time is spent looking up ArrayMap entries, as reported by simpleperf:
0.12% /system/framework/arm64/boot-framework.oat
android.util.ArrayMap.binarySearchHashes
PackageManagerService is responsible for a significant portion of the time
spent in ArrayMap lookups:
0.08% 0.08% /system/framework/arm64/boot-framework.oat
android.util.ArrayMap.binarySearchHashes
|
-- android.util.ArrayMap.binarySearchHashes
|
--50.00%-- android.util.ArrayMap.indexOf
|
|--36.71%-- android.util.ArrayMap.get
| |--0.87%-- [hit in function]
| |
| |--5.42%-- android.app.SystemServiceRegistry.getSystemService
| | android.app.ContextImpl.getSystemService
| | android.view.ContextThemeWrapper.getSystemService
| | android.app.Activity.getSystemService
| | |
| | |--52.18%-- TemporaryFile-kEdnnv[+9b97baa8]
| | | TemporaryFile-FwF2he[+9b96d048]
| | | art_quick_invoke_stub
| | | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | | art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)
| | | bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)
| | | MterpInvokeVirtual
| | | mterp_op_invoke_virtual
| | | libcrypto.so[+3fac6]
| | | MterpInvokeDirect
| | | mterp_op_invoke_direct
| | | libcrypto.so[+3faa8]
| | | MterpInvokeVirtual
| | | mterp_op_invoke_virtual
| | | libcrypto.so[+3730c]
| | | art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.13341777805210357670)
| | | artQuickToInterpreterBridge
| | | art_quick_to_interpreter_bridge
| | | java.util.concurrent.Executors$RunnableAdapter.call
| | | java.util.concurrent.FutureTask.run
| | | java.util.concurrent.ThreadPoolExecutor.runWorker
| | | java.util.concurrent.ThreadPoolExecutor$Worker.run
| | | java.lang.Thread.run
| | | art_quick_invoke_stub
| | | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | | art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)
| | | art::Thread::CreateCallback(void*)
| | | __pthread_start(void*)
| | | __start_thread
| | |
| | --47.82%-- android.view.ContextThemeWrapper.getSystemService
| | android.view.ContextThemeWrapper.getSystemService
| | android.content.Context.getSystemService
| | android.view.View.onVisibilityAggregated
| | android.view.View.dispatchAttachedToWindow
| | android.view.ViewGroup.dispatchAttachedToWindow
| | android.view.ViewGroup.dispatchAttachedToWindow
| | android.view.ViewGroup.dispatchAttachedToWindow
| | android.view.ViewGroup.dispatchAttachedToWindow
| | android.view.ViewGroup.dispatchAttachedToWindow
| | android.view.ViewGroup.dispatchAttachedToWindow
| | android.view.ViewGroup.dispatchAttachedToWindow
| | android.view.ViewRootImpl.performTraversals
| | android.view.ViewRootImpl.doTraversal
| | android.content.ContextWrapper.getAssets [DEDUPED]
| | android.view.Choreographer.doCallbacks
| | android.view.Choreographer.doFrame
| | android.view.Choreographer$FrameDisplayEventReceiver.run
| | android.os.Handler.dispatchMessage
| | android.os.Looper.loop
| | android.app.ActivityThread.main
| | art_quick_invoke_static_stub
| | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)
| | art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)
| | art_jni_trampoline
| | com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run
| | com.android.internal.os.ZygoteInit.main
| | art_quick_invoke_static_stub
| | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)
| | art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)
| | art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)
| | _JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)
| | android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)
| | main
| | __libc_init
| |
Empirical testing reveals that SYSTEM_SERVICE_FETCHERS contains 134
entries, at which HashMap is 54% faster than ArrayMap for lookups and
74% faster [1] for insertions. The increased memory usage should be
a worthwhile trade-off at this size, so we can safely convert the map
to a HashMap in order to improve performance in this hotpath.
Because SYSTEM_SERVICE_NAMES, SYSTEM_SERVICE_FETCHERS, and
SYSTEM_SERVICE_CLASS_NAMES have the same names and similar uses, all of
them have been converted to HashMaps for consistency and performance.
[1] https://docs.google.com/spreadsheets/d/136UJS2yVlZyPx30KDNgj4AWldkp9xbzIcWkLFj9RGgk/edit
Test: simpleperf record -a; verify that SystemServiceRegistry no longer
appears under ArrayMap.binarySearchHashes
Change-Id: I2a5b23793a4fc8aa720eead3ecc7ca4589cb67da
|
|
When opening and closing activities in Settings, a significant amount of
CPU time is spent looking up ArrayMap entries, as reported by simpleperf:
0.12% /system/framework/arm64/boot-framework.oat
android.util.ArrayMap.binarySearchHashes
InsetsStateController is responsible for a significant portion of the time
spent in ArrayMap lookups:
0.08% 0.08% /system/framework/arm64/boot-framework.oat
android.util.ArrayMap.binarySearchHashes
|
-- android.util.ArrayMap.binarySearchHashes
|
--50.00%-- android.util.ArrayMap.indexOf
|
|--36.71%-- android.util.ArrayMap.get
| |--0.87%-- [hit in function]
| |
| |--6.67%-- com.android.server.wm.InsetsStateController.peekSourceProvider
| | |
| | |--68.77%-- com.android.server.wm.DisplayPolicy.beginLayoutLw
| | | com.android.server.wm.DisplayContent.performLayoutNoTrace
| | | com.android.server.wm.DisplayContent.performLayout
| | | com.android.server.wm.DisplayContent.applySurfaceChangesTransaction
| | | com.android.server.wm.RootWindowContainer.applySurfaceChangesTransaction
| | | com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace
| | | com.android.server.wm.RootWindowContainer.performSurfacePlacement
| | | com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop
| | | com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement
| | | com.android.server.wm.WindowManagerService.relayoutWindow
| | | com.android.server.wm.Session.relayout
| | | android.view.IWindowSession$Stub.onTransact
| | | com.android.server.wm.Session.onTransact
| | | android.os.Binder.execTransactInternal
| | | android.os.Binder.execTransact
| | | art_quick_invoke_stub
| | | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)
| | | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)
| | | art::JNI<false>::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)
| | | _JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)
| | | JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | | android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | | android::IPCThreadState::executeCommand(int)
| | | android::IPCThreadState::getAndExecuteCommand()
| | | android::IPCThreadState::joinThreadPool(bool)
| | | android::PoolThread::threadLoop()
| | | android::Thread::_threadLoop(void*)
| | | android::AndroidRuntime::javaThreadShell(void*)
| | | thread_data_t::trampoline(thread_data_t const*)
| | | __pthread_start(void*)
| | | __start_thread
| | |
| | --31.23%-- com.android.server.wm.DisplayPolicy.updateHideNavInputEventReceiver
| | com.android.server.wm.InsetsPolicy.updateBarControlTarget
| | com.android.server.wm.DisplayPolicy.updateSystemUiVisibilityLw
| | com.android.server.wm.DisplayPolicy.finishPostLayoutPolicyLw
| | com.android.server.wm.DisplayContent.applySurfaceChangesTransaction
| | com.android.server.wm.RootWindowContainer.applySurfaceChangesTransaction
| | com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace
| | com.android.server.wm.RootWindowContainer.performSurfacePlacement
| | com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop
| | com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement
| | com.android.server.wm.WindowManagerService.postWindowRemoveCleanupLocked
| | com.android.server.wm.WindowState.removeImmediately
| | com.android.server.wm.WindowState.removeIfPossible
| | com.android.server.wm.WindowState.removeIfPossible
| | com.android.server.wm.WindowManagerService.removeWindow
| | com.android.server.wm.Session.remove
| | android.view.IWindowSession$Stub.onTransact
| | com.android.server.wm.Session.onTransact
| | android.os.Binder.execTransactInternal
| | android.os.Binder.execTransact
| | art_quick_invoke_stub
| | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)
| | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)
| | art::JNI<false>::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)
| | _JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)
| | JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | android::IPCThreadState::executeCommand(int)
| | android::IPCThreadState::getAndExecuteCommand()
| | android::IPCThreadState::joinThreadPool(bool)
| | android::PoolThread::threadLoop()
| | android::Thread::_threadLoop(void*)
| | android::AndroidRuntime::javaThreadShell(void*)
| | thread_data_t::trampoline(thread_data_t const*)
| | __pthread_start(void*)
| | __start_thread
| |
Empirical testing reveals that mProviders usually contains 9 entries,
at which HashMap is 34% faster than ArrayMap for lookups and 57% faster
[1] for insertions. The increased memory usage should be negligible at
this size, so we can safely convert the map to a HashMap in order to
improve performance in this hotpath.
[1] https://docs.google.com/spreadsheets/d/136UJS2yVlZyPx30KDNgj4AWldkp9xbzIcWkLFj9RGgk/edit
Test: simpleperf record -a; verify that InsetsStateController no longer
appears under ArrayMap.binarySearchHashes
Change-Id: Ic08d4c3e56cf10b322eabc115de441c6c5f4a898
|
|
When opening and closing activities in Settings, a significant amount of
CPU time is spent looking up ArrayMap entries, as reported by simpleperf:
0.12% /system/framework/arm64/boot-framework.oat android.util.ArrayMap.binarySearchHashes
LocalServices is responsible for a significant portion of the time
spent in ArrayMap lookups:
0.08% 0.08% /system/framework/arm64/boot-framework.oat android.util.ArrayMap.binarySearchHashes
|
-- android.util.ArrayMap.binarySearchHashes
|
--50.00%-- android.util.ArrayMap.indexOf
|
|--36.71%-- android.util.ArrayMap.get
| |--0.87%-- [hit in function]
| |
| |--6.12%-- com.android.server.LocalServices.getService
| | |
| | |--42.41%-- com.android.server.inputmethod.InputMethodManagerInternal.get [DEDUPED]
| | | com.android.server.wm.-$$Lambda$DisplayContent$-xtu90EUfC_AM8Qe5g8vDDI07_E.run
| | | android.os.Handler.dispatchMessage
| | | android.os.Looper.loop
| | | android.os.HandlerThread.run
| | | com.android.server.ServiceThread.run
| | | art_quick_invoke_stub
| | | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | | art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)
| | | art::Thread::CreateCallback(void*)
| | | __pthread_start(void*)
| | | __start_thread
| | |
| | |--36.66%-- com.android.server.notification.NotificationManagerService.enqueueNotificationInternal
| | | com.android.server.notification.NotificationManagerService.enqueueNotificationInternal
| | | com.android.server.notification.NotificationManagerService$10.enqueueNotificationWithTag
| | | android.app.INotificationManager$Stub.onTransact
| | | android.os.Binder.execTransactInternal
| | | android.os.Binder.execTransact
| | | art_quick_invoke_stub
| | | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)
| | | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)
| | | art::JNI<false>::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)
| | | _JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)
| | | JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | | android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | | android::IPCThreadState::executeCommand(int)
| | | android::IPCThreadState::getAndExecuteCommand()
| | | android::IPCThreadState::joinThreadPool(bool)
| | | android::PoolThread::threadLoop()
| | | android::Thread::_threadLoop(void*)
| | | android::AndroidRuntime::javaThreadShell(void*)
| | | thread_data_t::trampoline(thread_data_t const*)
| | | __pthread_start(void*)
| | | __start_thread
| | |
| | --20.93%-- com.android.server.oemlock.OemLockService.setPersistentDataBlockOemUnlockAllowedBit
| | com.android.server.oemlock.OemLockService$2.isOemUnlockAllowed
| | android.service.oemlock.IOemLockService$Stub.onTransact
| | android.os.Binder.execTransactInternal
| | android.os.Binder.execTransact
| | art_quick_invoke_stub
| | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)
| | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)
| | art::JNI<false>::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)
| | _JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)
| | JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | android::IPCThreadState::executeCommand(int)
| | android::IPCThreadState::getAndExecuteCommand()
| | android::IPCThreadState::joinThreadPool(bool)
| | android::PoolThread::threadLoop()
| | android::Thread::_threadLoop(void*)
| | android::AndroidRuntime::javaThreadShell(void*)
| | thread_data_t::trampoline(thread_data_t const*)
| | __pthread_start(void*)
| | __start_thread
Empirical testing reveals that sLocalServiceObjects usually contains
68 entries, at which HashMap is 47% faster than ArrayMap for lookups
and 68% faster [1] for insertions. The increased memory usage should be
negligible at this size, so we can safely convert the map to a HashMap
in order to improve performance in this hotpath.
[1] https://docs.google.com/spreadsheets/d/136UJS2yVlZyPx30KDNgj4AWldkp9xbzIcWkLFj9RGgk/edit
Test: simpleperf record -a; verify that LocalServices no longer
appears under ArrayMap.binarySearchHashes
Change-Id: Ifd1f8b7940eba7723f93a73456470a84d34656ae
|
|
When opening and closing activities in Settings, a significant amount of
CPU time is spent looking up ArrayMap entries, as reported by simpleperf:
0.12% /system/framework/arm64/boot-framework.oat android.util.ArrayMap.binarySearchHashes
ThemedResourceCache is responsible for a significant portion of the time
spent in ArrayMap lookups:
0.08% 0.08% /system/framework/arm64/boot-framework.oat android.util.ArrayMap.binarySearchHashes
|
-- android.util.ArrayMap.binarySearchHashes
|
--50.00%-- android.util.ArrayMap.indexOf
|
|--36.71%-- android.util.ArrayMap.get
| |--0.87%-- [hit in function]
| |
| |--9.64%-- android.content.res.ThemedResourceCache.getThemedLocked
| | android.content.res.ThemedResourceCache.get
| | |
| | |--77.92%-- android.content.res.DrawableCache.getInstance
| | | android.content.res.ResourcesImpl.loadDrawable
| | | android.content.res.Resources.loadDrawable
| | | android.content.res.TypedArray.getDrawableForDensity
| | | android.content.res.Resources.getColor [DEDUPED]
| | | |
| | | |--62.94%-- android.view.View.<init>
| | | | |
| | | | |--64.58%-- android.view.ViewGroup.<init>
| | | | | android.widget.LinearLayout.<init>
| | | | | android.widget.LinearLayout.<init>
| | | | | art_quick_invoke_stub
| | | | | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | | | | art::InvokeConstructor(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ObjPtr<art::mirror::Object>, _jobject*)
| | | | | art::Constructor_newInstance0(_JNIEnv*, _jobject*, _jobjectArray*)
| | | | | art_jni_trampoline
| | | | | java.lang.reflect.Constructor.newInstance
| | | | | android.view.LayoutInflater.createView
| | | | | com.android.internal.policy.PhoneLayoutInflater.onCreateView
| | | | | android.view.LayoutInflater.onCreateView
| | | | | android.view.LayoutInflater.onCreateView
| | | | | android.view.LayoutInflater.createViewFromTag
| | | | | android.view.LayoutInflater.inflate
| | | | | android.view.LayoutInflater.inflate
| | | | |
| | | | --35.42%-- android.widget.TextView.<init>
| | | | android.widget.Button.<init>
| | | | art_quick_invoke_stub
| | | | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | | | art::InvokeConstructor(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ObjPtr<art::mirror::Object>, _jobject*)
| | | | art::Constructor_newInstance0(_JNIEnv*, _jobject*, _jobjectArray*)
| | | | art_jni_trampoline
| | | | java.lang.reflect.Constructor.newInstance
| | | | android.view.LayoutInflater.createView
| | | | com.android.internal.policy.PhoneLayoutInflater.onCreateView
| | | | android.view.LayoutInflater.onCreateView
| | | | android.view.LayoutInflater.onCreateView
| | | | android.view.LayoutInflater.createViewFromTag
| | | | android.view.LayoutInflater.rInflate
| | | | android.view.LayoutInflater.rInflate
| | | | android.view.LayoutInflater.rInflate
| | | | android.view.LayoutInflater.inflate
| | | | android.view.LayoutInflater.inflate
| | | | android.view.LayoutInflater.inflate
| | | |
| | | --37.06%-- com.android.internal.widget.ToolbarWidgetWrapper.<init>
| | |
| | --22.08%-- android.content.res.ConfigurationBoundResourceCache.get
| | android.content.res.ConfigurationBoundResourceCache.getInstance
| | android.content.res.ResourcesImpl.loadComplexColorFromName
| | android.content.res.ResourcesImpl.loadColorStateList
| | android.content.res.Resources.loadColorStateList
| | android.content.res.TypedArray.getColorStateList
| | android.widget.TextView.readTextAppearance
| | android.widget.TextView.setTextAppearance
| | android.widget.TextView.setTextAppearance
| | android.widget.Toolbar.setTitle
| | com.android.wifi.x.com.android.internal.util.StateMachine$SmHandler.handleMessage
| | android.view.SurfaceControl.copyFrom
Empirical testing reveals that mThemedEntries usually contains around 14
entries, at which HashMap is 35% faster than ArrayMap for lookups and
54% faster [1] for insertions. The increased memory usage should be
negligible at this size, so we can safely convert the map to a HashMap
in order to improve performance in this hotpath.
[1] https://docs.google.com/spreadsheets/d/136UJS2yVlZyPx30KDNgj4AWldkp9xbzIcWkLFj9RGgk/edit
Test: simpleperf record -a; verify that ThemedResourceCache no longer
appears under ArrayMap.binarySearchHashes
Change-Id: I39e1c4b03fe0e60f933f02e253d2d3c4a483146f
|
|
When opening and closing activities in Settings, a significant amount of
CPU time is spent checking whether ATrace tags are enabled, as measured
by simpleperf:
0.12% /system/lib64/libcutils.so atrace_get_enabled_tag
android.os.Trace is responsible for a significant portion of the time
spent in the checks:
0.10% 0.07% /system/lib64/libcutils.so atrace_get_enabled_tags
|
-- atrace_get_enabled_tags
|
|
|--1.62%-- android.os.Trace.traceEnd
| |--36.90%-- [hit in function]
| |
| |--29.76%-- android.view.Choreographer.doCallbacks
| | android.view.Choreographer.doFrame
| | android.view.Choreographer$FrameDisplayEventReceiver.run
| | android.os.Handler.dispatchMessage
| | android.os.Looper.loop
| | android.os.HandlerThread.run
| | com.android.server.ServiceThread.run
| | art_quick_invoke_stub
| | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)
| | art::Thread::CreateCallback(void*)
| | __pthread_start(void*)
| | __start_thread
| |
| |--19.00%-- com.android.server.BatteryService$BatteryPropertiesRegistrar.getProperty
| | android.os.IBatteryPropertiesRegistrar$Stub.onTransact
| | android.os.Binder.execTransactInternal
| | android.os.Binder.execTransact
| | art_quick_invoke_stub
| | art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)
| | art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)
| | art::JNI<false>::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)
| | _JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)
| | JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
| | android::IPCThreadState::executeCommand(int)
| | android::IPCThreadState::getAndExecuteCommand()
| | android::IPCThreadState::joinThreadPool(bool)
| | android::PoolThread::threadLoop()
| | android::Thread::_threadLoop(void*)
| | android::AndroidRuntime::javaThreadShell(void*)
| | thread_data_t::trampoline(thread_data_t const*)
| | __pthread_start(void*)
| | __start_thread
| |
| --14.33%-- android.view.ViewRootImpl.performDraw
| android.view.ViewRootImpl.performTraversals
| android.view.ViewRootImpl.doTraversal
| android.content.ContextWrapper.getAssets [DEDUPED]
| android.view.Choreographer.doCallbacks
| android.view.Choreographer.doFrame
| android.view.Choreographer$FrameDisplayEventReceiver.run
| android.os.Handler.dispatchMessage
| android.os.Looper.loop
| android.app.ActivityThread.main
| art_quick_invoke_static_stub
| art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)
| art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)
| art_jni_trampoline
| com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run
| com.android.internal.os.ZygoteInit.main
| art_quick_invoke_static_stub
| art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
| art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)
| art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)
| art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)
| _JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)
| android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)
| main
| __libc_init
We're unlikely to trace the system and framework in production systems,
so disable debug tracing in non-debuggable builds. The ro.debuggable
check is performed from the Java side for simplicity.
Test: simpleperf record -a; verify that android.os.Trace no longer
appears under atrace_get_enabled_tags
Change-Id: I9b63d386c041ffd9d7ff34ecd0ec1eb95dc03b4b
|
|
changing visibility"
This reverts commit 6dad90e5883db82c345a3ab592b26f0fd69fe28d.
When opening and closing activities in Settings, a significant amount of
CPU time is spent rendering and compressing JPEG screenshots, as
reported by simpleperf:
0.46% /system/lib64/libjpeg.so encode_mcu_gather
0.37% /system/lib64/libhwui.so neon::S32_alpha_D32_filter_DX(SkBitmapProcState const&, unsigned int const*, int, unsigned int*)
0.29% /system/lib64/libjpeg.so jsimd_extrgbx_ycc_convert_neon
0.27% /system/lib64/libjpeg.so jsimd_fdct_islow_neon
0.23% /system/lib64/libjpeg.so jsimd_huff_encode_one_block_neon
0.14% /system/lib64/libjpeg.so jsimd_quantize_neon
Call graph tracing reveals that TaskSnapshotPersister is responsible for
taking the screenshots:
0.16% 0.16% /system/lib64/libjpeg.so encode_mcu_gather
|
-- encode_mcu_gather
|
--50.00%-- compress_output
process_data_simple_main
jpeg_write_scanlines
SkJpegEncoder::onEncodeRows(int)
SkJpegEncoder::Encode(SkWStream*, SkPixmap const&, SkJpegEncoder::Options const&)
SkEncodeImage(SkWStream*, SkPixmap const&, SkEncodedImageFormat, int)
android::Bitmap::compress(SkBitmap const&, android::Bitmap::JavaCompressFormat, int, SkWStream*)
android::Bitmap::compress(android::Bitmap::JavaCompressFormat, int, SkWStream*)
Bitmap_compress(_JNIEnv*, _jobject*, long, int, int, _jobject*, _jbyteArray*)
art_jni_trampoline
android.graphics.Bitmap.compress
com.android.server.wm.TaskSnapshotPersister$StoreWriteQueueItem.writeBuffer
com.android.server.wm.TaskSnapshotPersister$StoreWriteQueueItem.write
com.android.server.wm.TaskSnapshotPersister$1.run
art_quick_invoke_stub
art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)
art::Thread::CreateCallback(void*)
__pthread_start(void*)
__start_thread
Manual code tracing leads to ActivityRecord as the culprit, as it takes
a screenshot every time an Activity is finished. This doesn't appear to
be critical, so revert the commit that added it in order to reduce
excess CPU usage.
Test: simpleperf record -a; verify that libjpeg-turbo no longer appears
in top sample hits
Change-Id: Ib161679f1f3b83787f90b8ef7dcf46d246bb7c57
|
|
Model extracted from redfin SPP1.210122.020.A3.
This is not ideal, but we don't have data to train our own model and
build-time resource overlays can't contain assets.
Change-Id: I8ce288ec4848bebeab4e0f2e1ae858fd4a168009
|
|
This is a provider for machine learning-assisted back gestures when
using gesture navigation. It uses TensorFlow Lite for inference, similar
to Google's Pixel implementation, so a model is necessary for it to
work.
Change-Id: I619837789f77d9a430a04afb68a8d8e68977e431
|
|
This is necessary in order to take a screenshot from other apps using
platform APIs as if the user used the screenshot keychord, which we need
for implementing gestures in a modular way. The service is still
protected by the INTERACT_ACROSS_USERS_FULL permission, which is already
necessary to get far enough to attempt binding to this service.
Note that existing screenshot APIs are not sufficient because they only
allow apps to get an image of the screen; we want the full user
experience of the animations, actions, preview, sound, etc. that
normally come with a user-initiated screenshot.
Change-Id: Ieb559d5dc921393f68aa1d6142f7834d89d4e22b
|
|
This is necessary in order to start the default assistant app from other
system apps using platform APIs, which we need for implementing gestures
in a modular way.
Change-Id: Ic04d742acff07ce8b5b88a4296d01b1fe1036d9e
|
|
I have never encountered a single app that this aspect ratio limit is
actually helpful for. Most legacy apps are able to cope with longer
aspect ratios fine — perhaps not optimally, but it looks better than
having a big black box at the bottom of the screen.
Instead of limiting older apps' screen space unconditionally or exposing
it in Settings, remove the limit entirely so the user doesn't have to go
through the trouble to begin with. Note that apps explicitly declaring a
shorter aspect ratio will still get their constraint satisfied.
Change-Id: Ic415288b24129a634476b5cc01a6f202588f4b89
|
|
Informing the user that ADB is enabled does not necessitate an alert
sound. It's especially annoying with the default AOSP notification sound,
but even with a less distracting sound, this doesn't need to be so
intrusive.
Change-Id: Idee92b44cff2473a3686a2f2d95c6f5e4e91c2f8
|
|
400 ms feels too long for this, especially when the actions already take
so long to show up due to how long saving the screenshot takes.
Change-Id: I67a874adeb42cbde31e9b4f7bddc59481dc2f69f
|
|
3 seconds is enough in most cases. Keeping the overlay around for too
long forces the user to dismiss it manually, which is a regression
compared to the Android 10's screenshot notification UI.
Change-Id: I38f4bfbdd88a56a4ffba225c38050f28d43fc418
|
|
Change-Id: I505b620ad50eb6ae5983509cdc6a3efad96eb2f9
|
|
All credits to LineageOS and related authors on:
https://github.com/LineageOS/android_lineage-sdk
Ported to AOSP from lineage-sdk by SKULSHADY
[ anirudhgupta109 | AOSiP ]
- Minimal import of LineageHardwareManager and HIDLHelper
- We don't want LiveDisplay stuff
- Nuke Legacy touchscreen support
Change-Id: Ic8ca90663582c06f35562286f5ce5b2d84971ec4
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
|
|
Author: Roman Birg <roman@cyngn.com>
Date: Thu Feb 4 16:28:00 2016 -0800
framework: move device key handler logic, fix gesture camera launch
In order to make device camera gestures behave the same way as launching
the camera by double tapping the power button, route DeviceKeyHandler
logic through the GestureLauncherService.
A callback is used in order to avoid publishing the
GestureLauncherService into the System service registry, because the
KeyHandler code cannot directly access services local to the system
process.
OPO-427
Change-Id: I2a8860b278f65ccf31bfee151513d8a23ab746c5
Signed-off-by: Roman Birg <roman@cyngn.com>
Author: Roman Birg <roman@cyngn.com>
Date: Sat Feb 13 09:08:21 2016 -0800
KeyHandler: don't break old interfaces
Causing bootloops on devices, don't break old interfaces in the
framework.
OPO-427
Change-Id: I49473b057bc4ed4710e9092c76e41c6a8134d2de
Signed-off-by: Roman Birg <roman@cyngn.com>
Author: Roman Birg <roman@cyngn.com>
Date: Tue Feb 16 17:22:01 2016 -0800
SystemUI: handle camera launch gesture from keyhadler
Includes partial reverts:
Revert "KeyHandler: don't break old interfaces"
This reverts commit 31ecbdc5fcc1263e9028107858565d951798fd93.
Revert "framework: move device key handler logic, fix gesture camera launch"
This reverts commit db1b4e6e4880be1828342be9bc468d36565a2ef0.
Ref: OPO-427
Change-Id: Ic15543a8f63ad4521ab0ab536d00224b0bd70f8c
Signed-off-by: Roman Birg <roman@cyngn.com>
Author: Michael Bestas <mikeioannina@cyanogenmod.org>
Date: Sat Feb 20 00:56:47 2016 +0200
SystemUI: Don't vibrate on touchscreen camera gesture
* This is usually handled in device-specific keyhandler,
where vibration is optional and has the same duration
in all gestures
Change-Id: I879671c9d6f785137d63b8b70de35f5d5020748d
Change-Id: Iba9211b7d342f618c4082c34d11663d89861607a
|
|
Change-Id: I3146ea0eb9477129fa2e490fe9b149ad48ec0fba
|
|
ks-aosp.lnx.12.0.r1-rel
Change-Id: Iff85bcc8176b0ed8ddab0cdbb751d603956eac93
|
|
This is not necessary because BiometricPrompt is not drawn above the
navigation bar.
Change-Id: I7a00a0d6f1b2b68d6c642be03e23849029f8faa1
|
|
1) Ensure the spacer measurement is clamped to 0. Negative values
cause the layout to exhibit undefined behavior.
2) Instead of making the layout xml even more complicated, for low-area
sensor devices, we just have onLayoutInternal() translate the icon
and indicator to where it should be. Note that this can definitely
cause overlap with the button bar, but at least this implementation
allows the button bar to be shown (and thus pass curent CTS
requirements). We can have additional refinement in the future.
Bug: 201510778
Test: atest CtsBiometricsTestCases
Change-Id: Ie9869f15fc3afddc3bd4392a2fd08efbf136cd6c
|
|
Change-Id: Icf333f13bccfed9ba4ec030716d2bcf83841ef55
|
|
* Local HBM does not shows pressed icon
* Global hbm shows pressed icon
Change-Id: Ic9f51a33c1781527f0c7fc41e8bfe320bf2653d2
|
|
* TYPE_KEYGUARD_DIALOG was below volume and navbar and would
have caused cause issues when HBM was enabled
* BiometricPrompt uses different layer which again is below
navbar and causes bright volume and navbar
Change-Id: Ia37930ffd7a28fc8785f26ada3b69a02df0d4891
|
|
This should let us choose between multiple UdfpsHbmProvider
implementations.
Change-Id: I9b93e32644feaf1398cdac69e9696d8ec195f246
|
|
* set a solid color by configuring config_udfpsColor
* set a custom image by setting udfps_icon_pressed and making config_udfpsColor #00ffffff (transparent)
Change-Id: I2460f6196d32fe46eb97f9a5c767bde5c9976681
|
|
This is a squash commit of the following changes,
only modified for the new SDK.
Carbon Edits: get away from SDK
Author: Alexander Hofbauer <alex@derhofbauer.at>
Date: Thu Apr 12 01:24:24 2012 +0200
Dispatch keys to a device specific key handler
Injects a device key handler into the input path to handle additional
keys (as found on some docks with a hardware keyboard).
Configurable via overlay settings config_deviceKeyHandlerLib and
config_deviceKeyHandlerClass.
Change-Id: I6678c89c7530fdb1d4d516ba4f1d2c9e30ce79a4
Author: Jorge Ruesga <jorge@ruesga.com>
Date: Thu Jan 24 02:34:49 2013 +0100
DeviceKeyHandle: The device should consume only known keys
When the device receive the key, only should consume it if the device
know about the key. Otherwise, the key must be handle by the active app.
Also make mDeviceKeyHandler private (is not useful outside this class)
Change-Id: I4b9ea57b802e8c8c88c8b93a63d510f5952b0700
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Author: Danesh Mondegarian <daneshm90@gmail.com>
Date: Sun Oct 20 00:34:48 2013 -0700
DeviceKeyHandler : Allow handling keyevents while screen off
Some devices require the keyevents to be processed while the screen
is off, this patchset addresses that by moving the filter up in the call
hierarchy.
Change-Id: If71beecc81aa5e453dcd08aba72b7bea5c210590
Author: Steve Kondik <steve@cyngn.com>
Date: Sun Sep 11 00:49:41 2016 -0700
policy: Use PathClassLoader for loading the keyhandler
* Fix crash on start due to getCacheDir throwing an exception.
* We can't do this anymore due to the new storage/crypto in N.
Change-Id: I28426a5df824460ebc74aa19068192adb00d4f7c
Author: Zhao Wei Liew <zhaoweiliew@gmail.com>
Date: Sun Nov 20 08:20:15 2016 +0800
PhoneWindowManager: Support multiple key handlers
Convert the string overlay to a string-array overlay
to allow devices to specify an array of key handlers.
Note that the keyhandlers towards the start of the
array take precedence when loading.
Change-Id: Iaaab737f1501a97d7016d8d519ccf127ca059218
Author: Paul Keith <javelinanddart@gmail.com>
Date: Thu Nov 23 21:47:51 2017 +0100
fw/b: Return a KeyEvent instead of a boolean in KeyHandler
* Allows handlers to modify the event before sending it off
to another KeyHandler class, to handle things like rotation
Change-Id: I481107e050f6323c5897260a5d241e64b4e031ac
Change-Id: Ie65a89cd7efd645622d99d47699df847bc3ad96b
|
|
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date: Sun Sep 1 16:24:14 2013 +0700
PackageManager: allow build-time disabling of components
Allow components to be specified as disabled at build time
(applied on boot).
This allows stock OTA components to be marked as disabled in
CM builds.
Change-Id: I6e4499cc40a779792a5ea97a10137399dad7d69f
Author: Gianmarco Reverberi <gianmarco.reverberi@gmail.com>
Date: Mon Mar 16 20:02:15 2015 +0100
SystemUpdateService: enable service but lock its receivers [1/2]
Added a check for ensure that disabled components are not
re-enabled at runtime
Added code for forcing enable of previously disabled components
Change-Id: Icfcfa26ccb85028d32edbb5cdb3dd7cdae85b720
Author: Michael W <baddaemon87@gmail.com>
Date: Mon Oct 28 14:26:43 2019 +0100
PM: Allow disabling components per-device
* Introduce a new overlayable string-array
"config_deviceDisabledComponents"
* This is equally used to disable components per-device, e.g.
NearbyMessagingService
* At the same time, rename config_disabledComponents to
config_globallyDisabledComponents to reflect the difference
Change-Id: Ieeec0788b063a33e8a2830dd95b239c99a58466f
Author: Michael W <baddaemon87@gmail.com>
Date: Fri Nov 1 11:11:29 2019 +0100
PackageManager: Refactor en-/disabling of components
* Don't use the same code twice, make it reusable
Change-Id: I9fc388f56cea413654a390cb0ccd15a706fb3ad8
Change-Id: Ic26c9d2f080ab61e09b2d64ae48cd6f29147774a
|
|
Devices with split system/vendor images may want to use the OEM's vendor
image. In that case, the OEM's platform signature is not actually the
same as the platform signature used to sign the Lineage system image.
Allow devices to specify an OEM platform signature which will also be
recognized as the system's platform signature.
Change-Id: Ida9bb25a32234af9d9507a214eae6a4672320d2b
|
|
Squash of:
Author: dhacker29 <dhackerdvm@gmail.com>
Date: Tue Nov 24 01:53:47 2015 -0500
Core: Use ro.build.date to signal mIsUpgrade
M: We use a static fingerprint that is only changed when a new OEM build is released, so
every flash shows Android is starting instead of upgrading. This will fix that.
N: even though we dont have the dexopt sceen on N, this is still needed to delete the
correct caches, and grant/deny specific runtime permissions like a true oem update
would do.
Updated for Nougat By: BeansTown106
Change-Id: I0e3ed5c8f0351e48944432ae6a0c5194ddeff1fa
Author: Sam Mortimer <sam@mortimer.me.uk>
Date: Fri Sep 28 13:45:00 2018 -0700
fw/b UserManagerService: Use ro.build.date to signal upgrades
*) We changed PackageManagerService to use Build.DATE instead of
Build.FINGERPRINT to detect upgrade. Do the same for
UserManagerService.
*) Affects generation of preboot intent and app data migration.
Change-Id: I56887b7ca842afdcf3cf84b27b4c04667cf43307
Author: Wang Han <416810799@qq.com>
Date: Sat Dec 29 23:33:20 2018 +0800
ShortcutService: Use ro.build.date to signal package scanning
* Affects system apps scanning.
Change-Id: I5f6d6647929f5b5ae7e820b18e95bf5ed2ec8d1c
Author: maxwen <max.weninger@gmail.com>
Date: Tue Nov 19 01:02:01 2019 +0100
base: Use ro.build.date to clear cache dirs on update
instead of using ro.build.fingerprint we explictly need to use ro.build.date
Change-Id: Ib3e80e58eb8c9a21c108e9f5cd2dbdb7ada8e3a4
Author: maxwen <max.weninger@gmail.com>
Date: Wed Oct 28 07:07:10 2020 -0400
One more Build.FINGERPRINT to Build.DATE change
Change-Id: I13dbf3d7f6587d3fcd6591cc0f861b34b6d5561c
Change-Id: If0eb969ba509981f9209ffa37a949d9042ef4c2a
|
|
Change-Id: I4299fca7c4b8f38d513e3f044ebfb77a292e9094
|
|
Change-Id: I0955268324debef97c0e53c6362e87665352c5da
|
|
This reverts commit 7fdb80725c64277d7a84bff1a33cda8d69cac99e.
Change-Id: I943669679c54ec341dfb4309821cfb137cab4736
|
|
s-keystone-qcom-release
Change-Id: I5b53127a5d58f5b251b32391076e6386c657c294
|
|
This CL fixes a bug that could happen when animating a dialog out at the
same time as hiding the SystemUI shade, and that would make the phone
unusable until the shade is swiped down again. See b/223387276 for more
info.
Bug: 223387276
Test: Manual, see b/223387276#comment1
Change-Id: If251b00558a5ca9a927d1be2bb015f1c0acb2d57
(cherry picked from commit 631a7ef1a60a8d61077e1762e5a18cc53e8211f4)
|
|
sso://googleplex-android/platform/frameworks/base into HEAD
Change-Id: Id517c457139546c0da7121db1f458a534a2b798d
|
|
Change-Id: Iba024f11efa49d9cf7e5201667bb01319537553f
CRs-Fixed: 3173551
|
|
This became necessary since now we cancel compactions so it is possible
to have a list without elements when the compaction system is ready to
start a compaction.
Bug: 219901263
Test: Manual
CRs-Fixed: 3121545
Change-Id: I44d95d243ba95aea6c84283ddef1a38ffb6d3570
(cherry picked from commit 54f53e0cf51cf078961b0254fbabd48c9a151985)
Change-Id: Ib17b6ae4112e1b10e415de27bde8e2844d69c91d
|