1
でフラグメントインジェクションの脆弱性を使用すると、Androidの開発者を知っているように:修正XamarinのAndroid
2017年3月1日以降、Google PlayにはPreferenceActivityクラスはフラグメントインジェクション
に対して脆弱である可能性がある任意の新しいアプリケーションやアップデートの公開をブロックします。
https://support.google.com/faqs/answer/7188427ページでは、この脆弱性を修正する方法についていくつかのアドバイスを提供しますしかし、Xamarinで開発されたアプリケーションはどうなっていますか?
これに関する情報は見つかりませんでした。それは私の影響を受けたクラスはPreferenceActivityから継承SettingActivity、であることを述べている、と私のクラスSettingActivityはこれです:
[Activity(
Label = "@string/ApplicationName",
Icon = "@drawable/ic_launcher",
Theme = "@android:style/Theme.Holo.Light",
ParentActivity = typeof(MainActivity))]
[IntentFilter(
new [] {Intent.ActionManageNetworkUsage},
Categories= new [] {Intent.CategoryDefault}
)]
public class SettingsActivity : PreferenceActivity
{
public static readonly string KeyWifiOnly = "pref_wifi_only";
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
AddPreferencesFromResource(Resource.Xml.preferences);
ActionBar.SetHomeButtonEnabled(true);
ActionBar.SetDisplayHomeAsUpEnabled(true);
PreferenceManager.SetDefaultValues(this, Resource.Xml.preferences, false);
SetupNetworkPreferences();
}
private void SetupNetworkPreferences()
{
var prefs = PreferenceManager.GetDefaultSharedPreferences(this);
ListPreference list = FindPreference(
AppSettings.PreferenceNetworkProvider) as ListPreference;
list.SetEntries(
Enum.GetNames(typeof(AppSettings.FtpHostNetwork)));
list.SetEntryValues(Enum
.GetValues(typeof(AppSettings.FtpHostNetwork))
.Cast<int>()
.Select(x => x.ToString())
.ToArray());
}
protected override void OnResume()
{
base.OnResume();
var tracker = (Application as App).Tracker;
tracker.Screen("PantallaPreferencias");
}
}
は偽 '[アクティビティー(=偽、 アイコン= "描画可能/ ic_launcher @" エクスポート ラベル= "@文字列/のApplicationName"、 テーマ=「@androidに設定のエクスポートを試してみてください。 Holo.Light」、 ParentActivity = typeof演算(MainActivity))] [IntentFilter( 新規[] {} Intent.ActionManageNetworkUsage、 カテゴリ=新しい[] {} Intent.CategoryDefault )] ' –
はい、このトリックを行います。マイクありがとう。あなたは私の仕事を救っただけです – GalloPinto