mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-01 04:17:21 +01:00
added MediaActivity to Manifest. removed runOnUiThread
Signed-off-by: nuclearfog <hatespirit666@gmail.com>
This commit is contained in:
parent
1711058aca
commit
ac13b1a1b8
@ -92,6 +92,11 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.MediaActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.DirectMessage"
|
||||
android:screenOrientation="portrait"
|
||||
|
@ -135,30 +135,15 @@ public abstract class MediaActivity extends AppCompatActivity implements Locatio
|
||||
if (permissions.length > 0 && grantResults.length > 0) {
|
||||
// read storage permission granted
|
||||
if (PERMISSIONS[0][0].equals(permissions[0]) && grantResults[0] == PERMISSION_GRANTED) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
openMediaPicker(requestCode);
|
||||
}
|
||||
});
|
||||
openMediaPicker(requestCode);
|
||||
}
|
||||
// location permission granted
|
||||
else if (PERMISSIONS[1][0].equals(permissions[0])) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getLocation(false);
|
||||
}
|
||||
});
|
||||
getLocation(false);
|
||||
}
|
||||
// Write storage permissions granted
|
||||
else if (PERMISSIONS[2][0].equals(permissions[0]) && grantResults[0] == PERMISSION_GRANTED) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
saveImage();
|
||||
}
|
||||
});
|
||||
saveImage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user