Fix NPE in DrawOverlayDetails#getSummary
When AppEntry is null (APP uninstalled), returns an empty summary string. Bug: 172381586 Test: build pass Change-Id: I63fbeaaec6f2d0de617c6e104af341806605a6c2
This commit is contained in:
@@ -158,6 +158,10 @@ public class DrawOverlayDetails extends AppInfoWithHeader implements OnPreferenc
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static CharSequence getSummary(Context context, AppEntry entry) {
|
public static CharSequence getSummary(Context context, AppEntry entry) {
|
||||||
|
if (entry == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
OverlayState state;
|
OverlayState state;
|
||||||
if (entry.extraInfo instanceof OverlayState) {
|
if (entry.extraInfo instanceof OverlayState) {
|
||||||
state = (OverlayState) entry.extraInfo;
|
state = (OverlayState) entry.extraInfo;
|
||||||
|
Reference in New Issue
Block a user