public static void Saveapkenalblearray (Context context,boolean[] booleanarray) {
Sharedpreferences prefs = Contex T.getsharedpreferences (Apk_enable_array, context.mode_private);
Jsonarray Jsonarray = new Jsonarray ();
for (Boolean B:booleanarray) {
Jsonarray.put (b);
}
Sharedpreferences.editor Editor = Prefs.edit ();
Editor.putstring (apk_enable_array,jsonarray.tostring ());
Editor.commit ();
}
public static boolean[] Getapkenablearray (Context context,int arraylength)
{
Sharedpreferences prefs = Context.getsharedpreferences (Apk_enable_array, context.mode_private);
boolean[] Resarray=new boolean[arraylength];
Arrays.fill (Resarray, true);
try {
Jsonarray Jsonarray = new Jsonarray (prefs.getstring (Apk_enable_array, "[]"));
for (int i = 0; i < JS Onarray.length (); i++) {
Resarray[i] = Jsonarray.getboolean (i);
}
} catch (Exception e) {
E.printstacktrace ();
}
return resarray;
}
Sharedpreferences Storage Array