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

Commit 0c8bd483 authored by Alon Albert's avatar Alon Albert Committed by Isaac Katzenelson
Browse files

Support PreferenceActivity.isValidFragmen

Bug: 10114369
Change-Id: If5c030362c65f585695510299f283949e17ca5f2
(cherry picked from commit 339b3be0)
parent 63f5b0d5
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -16,18 +16,11 @@

package com.android.deskclock;

import android.app.ActionBar;
import android.content.Intent;
import android.media.AudioManager;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
import android.provider.Settings;
import android.view.Menu;
import android.view.MenuItem;

/**
 * Settings for the Alarm Clock Dream (com.android.deskclock.Screensaver).
@@ -74,4 +67,9 @@ public class ScreensaverSettingsActivity extends PreferenceActivity
        pref.setOnPreferenceChangeListener(this);
    }

    @Override
    protected boolean isValidFragment(String fragmentName) {
        // This activity is not exported so we can just approve everything
        return true;
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -177,6 +177,12 @@ public class SettingsActivity extends PreferenceActivity
        return true;
    }

    @Override
    protected boolean isValidFragment(String fragmentName) {
        // Exported activity but no headers we support.
        return false;
    }

    private void updateAutoSnoozeSummary(ListPreference listPref,
            String delay) {
        int i = Integer.parseInt(delay);