Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.cyanogenmod.pawitp.a700.fixportrait;
- import android.content.BroadcastReceiver;
- import android.content.Context;
- import android.content.Intent;
- import android.os.IBinder;
- import android.os.Parcel;
- import android.os.RemoteException;
- import android.os.ServiceManager;
- // Temporary portrait display fix by disabling transform hint
- public class Startup extends BroadcastReceiver {
- @Override
- public void onReceive(final Context context, final Intent bootintent) {
- try {
- IBinder flinger = ServiceManager.getService("SurfaceFlinger");
- if (flinger != null) {
- Parcel data = Parcel.obtain();
- data.writeInterfaceToken("android.ui.ISurfaceComposer");
- data.writeInt(1);
- flinger.transact(1009, data, null, 0);
- data.recycle();
- }
- } catch (RemoteException ex) {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement