app/src/main/java/fr/neamar/kiss/forwarder/ExperienceTweaks.java
// Can (and will) break in any Android release.
Can (and will) break in any Android release.
Can ( and will ) break in any Android release .
@SuppressLint("PrivateApi")
    @SuppressWarnings("CatchAndPrintStackTrace")
    private void displayNotificationDrawer() {
        @SuppressLint("WrongConstant") Object sbservice = mainActivity.getSystemService("statusbar");
        Class<?> statusbarManager;
        try {
            statusbarManager = Class.forName("android.app.StatusBarManager");
            Method showStatusBar;
            if (Build.VERSION.SDK_INT >= 17) {
                showStatusBar = statusbarManager.getMethod("expandNotificationsPanel");
            } else {
                showStatusBar = statusbarManager.getMethod("expand");
            }
            showStatusBar.invoke(sbservice);
        } catch (ClassNotFoundException e1) {
            e1.printStackTrace();
        } catch (NoSuchMethodException e1) {
            e1.printStackTrace();
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        } catch (InvocationTargetException e1) {
            e1.printStackTrace();
        }
    }
@ SuppressLint ( "PrivateApi" ) @ SuppressWarnings ( "CatchAndPrintStackTrace" ) private void displayNotificationDrawer ( ) { @ SuppressLint ( "WrongConstant" ) Object sbservice = mainActivity . getSystemService ( "statusbar" ) ; Class < ? > statusbarManager ; try { statusbarManager = Class . forName ( "android.app.StatusBarManager" ) ; Method showStatusBar ; if ( Build . VERSION . SDK_INT >= 17 ) { showStatusBar = statusbarManager . getMethod ( "expandNotificationsPanel" ) ; } else { showStatusBar = statusbarManager . getMethod ( "expand" ) ; } showStatusBar . invoke ( sbservice ) ; } catch ( ClassNotFoundException e1 ) { e1 . printStackTrace ( ) ; } catch ( NoSuchMethodException e1 ) { e1 . printStackTrace ( ) ; } catch ( IllegalAccessException e1 ) { e1 . printStackTrace ( ) ; } catch ( InvocationTargetException e1 ) { e1 . printStackTrace ( ) ; } }
Can (and will) break in any Android release.
Can ( and will ) break in any Android release .