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" />
|
android:value="true" />
|
||||||
</activity>
|
</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 -->
|
<!-- Runs in the phone process since it needs access to UiccController -->
|
||||||
<activity android:name="Settings$ApnSettingsActivity"
|
<activity android:name="Settings$ApnSettingsActivity"
|
||||||
android:label="@string/apn_settings"
|
android:label="@string/apn_settings"
|
||||||
@@ -1948,17 +1938,6 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</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? -->
|
<!-- TODO: Is this needed? -->
|
||||||
<activity android:name="BandMode"
|
<activity android:name="BandMode"
|
||||||
android:theme="@android:style/Theme.Dialog"
|
android:theme="@android:style/Theme.Dialog"
|
||||||
|
@@ -22,7 +22,6 @@ import android.app.admin.DevicePolicyManager;
|
|||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
|
||||||
import android.content.pm.ServiceInfo;
|
import android.content.pm.ServiceInfo;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@@ -41,7 +40,6 @@ import android.text.TextUtils;
|
|||||||
import android.view.KeyCharacterMap;
|
import android.view.KeyCharacterMap;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.accessibility.AccessibilityManager;
|
import android.view.accessibility.AccessibilityManager;
|
||||||
|
|
||||||
import com.android.internal.content.PackageMonitor;
|
import com.android.internal.content.PackageMonitor;
|
||||||
import com.android.internal.logging.MetricsLogger;
|
import com.android.internal.logging.MetricsLogger;
|
||||||
import com.android.internal.view.RotationPolicy;
|
import com.android.internal.view.RotationPolicy;
|
||||||
@@ -127,8 +125,10 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
|
|||||||
private final Runnable mUpdateRunnable = new Runnable() {
|
private final Runnable mUpdateRunnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (getActivity() != null) {
|
||||||
updateServicesPreferences();
|
updateServicesPreferences();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private final PackageMonitor mSettingsPackageMonitor = new PackageMonitor() {
|
private final PackageMonitor mSettingsPackageMonitor = new PackageMonitor() {
|
||||||
|
@@ -88,6 +88,7 @@ public class DashboardSummary extends InstrumentedFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
|
if (getActivity() == null) return;
|
||||||
HelpUtils.prepareHelpMenuItem(getActivity(), menu, R.string.help_uri_dashboard,
|
HelpUtils.prepareHelpMenuItem(getActivity(), menu, R.string.help_uri_dashboard,
|
||||||
getClass().getName());
|
getClass().getName());
|
||||||
}
|
}
|
||||||
|
@@ -25,11 +25,9 @@ import android.view.MenuInflater;
|
|||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import com.android.internal.logging.MetricsLogger;
|
import com.android.internal.logging.MetricsLogger;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.SettingsPreferenceFragment;
|
import com.android.settings.SettingsPreferenceFragment;
|
||||||
import com.android.settings.nfc.PaymentBackend.PaymentAppInfo;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -48,21 +46,11 @@ public class PaymentSettings extends SettingsPreferenceFragment {
|
|||||||
|
|
||||||
mPaymentBackend = new PaymentBackend(getActivity());
|
mPaymentBackend = new PaymentBackend(getActivity());
|
||||||
setHasOptionsMenu(true);
|
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();
|
PreferenceManager manager = getPreferenceManager();
|
||||||
PreferenceScreen screen = manager.createPreferenceScreen(getActivity());
|
PreferenceScreen screen = manager.createPreferenceScreen(getActivity());
|
||||||
|
|
||||||
List<PaymentAppInfo> appInfos = mPaymentBackend.getPaymentAppInfos();
|
List<PaymentBackend.PaymentAppInfo> appInfos = mPaymentBackend.getPaymentAppInfos();
|
||||||
if (appInfos != null && appInfos.size() > 0) {
|
if (appInfos != null && appInfos.size() > 0) {
|
||||||
NfcPaymentPreference preference =
|
NfcPaymentPreference preference =
|
||||||
new NfcPaymentPreference(getPrefContext(), mPaymentBackend);
|
new NfcPaymentPreference(getPrefContext(), mPaymentBackend);
|
||||||
@@ -75,6 +63,16 @@ public class PaymentSettings extends SettingsPreferenceFragment {
|
|||||||
setPreferenceScreen(screen);
|
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
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
Reference in New Issue
Block a user