Various small crash fixes and guards
Bug: 25501551 Bug: 25583654 Bug: 25510495 Bug: 23575961 Change-Id: Id0e7f6aacdf763bf95b49d281aa8755afcd2e5ef
This commit is contained in:
@@ -382,16 +382,6 @@
|
||||
android:value="true" />
|
||||
</activity>
|
||||
|
||||
<!-- Suspect activity alias: targetActivity is Settings itself, does not define a name. Remove? -->
|
||||
<activity-alias android:name=".wifi.WifiApSettings"
|
||||
android:targetActivity="Settings">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.VOICE_LAUNCH" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<!-- Runs in the phone process since it needs access to UiccController -->
|
||||
<activity android:name="Settings$ApnSettingsActivity"
|
||||
android:label="@string/apn_settings"
|
||||
@@ -1948,17 +1938,6 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- Suspect activity alias: targetActivity is Settings itself, does not define a name. Remove? -->
|
||||
<activity-alias android:name="ProxySelector"
|
||||
android:label="@string/proxy_settings_label"
|
||||
android:targetActivity="Settings">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.VOICE_LAUNCH" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<!-- TODO: Is this needed? -->
|
||||
<activity android:name="BandMode"
|
||||
android:theme="@android:style/Theme.Dialog"
|
||||
|
@@ -22,7 +22,6 @@ import android.app.admin.DevicePolicyManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.pm.ServiceInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
@@ -41,7 +40,6 @@ import android.text.TextUtils;
|
||||
import android.view.KeyCharacterMap;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
|
||||
import com.android.internal.content.PackageMonitor;
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.view.RotationPolicy;
|
||||
@@ -127,8 +125,10 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
|
||||
private final Runnable mUpdateRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getActivity() != null) {
|
||||
updateServicesPreferences();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private final PackageMonitor mSettingsPackageMonitor = new PackageMonitor() {
|
||||
|
@@ -88,6 +88,7 @@ public class DashboardSummary extends InstrumentedFragment {
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
if (getActivity() == null) return;
|
||||
HelpUtils.prepareHelpMenuItem(getActivity(), menu, R.string.help_uri_dashboard,
|
||||
getClass().getName());
|
||||
}
|
||||
|
@@ -25,11 +25,9 @@ import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.nfc.PaymentBackend.PaymentAppInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -48,21 +46,11 @@ public class PaymentSettings extends SettingsPreferenceFragment {
|
||||
|
||||
mPaymentBackend = new PaymentBackend(getActivity());
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
ViewGroup contentRoot = (ViewGroup) getListView().getParent();
|
||||
View emptyView = getActivity().getLayoutInflater().inflate(
|
||||
R.layout.nfc_payment_empty, contentRoot, false);
|
||||
contentRoot.addView(emptyView);
|
||||
setEmptyView(emptyView);
|
||||
|
||||
PreferenceManager manager = getPreferenceManager();
|
||||
PreferenceScreen screen = manager.createPreferenceScreen(getActivity());
|
||||
|
||||
List<PaymentAppInfo> appInfos = mPaymentBackend.getPaymentAppInfos();
|
||||
List<PaymentBackend.PaymentAppInfo> appInfos = mPaymentBackend.getPaymentAppInfos();
|
||||
if (appInfos != null && appInfos.size() > 0) {
|
||||
NfcPaymentPreference preference =
|
||||
new NfcPaymentPreference(getPrefContext(), mPaymentBackend);
|
||||
@@ -75,6 +63,16 @@ public class PaymentSettings extends SettingsPreferenceFragment {
|
||||
setPreferenceScreen(screen);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
ViewGroup contentRoot = (ViewGroup) getListView().getParent();
|
||||
View emptyView = getActivity().getLayoutInflater().inflate(
|
||||
R.layout.nfc_payment_empty, contentRoot, false);
|
||||
contentRoot.addView(emptyView);
|
||||
setEmptyView(emptyView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
Reference in New Issue
Block a user