import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.Process;
+import android.os.SELinux;
import android.provider.BaseColumns;
import android.provider.Downloads;
import android.provider.OpenableColumns;
appInfo = getContext().getPackageManager().
getApplicationInfo("com.android.defcontainer", 0);
} catch (NameNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ Log.wtf(Constants.TAG, "Could not get ApplicationInfo for com.android.defconatiner", e);
}
if (appInfo != null) {
mDefContainerUid = appInfo.uid;
Context context = getContext();
context.startService(new Intent(context, DownloadService.class));
mDownloadsDataDir = StorageManager.getDownloadDataDirectory(getContext());
+ try {
+ SELinux.restorecon(mDownloadsDataDir.getCanonicalPath());
+ } catch (IOException e) {
+ Log.wtf(Constants.TAG, "Could not get canonical path for download directory", e);
+ }
return true;
}