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

Commit 9b5f5e3a authored by Jian Zhou's avatar Jian Zhou Committed by Gerrit - the friendly Code Review server
Browse files

Settings : fix force close in monkey test

Settings force close because of null pointer in monkey test.

Add null pointer protect in DataUsageSummary.

Change-Id: I507911d73cdc61ec1a84d08062138d4baa7fcf66
CRs-Fixed: 1049728
parent 0dec0be8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -134,6 +134,10 @@ public class DataUsageSummary extends DataUsageBase implements Indexable {
    public void onPrepareOptionsMenu(Menu menu) {
        final Context context = getActivity();
        final MenuItem networkaccess = menu.findItem(R.id.data_usage_menu_app_network_access);
        if (networkaccess == null) {
            return;
        }

        if (context.getResources().getBoolean(R.bool.config_app_network_access_enabled)) {
            networkaccess.setVisible(true);
        } else {