Obsolete
Status Update
Comments
al...@android.com <al...@android.com>
sa...@google.com <sa...@google.com> #2
Thank you for your feedback. We assure you that we are doing our best to address the issue reported, however our product team has shifted work priority that doesn't include this issue. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with latest bug report here https://goo.gl/TbMiIO .
Description
It results in the following trace
02-27 20:39:28.870 1500-1523/? E/AndroidRuntime﹕ *** FATAL EXCEPTION IN SYSTEM PROCESS: android.display
java.lang.IllegalArgumentException: radius must be > 0
at android.graphics.RadialGradient.<init>(RadialGradient.java:57)
at android.graphics.drawable.GradientDrawable.ensureValidRect(GradientDrawable.java:938)
at android.graphics.drawable.GradientDrawable.draw(GradientDrawable.java:509)
at android.view.View.drawBackground(View.java:15352)
at android.view.View.draw(View.java:15105)
at android.widget.FrameLayout.draw(FrameLayout.java:592)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2595)
at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2606)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2519)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2337)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1968)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Please describe the problem in detail:
Set a window background that uses a radial gradient drawable with a gradient radius that is too low.
My theme:
<item name="android:windowBackground">@drawable/yellow_gradient</item>
dimens.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<fraction name="gradient_radius">40%</fraction>
</resources>
yellow_gradient.xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="
<gradient
android:endColor="@color/gradient_outer_color"
android:gradientRadius="@fraction/gradient_radius"
android:centerX="0.5"
android:centerY="0.5"
android:startColor="@color/gradient_inner_color"
android:type="radial">
</gradient>
</shape>
The expected behaviour, of course, is that the system process should not crash and reboot.
The emulator I was able to trigger this on has the following build number:
- sdk_phone_x86_64-eng 5.0 LRX09D test-keys
It does not crash on an Samsung Galaxy S3 running android 4.3
I have attached a sample project to reproduce the issue. I also attached a bugreport