Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
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